mirror of
https://github.com/zaaarf/friendenstein.git
synced 2024-11-22 15:34:50 +01:00
feat: date formatting
This commit is contained in:
parent
baab3e11b0
commit
cb64f9eb10
2 changed files with 13 additions and 3 deletions
|
@ -2,7 +2,12 @@
|
|||
|
||||
{% block content %}
|
||||
<div><a href="..">..</a>/<span class="metaData">{{ page.slug }}</span></div>
|
||||
<time datetime="{{ page.date }}">Published on: <span class="metaData">{{ page.date }}</span></time>
|
||||
{% if config.extra.date_format.post %}
|
||||
{% set datefmt = config.extra.date_format.post %}
|
||||
{% else %}
|
||||
{% set datefmt = "%Y-%m-%dT%H:%M:%S%Z" %}
|
||||
{% endif %}
|
||||
<time datetime="{{ page.date }}">Published on: <span class="metaData">{{ page.date | date(format=datefmt) }}</span></time>
|
||||
{% if config.extra.author and config.extra.display_author == true %}
|
||||
<address rel="author">By <span class="metaData">{{config.extra.author}}</span></address>
|
||||
{% endif %}
|
||||
|
|
|
@ -12,12 +12,17 @@
|
|||
{% endif %}
|
||||
|
||||
<ul class="titleList">
|
||||
{% if config.extra.date_format.list %}
|
||||
{% set datefmt = config.extra.date_format.list %}
|
||||
{% else %}
|
||||
{% set datefmt = "@ %Y-%m-%dT%H:%M:%S%Z" %}
|
||||
{% endif %}
|
||||
{% for page in pages %}
|
||||
<li><a href="{{ page.permalink | safe }}">{{ page.title }}{% if config.extra.show_date_paginator and config.extra.show_date_paginator == true %}<span class="contentDate"> @ {{ page.date }}</span>{% endif %}</a></li>
|
||||
<li><a href="{{ page.permalink | safe }}">{{ page.title }}{% if config.extra.show_date_paginator and config.extra.show_date_paginator == true %} <span class="contentDate">{{ page.date | date(format=datefmt) }}</span>{% endif %}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if paginator %}
|
||||
<div class="metaData">{% if paginator.previous %}<a href="{{ paginator.first }}">⥶</a> <a href="{{ paginator.previous }}"><</a>{% endif %} {{ paginator.current_index }} / {{ paginator.number_pagers }} {% if paginator.next %}<a href="{{ paginator.next }}"></a> <a href="{{ paginator.last }}"></a>{% endif %}</div>
|
||||
<div class="metaData">{% if paginator.previous %}<a href="{{ paginator.first }}">⥶</a> <a href="{{ paginator.previous }}"></a>{% endif %} {{ paginator.current_index }} / {{ paginator.number_pagers }} {% if paginator.next %}<a href="{{ paginator.next }}"></a> <a href="{{ paginator.last }}"></a>{% endif %}</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Reference in a new issue