changeset 344:e982a05d43b1

blog/item, css: fix `white-space` for text content
author Goffi <goffi@goffi.org>
date Thu, 21 Oct 2021 17:19:39 +0200
parents d28816a65b7f
children 9cf56f9a1537
files sat_templates/templates/bulma/blog/item.html sat_templates/templates/bulma/static/styles.css
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/bulma/blog/item.html	Fri Oct 15 18:02:51 2021 +0200
+++ b/sat_templates/templates/bulma/blog/item.html	Thu Oct 21 17:19:39 2021 +0200
@@ -58,9 +58,13 @@
                         </small>
                     {% endif %}
                 </p>
-                <p>
-                    {{- item.content_xhtml|safe if item.content_xhtml is defined else item.content|urlize -}}
-                </p>
+                {% if item.content_xhtml is defined %}
+                    {{item.content_xhtml|safe}}
+                {% else %}
+                    <p class="is-text-content">
+                        {{- item.content|urlize -}}
+                    </p>
+                {% endif %}
                 {% for comments_data in item.comments %}
                     {% for item in comments_data['items'] %}
                         {% include 'blog/item.html' %}
--- a/sat_templates/templates/bulma/static/styles.css	Fri Oct 15 18:02:51 2021 +0200
+++ b/sat_templates/templates/bulma/static/styles.css	Thu Oct 21 17:19:39 2021 +0200
@@ -102,6 +102,11 @@
     border: 0 !important;
 }
 
+.is-text-content {
+    white-space: break-spaces;
+}
+
+
 a.is-wrapping {
     line-height: 0;
 }