From c0d248d18c4d2a8921ef59377c26382abbffe8c3 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 16 Aug 2022 01:21:02 +0200 Subject: Update hugo framework --- layouts/partials/footer.html | 10 ++++++++++ layouts/partials/header.html | 21 +++++++++++++++++++++ layouts/partials/nav.html | 8 ++++++++ layouts/partials/nextprev.html | 10 ++++++++++ layouts/partials/taglist.html | 13 +++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/nav.html create mode 100644 layouts/partials/nextprev.html create mode 100644 layouts/partials/taglist.html (limited to 'layouts/partials') diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..3d1282e --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,10 @@ + + + + + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..f304fde --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,21 @@ + + + + {{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }} + + + + {{ with .Site.Params.favicon }} + {{ end -}} + + {{ if isset .Params "tags" }} + {{ end -}} + + + + + +{{- if .Site.Menus.main }} +{{ partial "nav.html" . }} +{{ end }} +
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..a7318fe --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,8 @@ + diff --git a/layouts/partials/nextprev.html b/layouts/partials/nextprev.html new file mode 100644 index 0000000..099f16d --- /dev/null +++ b/layouts/partials/nextprev.html @@ -0,0 +1,10 @@ +{{ if or .Next .Prev -}} +
+{{- with .Prev }} +
Previous:
{{.Title}}
+{{ end -}} +{{- with .Next -}} +
Next:
{{.Title}}
+{{ end -}} +
+{{ end -}} diff --git a/layouts/partials/taglist.html b/layouts/partials/taglist.html new file mode 100644 index 0000000..757db6f --- /dev/null +++ b/layouts/partials/taglist.html @@ -0,0 +1,13 @@ + {{- if isset .Params "tags" -}} + {{- $tagsLen := len .Params.tags -}} + {{- if gt $tagsLen 0 -}} +
+ {{- with .Site.Params.relatedtext }}{{ . }}
{{ end -}} + {{- range $k, $v := .Params.tags -}} + {{- $url := printf "tags/%s" (. | urlize | lower) -}} + {{ . | title }} + {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + {{- end -}} +
+ {{- end -}} + {{- end }} -- cgit v1.2.3-70-g09d2