chiark / gitweb /
theme: indenting content is *wrong*.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 23 Aug 2017 15:44:13 +0000 (17:44 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 23 Aug 2017 15:52:20 +0000 (17:52 +0200)
Because the indentation (obviously) affects stuff inside <pre> tags. All
page/article content is now unindented and wrapped in a HTML comment to
make it better visible in the source.

I don't expect article summaries to have <pre> tags inside, so that's a
non-issue.

pelican-theme/templates/archives.html
pelican-theme/templates/article.html
pelican-theme/templates/page.html

index 37a768252cbdf20689b8adf94e6448610830a6ac..638486b403c2eb9df944c9f3038c00c62b0b2add 100644 (file)
@@ -9,7 +9,9 @@
         {{ header()|indent(8) }}
         {% if loop.first and articles_page.number == 1 %}
         <div class="m-clearfix-l"></div>
-        {{ article.content|indent(8) }}
+<!-- content -->
+{{ article.content }}
+<!-- /content -->
         {% endif %}
         {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
         {{ footer()|indent(8) }}
index 7d0956b45dc98f5229e6499a565c18370680c020..23c919dd59bca6255fc7a5596991de6c388828c4 100644 (file)
@@ -52,7 +52,9 @@
       <div class="m-container m-nopady" id="m-container-inflatable">
         <div class="m-row">
           <div class="m-col-m-10 m-push-m-1 m-nopady">
-          {{ article.content }}
+<!-- content -->
+{{ article.content }}
+<!-- /content -->
           </div>
         </div>
       </div>
@@ -69,7 +71,9 @@
       {% macro header() %}{% include "article_header.html" %}{% endmacro %}
       {{ header()|indent(6) }}
       <div class="m-clearfix-l"></div>
-      {{ article.content|indent(6) }}
+<!-- content -->
+{{ article.content }}
+<!-- /content -->
       {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
       {{ footer()|indent(6) }}
     </article>
index 19d756f9a366cb8d62673d48b9e4243fdf0471ef..00dde70f78d511e267fd7e94640ed20a3addaa3b 100644 (file)
@@ -15,7 +15,9 @@
   <div class="m-row">
     <div class="m-col-l-10 m-push-l-1">
       <h1>{{ page.title }}</h1>
-      {{ page.content|indent(6) }}
+<!-- content -->
+{{ page.content }}
+<!-- /content -->
     </div>
   </div>
 </article>