From eba0ca313377e8ba30e4d9129210b5dd931b9170 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 18 Jul 2021 11:43:59 +0200 Subject: [PATCH] split episode text on
, to allow for long and extensive texts --- panikweb_esperanzah/esperanzah_db_settings.py | 2 ++ panikweb_esperanzah/static/css/_specifics.scss | 17 +++++++++++++---- .../templates/emissions/episode_detail.html | 15 ++++++++++++--- .../templates/feed/soundfile.html | 2 +- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/panikweb_esperanzah/esperanzah_db_settings.py b/panikweb_esperanzah/esperanzah_db_settings.py index ab88fff..b7e9fd0 100644 --- a/panikweb_esperanzah/esperanzah_db_settings.py +++ b/panikweb_esperanzah/esperanzah_db_settings.py @@ -22,3 +22,5 @@ COMBO_PUBLIC_TEMPLATES = { }, }, } + +CKEDITOR_CONFIGS['default']['toolbar_Own'][1].append('HorizontalRule') diff --git a/panikweb_esperanzah/static/css/_specifics.scss b/panikweb_esperanzah/static/css/_specifics.scss index 25c6586..37e2947 100644 --- a/panikweb_esperanzah/static/css/_specifics.scss +++ b/panikweb_esperanzah/static/css/_specifics.scss @@ -2203,11 +2203,15 @@ div.emission-detail { } div.episode-info { position: relative; + div.episode-text { + display: flex; + flex-direction: column; + min-height: 450px; + justify-content: space-between, + } div.sound { - position: absolute; - bottom: -3px; - right: 0; - width: 540px; + align-self: flex-end; + width: 100%; @media screen and (max-width: $size_m) { position: static; width: 100%; @@ -2219,6 +2223,11 @@ div.emission-detail { text-transform: none; } } + div.more-text { + @extend %text; + max-width: 50em; + margin: 2em auto; + } } } diff --git a/panikweb_esperanzah/templates/emissions/episode_detail.html b/panikweb_esperanzah/templates/emissions/episode_detail.html index 4e11e99..5245920 100644 --- a/panikweb_esperanzah/templates/emissions/episode_detail.html +++ b/panikweb_esperanzah/templates/emissions/episode_detail.html @@ -54,19 +54,28 @@ {% endthumbnail %} -
+ {% with parts=episode.text|safe|hr_split %} +
+
{% if episode.subtitle %}

{{ episode.subtitle }}

{% endif %} - {{ episode.text|safe}} + {{ parts|first|safe}}
{% if episode.main_sound %} -
{% audio sound=episode.main_sound %}
{% endif %} +
+ + {% if parts|length > 1 %} +
+ {{ parts|last|safe }} +
+ {% endif %} + {% endwith %}
diff --git a/panikweb_esperanzah/templates/feed/soundfile.html b/panikweb_esperanzah/templates/feed/soundfile.html index 866e6be..74d6359 100644 --- a/panikweb_esperanzah/templates/feed/soundfile.html +++ b/panikweb_esperanzah/templates/feed/soundfile.html @@ -10,5 +10,5 @@ {% endif %} {% autoescape off %} -{{ obj.episode.text|set_absolute_urls }} +{{ obj.episode.text|hr_split|first|xml_illegal_fix|set_absolute_urls }} {% endautoescape %} -- 2.39.2