diff options
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/page/single.html | 13 | ||||
| -rw-r--r-- | layouts/partials/post-class.html | 8 | ||||
| -rw-r--r-- | layouts/partials/post-meta.html | 9 |
3 files changed, 21 insertions, 9 deletions
diff --git a/layouts/partials/page/single.html b/layouts/partials/page/single.html new file mode 100644 index 0000000..ca1180d --- /dev/null +++ b/layouts/partials/page/single.html @@ -0,0 +1,13 @@ +{{ define "main" }} +<article class="{{ partial "post-class.html" . }}" role="document" id="page-{{ .File.TranslationBaseName | lower }}"{{ with .Params.lang}} lang="{{ . }}"{{ end }}> + <header> + <h1 class="page-title"> + {{ .Params.caption | default .Title }} + </h1> + </header> + + <div class="page-body"> + {{ .Content }} + </div> +</article> +{{ end }} diff --git a/layouts/partials/post-class.html b/layouts/partials/post-class.html new file mode 100644 index 0000000..1d32a8a --- /dev/null +++ b/layouts/partials/post-class.html @@ -0,0 +1,8 @@ +{{- $postClass := "page" -}} +{{- if .IsPage -}} + {{- $postClass = .Type | lower | singularize -}} + {{- if eq $postClass "poem" -}} + {{- $postClass = "poem poetry" -}} + {{- end -}} +{{- end -}} +{{- $postClass -}} diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html deleted file mode 100644 index 19c3ce6..0000000 --- a/layouts/partials/post-meta.html +++ /dev/null @@ -1,9 +0,0 @@ -<div class="post-meta"> - {{- $root := . -}} - {{- with .Param "postMeta" -}} - {{- range $field := . -}} - {{- $p := printf "post-meta/%s.html" $field -}} - {{- partial $p $root -}} - {{- end -}} - {{- end -}} -</div> |
