commit bb9da4a94534272b2c1a734ae7740aef4bddbf45
parent b179fabe6e9f1fe0ea1562cca43240627ee6d80b
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Tue, 26 Jul 2022 22:42:47 -0500
Give no timestamp a symbol
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -3,10 +3,12 @@
<header>
<nav>
<span class="menu">
- {{ $timestamp := .Date.Format "2006-01-02T15:04:05Z07:00" }}
<a class="entry u-url" href="{{ .RelPermalink }}">
- <time class="dt-published" datetime="{{ $timestamp }}">{{- $timestamp -}}
- </time></a>
+ {{- if (eq .Params.date nil) }}∅{{ else -}}
+ {{- $timestamp := .Date.Format "2006-01-02T15:04:05Z07:00" -}}
+ <time class="dt-published" datetime="{{ $timestamp }}">{{ $timestamp }}</time>
+ {{- end -}}
+ </a>
{{ partial "language.html" . }}
</span>
<a class="menu-right u-author" href="{{ "/" | relLangURL }}">⏎</a>