summaryrefslogtreecommitdiff
path: root/layouts/partials/docs
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/docs')
-rw-r--r--layouts/partials/docs/date.html6
-rw-r--r--layouts/partials/docs/post-meta.html16
2 files changed, 22 insertions, 0 deletions
diff --git a/layouts/partials/docs/date.html b/layouts/partials/docs/date.html
new file mode 100644
index 0000000..d33cdbe
--- /dev/null
+++ b/layouts/partials/docs/date.html
@@ -0,0 +1,6 @@
+<!--
+ Returns formatted date.
+ Usage: partial "docs/date" (dict "Date" .Date "Format" .Site.Params.BookDateFormat)
+-->
+{{- $format := default "January 2, 2006" .Format -}}
+{{- return (time.Format $format .Date | lower ) -}}
diff --git a/layouts/partials/docs/post-meta.html b/layouts/partials/docs/post-meta.html
new file mode 100644
index 0000000..f111ce8
--- /dev/null
+++ b/layouts/partials/docs/post-meta.html
@@ -0,0 +1,16 @@
+{{ with .Date }}
+ <div class="flex align-center text-small book-post-date">
+ <img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon " alt="" />
+ <span>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}</span>
+ </div>
+{{ end }}
+
+{{ range $taxonomy, $_ := .Site.Taxonomies }}
+ {{ with $terms := $.GetTerms $taxonomy }}
+ <div class="text-small">
+ {{ range $n, $term := $terms }}{{ if $n }}, {{ end }}
+ <a href="{{ $term.RelPermalink }}">{{ $term.Title | lower }}</a>
+ {{- end }}
+ </div>
+ {{ end }}
+{{ end }}
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.