From 77abe560c676aeb7c0cc31a9433cafad15fc3457 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 24 Sep 2020 09:02:59 +0000 Subject: [PATCH] if subtitle is None, it will be replacedwith a no-break space. --- fet2020/templates/home.html | 17 ++- .../templates/posts/partials/_posts_hero.html | 7 +- fet2020/templates/posts/show.html | 111 +++++++++--------- 3 files changed, 64 insertions(+), 71 deletions(-) diff --git a/fet2020/templates/home.html b/fet2020/templates/home.html index 61749880..1ec98047 100644 --- a/fet2020/templates/home.html +++ b/fet2020/templates/home.html @@ -8,17 +8,17 @@
{% with post=featured_post %} - -
-

Neuigkeiten

{% with post=featured_post %} {% include 'posts/partials/_article_row.html' %} - {% endwith %} + {% endwith %} {% for post in featured_meeting %} {% include 'posts/partials/_meeting_row.html' %} - {% endfor %} + {% endfor %}
-
@@ -46,7 +44,6 @@ {{ tags_list|tags_to_url }} -
{% for post in posts %} diff --git a/fet2020/templates/posts/partials/_posts_hero.html b/fet2020/templates/posts/partials/_posts_hero.html index fa2d7843..54e98043 100644 --- a/fet2020/templates/posts/partials/_posts_hero.html +++ b/fet2020/templates/posts/partials/_posts_hero.html @@ -1,8 +1,9 @@ -
+
-

{{post.title}}

-

{{post.subtitle}}

{{post}} +

{{ post.title }}

+

{{ post.subtitle|default_if_none:" " }}

+ {{ post }}
\ No newline at end of file diff --git a/fet2020/templates/posts/show.html b/fet2020/templates/posts/show.html index 7c18c9de..4394a2f0 100644 --- a/fet2020/templates/posts/show.html +++ b/fet2020/templates/posts/show.html @@ -1,39 +1,34 @@ - {% extends "layout.html" %} {% load post_helpers %} {% load admin_urls %} {% block content %} -
+
-

{{post.title |tags_to_url}}

+

{{ post.title|tags_to_url }}

- {{post.subtitle |tags_to_url}} + {{ post.subtitle|default_if_none:" "|tags_to_url }} - {% if post.author %} - - {% else %} - - {% endif %} - -
+ {% if post.author %} + + {% else %} + + {% endif %} +
@@ -41,48 +36,48 @@
-

{{post.title | tags_to_url}}

- {{post.subtitle | tags_to_url}} +

{{ post.title|tags_to_url }}

+ {{ post.subtitle|default_if_none:" "|tags_to_url }} +
Nächster Artikel
- -
- {% include 'posts/partials/_date_box.html' %} +
+ {% include 'posts/partials/_date_box.html' %} +
+ + Start: {{ post.event_start }}
+ Ende: {{ post.event_end }}
+ + {% if post.has_agenda %} + Agenda
+ {% endif %} + + {% if post.has_protocol %} + Protokoll + {% endif %} + + {% if request.user.is_authenticated %} +
------
+ Bearbeiten + {% endif %} + +
+ {% for tag in post.get_tagnames %} + {{ tag|tags_to_url }} + {% endfor %} + +
+ {% if post.has_agenda %} +

Agenda

+ {{ post.agenda_html|safe }} + {% endif %} + + {{ post.body|safe|add_internal_links|tags_to_url }} +
- - Start: {{post.event_start}}
- Ende: {{post.event_end}}
- - {% if post.has_agenda %} - Agenda
- {% endif %} - - {% if post.has_protocol %} - Protokoll - {% endif %} - - {% if request.user.is_authenticated %} -
------
- Bearbeiten - {% endif %} - -
- {% for tag in post.get_tagnames %} - {{tag |tags_to_url}} - {% endfor %} - -
- {% if post.has_agenda %} -

Agenda

- {{post.agenda_html |safe}} - {% endif %} - - {{post.body | safe | add_internal_links | tags_to_url}} -
-
-
+
{% for post in related_posts %}