diff options
Diffstat (limited to 'themes/default/layouts/partials/expiry-date.html')
-rw-r--r-- | themes/default/layouts/partials/expiry-date.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/expiry-date.html b/themes/default/layouts/partials/expiry-date.html new file mode 100644 index 0000000..bf111f9 --- /dev/null +++ b/themes/default/layouts/partials/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> |