~xdavidwu/xdavidwu.link

ec56bf91fe9b72e7aa9b9d571b01bc58316dea04 — Lars Olesen 4 years ago 7eb39a8
Move page date to own file (#2544)

2 files changed, 6 insertions(+), 5 deletions(-)

A _includes/page__date.html
M _layouts/single.html
A _includes/page__date.html => _includes/page__date.html +5 -0
@@ 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 %}

M _layouts/single.html => _layouts/single.html +1 -5
@@ 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 %}