Move page date to own file (#2544)
This commit is contained in:
parent
da2035c1ff
commit
875dbdefb8
2 changed files with 6 additions and 5 deletions
5
_includes/page__date.html
Normal file
5
_includes/page__date.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% if page.last_modified_at %}
|
||||
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: "%B %-d, %Y" }}</time></p>
|
||||
{% elsif page.date %}
|
||||
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %-d, %Y" }}</time></p>
|
||||
{% endif %}
|
|
@ -51,11 +51,7 @@ layout: default
|
|||
<h4 class="page__meta-title">{{ site.data.ui-text[site.locale].meta_label }}</h4>
|
||||
{% endif %}
|
||||
{% include page__taxonomy.html %}
|
||||
{% if page.last_modified_at %}
|
||||
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: "%B %-d, %Y" }}</time></p>
|
||||
{% elsif page.date %}
|
||||
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %-d, %Y" }}</time></p>
|
||||
{% endif %}
|
||||
{% include page__date.html %}
|
||||
</footer>
|
||||
|
||||
{% if page.share %}{% include social-share.html %}{% endif %}
|
||||
|
|
Loading…
Reference in a new issue