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/_default/list.html | 11 +++++++++++ layouts/_default/rss.xml | 26 ++++++++++++++++++++++++++ layouts/_default/single.html | 5 +++++ layouts/index.html | 5 +++++ 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 +++++++++++++ layouts/shortcodes/hidvid.html | 10 ++++++++++ layouts/shortcodes/img.html | 22 ++++++++++++++++++++++ layouts/shortcodes/tagcloud.html | 3 +++ layouts/shortcodes/vid.html | 6 ++++++ 13 files changed, 150 insertions(+) create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/rss.xml create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.html 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 create mode 100644 layouts/shortcodes/hidvid.html create mode 100644 layouts/shortcodes/img.html create mode 100644 layouts/shortcodes/tagcloud.html create mode 100644 layouts/shortcodes/vid.html (limited to 'layouts') diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..b6a63be --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,11 @@ +{{ partial "header.html" . -}} +

{{ .Title | title }}

+
+{{ .Content -}} + +
+{{- partial "footer.html" . }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..9269333 --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,26 @@ + + + {{ .Site.Title }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range .Pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{- .Content | html -}} + + {{ end }} + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..43e8c2a --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,5 @@ +{{ partial "header.html" . -}} +

{{ .Title }}

+
+{{ .Content -}} +{{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..43e8c2a --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,5 @@ +{{ partial "header.html" . -}} +

{{ .Title }}

+
+{{ .Content -}} +{{ partial "footer.html" . }} 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 }} diff --git a/layouts/shortcodes/hidvid.html b/layouts/shortcodes/hidvid.html new file mode 100644 index 0000000..14f592d --- /dev/null +++ b/layouts/shortcodes/hidvid.html @@ -0,0 +1,10 @@ +
+ Click to reveal video. + +
diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html new file mode 100644 index 0000000..2df4ff6 --- /dev/null +++ b/layouts/shortcodes/img.html @@ -0,0 +1,22 @@ + +
+ {{- with .Get "link"}}{{ end -}} + {{.}} + {{- if .Get "link"}}{{ end -}} + {{- with .Get "caption" -}} +
+ {{- . -}} +
+ {{- end -}} +
diff --git a/layouts/shortcodes/tagcloud.html b/layouts/shortcodes/tagcloud.html new file mode 100644 index 0000000..0cf0118 --- /dev/null +++ b/layouts/shortcodes/tagcloud.html @@ -0,0 +1,3 @@ +{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
    + {{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}
  • {{ $name | title }}
  • + {{ end }}
{{ end }}{{ end }} diff --git a/layouts/shortcodes/vid.html b/layouts/shortcodes/vid.html new file mode 100644 index 0000000..4c612fe --- /dev/null +++ b/layouts/shortcodes/vid.html @@ -0,0 +1,6 @@ + -- cgit v1.2.3-70-g09d2