From b2265b1af839dce21bba9543145faf61542cdf62 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 23 Apr 2013 06:09:57 +0200 Subject: [PATCH] Clean up: Drop redundant attributes, minor JS clean up, gitignore * Dropped redundant `type` attribute from script elements (some had them removed already). * Dropped redundant `media` attribute from link elements. *
is not a valid self-closing tag. * Dropped redundant / in self-closing tags in
,
, . Just like was done for and already). * Aliasing $ to jQuery (local reference is cheaper and using jQuery as global seems more stable, bootstrap.js does this too). * Unminified it a bit (nothing extreme, just more consistent other code here already). * Consistently used single quotes in the js code (most code used singled quotes already). * Quoting attribute selectors $('input[name="foo"]'). Unquoted selectors have been deprecated. * Ignore .pyc files (so they don't show up in `git status`, and aren't accidentally committed with `git add`). --- .gitignore | 1 + README.md | 2 +- dpaste/templates/dpaste/about.html | 10 +++--- dpaste/templates/dpaste/base.html | 20 ++++++----- dpaste/templates/dpaste/snippet_details.html | 36 ++++++++++---------- dpaste/templates/dpaste/snippet_form.html | 2 +- dpaste/templates/dpaste/snippet_list.html | 2 +- 7 files changed, 38 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 3eee248..0e85901 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +*.pyc dpaste/settings_local.py dpaste.egg-info diff --git a/README.md b/README.md index f64f2d1..cfe4115 100644 --- a/README.md +++ b/README.md @@ -16,5 +16,5 @@ Testing ``` $ pip install -r requirements.txt $ pip install -e . -$ manage.py test dpaste +$ manage.py test dpaste ``` diff --git a/dpaste/templates/dpaste/about.html b/dpaste/templates/dpaste/about.html index 4a22b30..5b011df 100644 --- a/dpaste/templates/dpaste/about.html +++ b/dpaste/templates/dpaste/about.html @@ -47,16 +47,16 @@ {% endfor %} -
-
+
+

Imprint

Address:

- Martin Mahner
- Lauterbacher Str. 4
- DE-18581 Putbus
+ Martin Mahner
+ Lauterbacher Str. 4
+ DE-18581 Putbus
Germany

diff --git a/dpaste/templates/dpaste/base.html b/dpaste/templates/dpaste/base.html index 0c328ae..ec22962 100644 --- a/dpaste/templates/dpaste/base.html +++ b/dpaste/templates/dpaste/base.html @@ -2,8 +2,8 @@ dpaste.de: {% block title %}{% trans "New snippet" %}{% endblock %} - - + + {% block extrahead %}{% endblock %} @@ -30,15 +30,17 @@ {% block script_footer %} -
{% endif %} - +
diff --git a/dpaste/templates/dpaste/snippet_list.html b/dpaste/templates/dpaste/snippet_list.html index f36c061..21f33c1 100644 --- a/dpaste/templates/dpaste/snippet_list.html +++ b/dpaste/templates/dpaste/snippet_list.html @@ -13,7 +13,7 @@ {% include "dpaste/snippet_pre.html" %} - {% if not forloop.last %}
{% endif %} + {% if not forloop.last %}
{% endif %} {% empty %}

{% trans "No snippets saved. Either all your snippets are expired or your cookie has changed." %}

{% endfor %}