Skip to content

Commit

Permalink
Move page date to own file (mmistakes#2544)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsolesen authored Jun 3, 2020
1 parent 3be5b52 commit 5b5ccab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions _includes/page__date.html
Original file line number Diff line number Diff line change
@@ -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 %}
6 changes: 1 addition & 5 deletions _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@
<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 %}
Expand Down

0 comments on commit 5b5ccab

Please sign in to comment.