diff options
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/docs/date.html | 6 | ||||
| -rw-r--r-- | layouts/partials/docs/post-meta.html | 16 |
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 }} |
