diff --git a/theme/templates/page.html b/theme/templates/page.html index 3cb21e497c336efac943ae0394e6c81658cfbeaa..1bc0fdbbbe98efd986b840aabedfbf7fa64af02d 100644 --- a/theme/templates/page.html +++ b/theme/templates/page.html @@ -1,11 +1,5 @@ {% extends "base.html" %} -{%- macro page_translation_link(translation, is_current=False) -%} -<a href="{{ siteurl }}/{{ translation.url }}" hreflang="{{ translation.lang }}" title="{{ l[translation.lang].langname|e }}"> - <img alt="{{ l[translation.lang].langname|e }}" src="{{ siteurl }}/{{ THEME_STATIC_DIR }}/images/flags/{{ translation.lang }}.svg"> -</a> -{%- endmacro -%} - {% block html_lang %}{{ page.lang }}{% endblock %} {% block title %}{{ page.title|striptags }}{% endblock %} @@ -38,43 +32,67 @@ {% endblock %} {% block page_footer %} <footer> - {%- if page.authors -%} - <address> + <div> {{ t[l].page.authors_prefix }} + <ul> {% for author in page.authors %} - <a href="{{ siteurl }}/{{ author.url }}">{{ author }}</a> + <li> {{ author.name|e }} </li> {% endfor %} + </ul> {{ t[l].page.authors_suffix }} - </address> - {%- endif -%} - - <span>{{ t[l].page.published_prefix }} - <abbr title="{{ page.date_created.isoformat() }}"> - {{ page.date_created.isoformat() }} - </abbr>{{ t[l].page.published_suffix }}</span> + </div> + + <div> + {{ t[l].page.published_prefix }} + <abbr title="{{ page.date_created.isoformat() }}"> + {{ page.date_created.isoformat() }} + </abbr> + {{ t[l].page.published_suffix }} + </div> + + <div>{{ t[l].page.modified_prefix }} + <abbr title="{{ page.date_modified.isoformat() }}"> + {{ page.date_modified.isoformat() }} + </abbr> + {{ t[l].page.modified_suffix }} + </div> + + <div> + {{ t[l].page.category_prefix }} + {{ link.render_tag(page.category,l) }} + {{ t[l].page.category_suffix }} + </div> + + <div> + {{ t[l].page.tags_prefix }} + <ul> + {% for tag in page.tags %} + <li> + {{ link.render_tag(tag,l) }} + </li> + {% endfor %} + </ul> + {{ t[l].page.tags_suffix }} + </div> + + <div> + {{ t[l].page.languages_prefix }} + <ul class="languages"> + {%- for tlang in t['supported'] -%} + <li> + {{ link.render(['slug',page.slug,tlang]|join(':'),t[tlang]['langname'],l) }} + </li> + {%- endfor -%} + </ul> + {{ t[l].page.languages_suffix }} + </div> - {%- if page.modified -%} - <br /> - <span>{{ t[l].page.modified_prefix }} - <abbr title="{{ page.modified.isoformat() }}">{{ page.locale_modified }}</abbr> - {{ t[l].page.modified_suffix }}</span> - {%- endif -%} + <div> + {{ t[l].page.slug_prefix }} + <code>{{ page.slug|e }}</code> + {{ t[l].page.slug_suffix }} + </div> - <br /> - {#<span>{{ t[l].page.category_prefix }}<a href="{{ siteurl }}/{{ page.category.url }}">{{ page.category }}</a>{{ t[l].page.category_suffix }}</span>#} - <br /> - <span>{{ t[l].page.languages_prefix }}</span> - {#<ul class="languages"> - {%- for translation in page.translations -%} - <li> - {{ page_translation_link(translation) }} - </li> - {%- endfor -%} - <li> - {{ page_translation_link(page, True) }} - </li> - </ul>#} - {{ t[l].page.languages_suffix }} </footer> {% endblock %} </article>