Refresh design
This commit is contained in:
parent
5d95439e23
commit
206434b7de
5 changed files with 863 additions and 166 deletions
|
@ -31,7 +31,7 @@ class Link(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class LinkForm(ModelForm):
|
class LinkForm(ModelForm):
|
||||||
url = CharField(label='')
|
url = CharField(widget=TextInput(attrs={'class':'u-full-width', 'placeholder': 'Paste the link you want to shorten'}), label='')
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Link
|
model = Link
|
||||||
fields = ['url']
|
fields = ['url']
|
||||||
|
|
28
links/templates/404.html
Normal file
28
links/templates/404.html
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<link rel="stylesheet" href="/static/style.css" />
|
||||||
|
<title>minie links!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container not-found">
|
||||||
|
<div id="logo">
|
||||||
|
<a href="/"><img src="/static/minie.png" alt="min.ie" /></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Page not found</h2>
|
||||||
|
<p>Try this one instead <a href="https://min.ie/WVFdWJMa" target="_blank">https://min.ie/WVFdWJMa</a></p>
|
||||||
|
|
||||||
|
<footer><a href="https://twitter.com/kudoz">Tweet</a> or <a href="https://github.com/kudos/min.ie">Fork</a>. © <a href="http://crem.in">Jonathan Cremin</a></footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
_uacct = "UA-66209-5";
|
||||||
|
urchinTracker();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -2,32 +2,34 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<link rel="stylesheet" href="/static/normalize.css" />
|
||||||
|
<link rel="stylesheet" href="/static/skeleton.css" />
|
||||||
<link rel="stylesheet" href="/static/style.css" />
|
<link rel="stylesheet" href="/static/style.css" />
|
||||||
<title>minie links!</title>
|
<title>minie links!</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="main-box">
|
<div class="container">
|
||||||
<form method="post" action="/">
|
|
||||||
<ul>
|
|
||||||
{{form.as_ul}}
|
|
||||||
<li><input type="submit" value="shrink" name="shrink" id="main-submit" /></li>
|
|
||||||
</ul>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="logo-wrap">
|
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<a href="/"><img src="/static/minie.png" alt="min.ie" /></a>
|
<a href="/"><img src="/static/minie.png" alt="min.ie" /></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<form method="post" action="/">
|
||||||
|
{{form.url}}
|
||||||
|
<input type="submit" value="shrink" name="shrink" class="button-primary" />
|
||||||
|
</form>
|
||||||
|
|
||||||
{% if short_url %}
|
{% if short_url %}
|
||||||
<form name="url">
|
<form name="url">
|
||||||
<label onclick=\"document.url.short_link.focus();document.url.short_link.select();\" for=\"short_link\">Your Link</label>
|
<label onclick="document.url.short_link.focus();document.url.short_link.select();" for="short_link">Short Link</label>
|
||||||
<input name='short_link' value='{{short_url}}' id='short_link' readonly='true' size='25' onclick='javascript:this.focus();this.select();' />
|
<input type="text" class="u-full-width" name='short_link' value='{{short_url}}' readonly='true' onclick='javascript:this.focus();this.select();' />
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div id="info">Drag this bookmarklet <a onclick="return false" href="javascript:void(window.location%20=%20'http://min.ie/'+window.location)">min.ie</a> to your bookmark bar, or just stick "min.ie/" before any link you want to shrink.</div>
|
<div id="info">
|
||||||
<p>Django and Postgres Powered</p>
|
<p>Makes links shorter, like this: <a href="https://min.ie/WVFdWJMa" target="_blank">https://min.ie/WVFdWJMa</a></p>
|
||||||
|
<p>Drag this bookmarklet <a onclick="return false" class="bookmark" href="javascript:void(window.location='http://min.ie/'+window.location)">min.ie</a> to your bookmark bar for quick shrinking. Then just click the bookmark on a page you want a short url for.</p>
|
||||||
|
</div>
|
||||||
|
<footer><a href="https://twitter.com/kudoz">Tweet</a> or <a href="https://github.com/kudos/min.ie">Fork</a>. © <a href="http://crem.in">Jonathan Cremin</a></footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
||||||
|
|
|
@ -33,7 +33,7 @@ def catchall(request, id):
|
||||||
|
|
||||||
def home(request):
|
def home(request):
|
||||||
context = {'form': LinkForm}
|
context = {'form': LinkForm}
|
||||||
if 'short_url' in request.session:
|
if 'short_url' in request.session and request.session['short_url']:
|
||||||
context['short_url'] = request.session['short_url']
|
context['short_url'] = request.session['short_url']
|
||||||
request.session['short_url'] = None
|
request.session['short_url'] = None
|
||||||
if 'url' in request.POST:
|
if 'url' in request.POST:
|
||||||
|
|
967
static/style.css
967
static/style.css
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue