diff options
author | tdro <tdro@noreply.example.com> | 2022-05-25 23:45:46 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-05-25 23:45:46 -0400 |
commit | 96b2d6ba409f8195f1d89f7dce4986a7d9837976 (patch) | |
tree | e9d3c2c32fcb163f3f3dba5af1d82c8977ac75bc /themes/default/layouts/partials/meta-expiry-date.html | |
parent | f2fb20b91c465d5cdacbbbbc1dc87055e20cc281 (diff) | |
download | canory-96b2d6ba409f8195f1d89f7dce4986a7d9837976.tar.gz canory-96b2d6ba409f8195f1d89f7dce4986a7d9837976.tar.bz2 canory-96b2d6ba409f8195f1d89f7dce4986a7d9837976.zip |
themes/default/layouts/_default/summary: Collect feed metadata
Namespace summary metadata partials. Add metadata to generated markdown.
Diffstat (limited to 'themes/default/layouts/partials/meta-expiry-date.html')
-rw-r--r-- | themes/default/layouts/partials/meta-expiry-date.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/meta-expiry-date.html b/themes/default/layouts/partials/meta-expiry-date.html new file mode 100644 index 0000000..bf111f9 --- /dev/null +++ b/themes/default/layouts/partials/meta-expiry-date.html @@ -0,0 +1,11 @@ +{{ $diff := now.Sub .ExpiryDate }} +{{ $duration := lang.FormatNumberCustom 0 (math.Round (mul (div $diff.Hours 24) -1)) }} + +<expiry-date> + <time + datetime= "{{ .ExpiryDate | time.Format "2006-01-02T15:04:05Z" }}" + title="Self destructs within {{ $duration }} days ({{ .ExpiryDate | time.Format "Monday, January 2 2006 at 15:04:05 MST" }})"> + {{ safeHTML (readFile "static/icons/feather/trash-2.svg") }} + {{ .ExpiryDate | time.Format "Jan 2 2006" }} + </time> +</expiry-date> |