From ab7a4d3b99f0fd87a72b806680b7b89b40d6e1df Mon Sep 17 00:00:00 2001 From: root Date: Tue, 21 Aug 2018 10:43:37 +0000 Subject: [PATCH] cleanups --- camp/static/css/main.css | 5 +++++ content/models.py | 2 +- content/templates/event.html | 4 +++- content/templates/event_preview.html | 2 -- content/templates/index.html | 3 +++ content/templates/latest_content.html | 4 +++- content/templates/results.html | 2 ++ content/templates/section_index.html | 4 +++- 8 files changed, 20 insertions(+), 6 deletions(-) diff --git a/camp/static/css/main.css b/camp/static/css/main.css index 98b1cb3..4fa612b 100644 --- a/camp/static/css/main.css +++ b/camp/static/css/main.css @@ -193,3 +193,8 @@ label, button { button { background: #99999 !important; } + +p { + line-height: 1.3; +} + diff --git a/content/models.py b/content/models.py index a1a7c54..c99aa72 100644 --- a/content/models.py +++ b/content/models.py @@ -114,7 +114,7 @@ class Content(models.Model): if self.teaser: value = markdownify(self.teaser) elif self.header: - value = ox.strip_tags(ox.decode_html(markdownify(self.header)))[:100] + value = ox.sanitize_html(ox.decode_html(markdownify(self.header))) else: value = '' return mark_safe(value) diff --git a/content/templates/event.html b/content/templates/event.html index 81a01ed..6e661f4 100644 --- a/content/templates/event.html +++ b/content/templates/event.html @@ -16,7 +16,9 @@ {% include "event_preview.html" with events=past_events %} {% endif %} - more + All Events +
+
{% endblock %} diff --git a/content/templates/event_preview.html b/content/templates/event_preview.html index 3d1b3c4..25730ef 100644 --- a/content/templates/event_preview.html +++ b/content/templates/event_preview.html @@ -33,6 +33,4 @@ {% endif %} {% endfor %} -
-
diff --git a/content/templates/index.html b/content/templates/index.html index 17e501a..ba655f5 100644 --- a/content/templates/index.html +++ b/content/templates/index.html @@ -26,6 +26,9 @@ {% include "event_preview.html" with events=past_events %} {% endif %} + All Events +
+
{% endblock %} diff --git a/content/templates/latest_content.html b/content/templates/latest_content.html index 16b50fa..9bc7cb6 100644 --- a/content/templates/latest_content.html +++ b/content/templates/latest_content.html @@ -8,7 +8,9 @@ {% endfor %} {% with section|lower|add:'_list' as section_list %} {% if has_more_content %} - more + All {{ section }} +
+
{% endif %} {% endwith %} diff --git a/content/templates/results.html b/content/templates/results.html index 0e3f860..0bb56bb 100644 --- a/content/templates/results.html +++ b/content/templates/results.html @@ -27,6 +27,8 @@
{% if row.image_url %} + {% else %} +   {% endif %}
diff --git a/content/templates/section_index.html b/content/templates/section_index.html index 2380eee..b93becb 100644 --- a/content/templates/section_index.html +++ b/content/templates/section_index.html @@ -21,7 +21,9 @@
{% endfor %} {% if more_content %} - more + All {{ section }} +
+
{% endif %} {% endif %}