From 3aa06d30e0f5cbe9430935d7af6bb42856c56890 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Fri, 1 Sep 2017 18:57:06 +0200 Subject: [PATCH] 100% vanilla JS now. --- dpaste/static/dpaste/theme.css | 6 +- dpaste/templates/dpaste/base.html | 25 ++++ dpaste/templates/dpaste/highlight/code.html | 2 +- dpaste/templates/dpaste/snippet_details.html | 113 ++++++------------- dpaste/templates/dpaste/snippet_form.html | 24 ---- 5 files changed, 65 insertions(+), 105 deletions(-) diff --git a/dpaste/static/dpaste/theme.css b/dpaste/static/dpaste/theme.css index ddf08c5..a1b4f83 100644 --- a/dpaste/static/dpaste/theme.css +++ b/dpaste/static/dpaste/theme.css @@ -137,12 +137,12 @@ h1, h2, h3, h4 { margin-top: 30px; } -.snippet-reply-hidden { +.snippet-reply[data-hidden=yes] { opacity: 0.3; } -.snippet-reply-hidden, -.snippet-reply-hidden *{ +.snippet-reply[data-hidden=yes], +.snippet-reply[data-hidden=yes] *{ cursor: pointer; } diff --git a/dpaste/templates/dpaste/base.html b/dpaste/templates/dpaste/base.html index 37e16b2..f4b7687 100644 --- a/dpaste/templates/dpaste/base.html +++ b/dpaste/templates/dpaste/base.html @@ -27,5 +27,30 @@ PAGE MISSING {% endblock %} + +{% block script_footer %} + +{% endblock %} + diff --git a/dpaste/templates/dpaste/highlight/code.html b/dpaste/templates/dpaste/highlight/code.html index 4c9ef72..7138c90 100644 --- a/dpaste/templates/dpaste/highlight/code.html +++ b/dpaste/templates/dpaste/highlight/code.html @@ -1 +1 @@ -
    {% for line in highlighted %}
  1. {{ line|safe|default:" " }}
  2. {% endfor %}
+
    {% for line in highlighted %}
  1. {{ line|safe|default:" " }}
  2. {% endfor %}
diff --git a/dpaste/templates/dpaste/snippet_details.html b/dpaste/templates/dpaste/snippet_details.html index db1d6e7..02d2f39 100644 --- a/dpaste/templates/dpaste/snippet_details.html +++ b/dpaste/templates/dpaste/snippet_details.html @@ -77,7 +77,7 @@ -
+

{% trans "Reply to this snippet" %} →

{% include "dpaste/snippet_form.html" %}
@@ -87,86 +87,45 @@ {% block script_footer %} {{ block.super }} {% endblock %} diff --git a/dpaste/templates/dpaste/snippet_form.html b/dpaste/templates/dpaste/snippet_form.html index 8ead12a..6898ddf 100644 --- a/dpaste/templates/dpaste/snippet_form.html +++ b/dpaste/templates/dpaste/snippet_form.html @@ -38,27 +38,3 @@ ⌘+⏎ {% trans "or" %} Ctrl+⏎
- -{% block script_footer %} - -{% endblock %}