]> git.0d.be Git - panikweb-esperanzah.git/commitdiff
split episode text on <hr>, to allow for long and extensive texts
authorFrédéric Péters <fpeters@0d.be>
Sun, 18 Jul 2021 09:43:59 +0000 (11:43 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 18 Jul 2021 09:50:30 +0000 (11:50 +0200)
panikweb_esperanzah/esperanzah_db_settings.py
panikweb_esperanzah/static/css/_specifics.scss
panikweb_esperanzah/templates/emissions/episode_detail.html
panikweb_esperanzah/templates/feed/soundfile.html

index ab88fff9bf40938b20a829d64d07e9b1503156bd..b7e9fd080c13b2aac5115d6cfae47704cc085043 100644 (file)
@@ -22,3 +22,5 @@ COMBO_PUBLIC_TEMPLATES = {
         },
     },
 }
+
+CKEDITOR_CONFIGS['default']['toolbar_Own'][1].append('HorizontalRule')
index 25c65864ed6e8b5205f94671df6ddd6602dc494e..37e2947ccf159437c68ec4b8782744a5ca500984 100644 (file)
@@ -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;
+               }
        }
 }
 
index 4e11e991b1cec4e6c97ea87b87c123a576163ba7..52459207511c9fb1d7459c3c1ed8dd25c55cc432 100644 (file)
                        {% endthumbnail %}
                         </div>
                </div>
-                <div class="emission-text">
+                {% with parts=episode.text|safe|hr_split %}
+                <div class="emission-text episode-text">
+                <div class="text-part">
                {% if episode.subtitle %}
                <h3 class="episode-subtitle">{{ episode.subtitle }}</h3>
                {% endif %}
-               {{ episode.text|safe}}
+               {{ parts|first|safe}}
                 </div>
 
                 {% if episode.main_sound %}
-                        <br style="clear: both">
                         <div class="sound">
                                 {% audio sound=episode.main_sound %}
                         </div>
                 {% endif %}
+                </div>
+
+                {% if parts|length > 1 %}
+                <div class="more-text">
+                  {{ parts|last|safe }}
+                </div>
+                {% endif %}
+                {% endwith %}
        </div>
 
 </div>
index 866e6be7221865bfaa2e01f42e8d8b3d0eacaecb..74d6359a6733dc5c54e8930882efe5302ee4992b 100644 (file)
@@ -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 %}