summaryrefslogtreecommitdiff
path: root/themes/new_theme/layouts/partials/post_meta
diff options
context:
space:
mode:
Diffstat (limited to 'themes/new_theme/layouts/partials/post_meta')
-rw-r--r--themes/new_theme/layouts/partials/post_meta/author.html6
-rw-r--r--themes/new_theme/layouts/partials/post_meta/categories.html16
-rw-r--r--themes/new_theme/layouts/partials/post_meta/date.html13
-rw-r--r--themes/new_theme/layouts/partials/post_meta/translations.html10
4 files changed, 45 insertions, 0 deletions
diff --git a/themes/new_theme/layouts/partials/post_meta/author.html b/themes/new_theme/layouts/partials/post_meta/author.html
new file mode 100644
index 0000000..0ee0fc9
--- /dev/null
+++ b/themes/new_theme/layouts/partials/post_meta/author.html
@@ -0,0 +1,6 @@
+{{- if .Site.Author.name -}}
+<div class="meta__item-author meta__item">
+ {{ partial "svg/author.svg" (dict "class" "meta__icon") -}}
+ <span class="meta__text">{{ .Site.Author.name }}</span>
+</div>
+{{- end -}} \ No newline at end of file
diff --git a/themes/new_theme/layouts/partials/post_meta/categories.html b/themes/new_theme/layouts/partials/post_meta/categories.html
new file mode 100644
index 0000000..8ab4202
--- /dev/null
+++ b/themes/new_theme/layouts/partials/post_meta/categories.html
@@ -0,0 +1,16 @@
+{{- $taxo := "categories" -}}
+{{- with .Param $taxo -}}
+<div class="meta__item-categories meta__item">
+ {{- partial "svg/category.svg" (dict "class" "meta__icon") -}}
+ <span class="meta__text">
+ {{- range $index, $category := . }}
+ {{- $url := urls.Parse ($category | urlize) -}}
+ {{- $path := $url.Path -}}
+ {{- with $.Site.GetPage (printf "/%s/%s" $taxo $path) }}
+ {{- if gt $index 0 }}, {{ end -}}
+ <a class="meta__link" href="{{ .RelPermalink }}" rel="category">{{ .Title }}</a>
+ {{- end }}
+ {{- end }}
+ </span>
+</div>
+{{- end }} \ No newline at end of file
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
diff --git a/themes/new_theme/layouts/partials/post_meta/translations.html b/themes/new_theme/layouts/partials/post_meta/translations.html
new file mode 100644
index 0000000..34d1172
--- /dev/null
+++ b/themes/new_theme/layouts/partials/post_meta/translations.html
@@ -0,0 +1,10 @@
+{{- if .IsTranslated }}
+<div class="meta__item-translations meta__item">
+ <span class="meta__text">
+ {{- T "meta_translations" }}: {{ range $index, $translation := .Translations }}
+ {{- if gt $index 0 }}, {{ end -}}
+ <a class="meta__link" href="{{ .RelPermalink }}">{{ .Lang | upper }}</a>
+ {{- end }}
+ </span>
+</div>
+{{- end }} \ No newline at end of file