From e9ec93a471d9a753db01b682e75c52b32adf16f2 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Thu, 18 Feb 2021 21:44:01 +0100 Subject: use LoveIt theme, self hosted --- themes/LoveIt/layouts/posts/single.html | 101 ++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 themes/LoveIt/layouts/posts/single.html (limited to 'themes/LoveIt/layouts/posts/single.html') diff --git a/themes/LoveIt/layouts/posts/single.html b/themes/LoveIt/layouts/posts/single.html new file mode 100644 index 0000000..8f788a2 --- /dev/null +++ b/themes/LoveIt/layouts/posts/single.html @@ -0,0 +1,101 @@ +{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}} + +{{- define "content" -}} + {{- $params := .Scratch.Get "params" -}} + + {{- $toc := $params.toc -}} + {{- if eq $toc true -}} + {{- $toc = .Site.Params.page.toc | default dict -}} + {{- else if eq $toc false -}} + {{- $toc = dict "enable" false -}} + {{- end -}} + + {{- /* Auto TOC */ -}} + {{- if ne $toc.enable false -}} +
+

{{ T "contents" }}

+
+
+ {{- end -}} + +
+ {{- /* Title */ -}} +

{{ .Title }}

+ + {{- /* Subtitle */ -}} + {{- with $params.subtitle -}} +

{{ . }}

+ {{- end -}} + + {{- /* Meta */ -}} + + + {{- /* Featured image */ -}} + {{- $image := $params.featuredimage -}} + {{- with .Resources.GetMatch "featured-image" -}} + {{- $image = .RelPermalink -}} + {{- end -}} + {{- with $image -}} + + {{- end -}} + + {{- /* Static TOC */ -}} + {{- if ne $toc.enable false -}} +
+
+ {{ T "contents" }} + +
+
+ {{- dict "Content" .TableOfContents "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} +
+
+ {{- end -}} + + {{- /* Content */ -}} +
+ {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} +
+ + {{- /* Footer */ -}} + {{- partial "single/footer.html" . -}} + + {{- /* Comment */ -}} + {{- partial "comment.html" . -}} +
+{{- end -}} -- cgit v1.2.3