chiark / gitweb /
template: deduplicate article footer markup.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 7 Nov 2017 17:09:03 +0000 (18:09 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 7 Nov 2017 17:09:03 +0000 (18:09 +0100)
pelican-theme/templates/archives.html
pelican-theme/templates/article.html
pelican-theme/templates/article_footer.html
pelican-theme/templates/base_blog_section.html
pelican-theme/templates/index.html

index ded6964b9aec96767ecd3237c3d9f24924c13f75..bc7f0fd7ee1459cc79e6cba07e872b0a0ca37c3a 100644 (file)
 {{ article.content }}
 <!-- /content -->
         {% endif %}
-        {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
-        {{ footer()|indent(8) }}
+        <footer>
+          {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
+          {{ footer()|indent(10) }}
+        </footer>
         {% if not loop.first or articles_page.number != 1 %}
         <div class="m-clearfix-l"></div>
         {% endif %}
index febc2d2e5fbe1ca62dbab8ee91066912035391f1..c948f4e77f57e69531627e0ee7b6f13e86e60378 100644 (file)
@@ -69,7 +69,8 @@
     <footer class="m-container">
       <div class="m-row">
         <div class="m-col-m-10 m-push-m-1 m-nopadb">
-          <p>Posted {% if article.authors %}by {% for author in article.authors %}<a href="{{ author.url|format_siteurl }}">{{ author }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl }} ">{{ article.category }}</a>{% if article.modified %}; <span class="m-text m-success">updated <time datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time></span>{% endif %}.{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
+          {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
+          {{ footer()|indent(10) }}
         </div>
       </div>
     </footer>
 <!-- content -->
 {{ article.content -}}
 <!-- /content -->
-      {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
-      {{ footer()|indent(6) }}
+      <footer>
+        {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
+        {{ footer()|indent(8) }}
+      </footer>
     </article>
     {% endif %}
 {% endblock %}
index 3b1092066ba6eebef9e86641cd57c3bd805c51e1..077e2ebadc391ee983f330bb1d7fa01a4dbf7b21 100644 (file)
@@ -1,3 +1 @@
-<footer>
-  <p>Posted {% if article.authors %}by {% for author in article.authors %}<a href="{{ author.url|format_siteurl }}">{{ author }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl }} ">{{ article.category }}</a>{% if article.modified %}; <span class="m-text m-success">updated <time datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time></span>{% endif %}.{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
-</footer>
+<p>Posted {% if article.authors %}by {% for author in article.authors %}<a href="{{ author.url|format_siteurl }}">{{ author }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl }} ">{{ article.category }}</a>{% if article.modified %}; <span class="m-text m-success">updated <time datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time></span>{% endif %}.{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
index 8072d378badda068d41d903cf67fe56061aaadc8..142b5dd8291f9f4ae6578a7f713e45252b7b2d1b 100644 (file)
       <article>
         {% macro header() %}{% include "article_header.html" %}{% endmacro %}
         {{ header()|indent(8) }}
-        {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
-        {{ footer()|indent(8) }}
+        <footer>
+          {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
+          {{ footer()|indent(10) }}
+        </footer>
       </article>
       {% endfor %}
       {% if articles_page.has_other_pages() %}
index ded6964b9aec96767ecd3237c3d9f24924c13f75..bc7f0fd7ee1459cc79e6cba07e872b0a0ca37c3a 100644 (file)
 {{ article.content }}
 <!-- /content -->
         {% endif %}
-        {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
-        {{ footer()|indent(8) }}
+        <footer>
+          {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
+          {{ footer()|indent(10) }}
+        </footer>
         {% if not loop.first or articles_page.number != 1 %}
         <div class="m-clearfix-l"></div>
         {% endif %}