summaryrefslogtreecommitdiff
path: root/themes/new_theme/layouts/partials/post_meta/date.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/new_theme/layouts/partials/post_meta/date.html')
-rw-r--r--themes/new_theme/layouts/partials/post_meta/date.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/themes/new_theme/layouts/partials/post_meta/date.html b/themes/new_theme/layouts/partials/post_meta/date.html
new file mode 100644
index 0000000..24a6c32
--- /dev/null
+++ b/themes/new_theme/layouts/partials/post_meta/date.html
@@ -0,0 +1,13 @@
+{{- if not .Date.IsZero }}
+<div class="meta__item-datetime meta__item">
+ {{ partial "svg/time.svg" (dict "class" "meta__icon") -}}
+ <time class="meta__text" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
+ {{- .Date.Format (.Site.Params.dateformat | default "January 02, 2006") -}}
+ </time>
+ {{- if ne .Date .Lastmod }}
+ <time class="meta__text" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">(
+ {{- T "meta_lastmod" }}: {{ .Lastmod.Format (.Site.Params.dateformat | default "January 02, 2006") -}}
+ )</time>
+ {{- end -}}
+</div>
+{{- end }} \ No newline at end of file