fix: timestamp for programmatically updated + now pages
This commit is contained in:
parent
b50a4670d2
commit
16eb58fe0f
4 changed files with 15 additions and 8 deletions
|
@ -1,7 +1,14 @@
|
|||
---
|
||||
layout: base
|
||||
---
|
||||
{%- capture updateTime -%}
|
||||
{% if updated == "now" %}
|
||||
{{ 'now' | date: "%B %-d, %l:%M %P", "America/Los_Angeles" }}
|
||||
{% elsif page.updated %}
|
||||
{{ page.updated | date: "%B %-d, %l:%M %P", "America/Los_Angeles" }}
|
||||
{% endif %}
|
||||
{%- endcapture -%}
|
||||
<div class="main-wrapper">
|
||||
<main>{{ content }}</main>
|
||||
{% render "partials/footer.liquid", page:page, nav:nav, updated:page.updated %}
|
||||
{% render "partials/footer.liquid", page:page, nav:nav, updated:updateTime %}
|
||||
</div>
|
|
@ -1,6 +1,6 @@
|
|||
<footer{% unless updated %} style="margin-top:var(--sizing-3xl)"{% endunless %}>
|
||||
{% if updated %}
|
||||
<p class="explainer text-small text-centered"><em>This page was last updated on {{ updated | date: "%B %-d, %-I:%M%p", "America/Los_Angeles" }}.</em></p>
|
||||
<p class="explainer text-small text-centered"><em>This page was last updated on {{ updated | strip }}.</em></p>
|
||||
{% endif %}
|
||||
<nav aria-label="Social icons" class="social flex-centered justify-centered text-centered">
|
||||
{% for link in nav.footer_icons %}
|
||||
|
|
Reference in a new issue