aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authorNicholas Johnson <>2025-07-26 00:00:00 +0000
committerNicholas Johnson <>2025-07-26 00:00:00 +0000
commit9bb9989fca490bfac69ea4387ccae1e9ec3ec23cf7f47a401e241ee43562f8a3 (patch)
tree887dd23c15ddd56b850a4901b3161808bb37f1b1872fa40cbd2e2de877c3d77d /layouts/partials
parentc1dc7133883e38b6c6ddf110df1868162862159994b2f9454999454f48417e58 (diff)
downloadhugo-theme-journal-9bb9989fca490bfac69ea4387ccae1e9ec3ec23cf7f47a401e241ee43562f8a3.tar.gz
hugo-theme-journal-9bb9989fca490bfac69ea4387ccae1e9ec3ec23cf7f47a401e241ee43562f8a3.zip
Migrate fully to Hugo's new template system
This was the only way I could get term pages to consistently render correctly.
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/footer.gmi1
-rw-r--r--layouts/partials/footer.html3
-rw-r--r--layouts/partials/head.html22
-rw-r--r--layouts/partials/header.gmi3
-rw-r--r--layouts/partials/header.html5
-rw-r--r--layouts/partials/metadata.gmi2
-rw-r--r--layouts/partials/metadata.html6
-rw-r--r--layouts/partials/pageinfo.gmi18
-rw-r--r--layouts/partials/pageinfo.html23
9 files changed, 0 insertions, 83 deletions
diff --git a/layouts/partials/footer.gmi b/layouts/partials/footer.gmi
deleted file mode 100644
index 06b0678..0000000
--- a/layouts/partials/footer.gmi
+++ /dev/null
@@ -1 +0,0 @@
-{{ replace $.Site.Copyright "{currentYear}" (now.Format "2006") }} \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
deleted file mode 100644
index 5f8ffc6..0000000
--- a/layouts/partials/footer.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<footer class="footer">
- <p class="footer__text">{{ replace $.Site.Copyright "{currentYear}" (now.Format "2006") }}</p>
-</footer> \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
deleted file mode 100644
index 8250e19..0000000
--- a/layouts/partials/head.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<head>
- <meta charset="utf-8">
- <meta name="theme-color" content="#000">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- {{- if $.Site.Params.description }}
- <meta name="description" content="{{ $.Site.Params.description }}">
- {{- end -}}
- {{ if $.Site.Params.keywords }}
- <meta name="keywords" content="{{ $.Site.Params.keywords }}">
- {{- end -}}
- {{ if .Site.Params.custom_css -}}
- {{ range .Site.Params.custom_css }}
- <link rel="stylesheet" type="text/css" href="{{ relURL . }}">
- {{- end -}}
- {{ else }}
- <link rel="stylesheet" type="text/css" href="{{ (resources.Get "static/css/style.css").RelPermalink }}">
- {{- end -}}
- {{ if (not (fileExists "static/favicon.ico")) }}
- <link rel="icon" href="data:,">
- {{- end }}
- <title>{{ .Title }}</title>
-</head> \ No newline at end of file
diff --git a/layouts/partials/header.gmi b/layouts/partials/header.gmi
deleted file mode 100644
index c70f84a..0000000
--- a/layouts/partials/header.gmi
+++ /dev/null
@@ -1,3 +0,0 @@
-```plaintext
-{{ chomp (readFile "templates/logo.txt") }}
-``` \ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
deleted file mode 100644
index d8ec881..0000000
--- a/layouts/partials/header.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<header class="logo">
-<pre class="logo__text">
-{{ chomp (readFile "templates/logo.txt") }}
-</pre>
-</header> \ No newline at end of file
diff --git a/layouts/partials/metadata.gmi b/layouts/partials/metadata.gmi
deleted file mode 100644
index 48d3db4..0000000
--- a/layouts/partials/metadata.gmi
+++ /dev/null
@@ -1,2 +0,0 @@
-{{ partial "pageinfo.gmi" . }}
-=> {{ .RelPermalink | strings.TrimSuffix "index.gmi" }} {{ emojify ":link:" }} {{ .Title }} \ No newline at end of file
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
deleted file mode 100644
index ed091b8..0000000
--- a/layouts/partials/metadata.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<article>
- <header>
- <p>{{ partial "pageinfo.html" . }}<br>
- {{ emojify ":link:" }}&nbsp;<a class="link link--internal" href="{{ .RelPermalink }}" rel="noreferrer">{{ .Title }}</a></p>
- </header>
-</article> \ No newline at end of file
diff --git a/layouts/partials/pageinfo.gmi b/layouts/partials/pageinfo.gmi
deleted file mode 100644
index 9993d93..0000000
--- a/layouts/partials/pageinfo.gmi
+++ /dev/null
@@ -1,18 +0,0 @@
-{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}}
-
-{{ $nonBreakingPublishDate := .Page.PublishDate | time.Format $dateFormat -}}
-{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate " " " " -}}
-{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate "-" "‑" -}}
-
-{{ $nonBreakingReadingTime := i18n "readingTime" .ReadingTime -}}
-{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime " " " " -}}
-{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime "-" "‑" -}}
-
-{{ $nonBreakingTags := slice -}}
-{{ range .Param (lower (i18n "tags")) -}}
- {{ $nonBreakingTag := replace . " " " " -}}
- {{ $nonBreakingTag = replace $nonBreakingTag "-" "‑" -}}
- {{ $nonBreakingTags = $nonBreakingTags | append $nonBreakingTag -}}
-{{ end -}}
-
-{{ emojify ":calendar:" }} {{ $nonBreakingPublishDate }} | {{ emojify ":stopwatch:" }} {{ $nonBreakingReadingTime }}{{ if $nonBreakingTags }} | {{ emojify ":label:" }} {{ end }}{{ range $key, $val := $nonBreakingTags }}{{ if $key }}, {{ end }}{{ $val }}{{ end }} \ No newline at end of file
diff --git a/layouts/partials/pageinfo.html b/layouts/partials/pageinfo.html
deleted file mode 100644
index 3ca8fe9..0000000
--- a/layouts/partials/pageinfo.html
+++ /dev/null
@@ -1,23 +0,0 @@
-{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}}
-
-{{/* user-overridable parameter $dateFormat is escaped pre-insertion so that HTML entities can be inserted */ -}}
-{{ $nonBreakingPublishDate := .Page.PublishDate | time.Format $dateFormat | htmlEscape -}}
-{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate " " "&nbsp;" -}}
-{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate "-" "&#8209;" -}}
-
-{{/* user-overridable parameter $readingTime is escaped pre-insertion so that HTML entities can be inserted */ -}}
-{{ $nonBreakingReadingTime := i18n "readingTime" .ReadingTime | htmlEscape -}}
-{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime " " "&nbsp;" -}}
-{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime "-" "&#8209;" -}}
-
-{{ $breakingTags := .Param (lower (i18n "tags")) -}}
-{{ $nonBreakingTags := slice -}}
-{{ range $breakingTags -}}
- {{/* user-defined tags are escaped pre-insertion so that HTML entities can be inserted */ -}}
- {{ $nonBreakingTag := htmlEscape . -}}
- {{ $nonBreakingTag = replace $nonBreakingTag " " "&nbsp;" -}}
- {{ $nonBreakingTag = replace $nonBreakingTag "-" "&#8209;" -}}
- {{ $nonBreakingTags = $nonBreakingTags | append $nonBreakingTag -}}
-{{ end -}}
-
-{{ emojify ":calendar:" }}&nbsp;<time {{ printf "datetime=%q" (.Page.PublishDate | time.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>{{ $nonBreakingPublishDate | safeHTML }}</time> | {{ emojify ":stopwatch:" }}&nbsp;<time datetime="PT{{ .ReadingTime }}M">{{ $nonBreakingReadingTime | safeHTML }}</time>{{ if $nonBreakingTags }} | {{ emojify ":label:" }}&nbsp;{{ end }}{{ range $key, $val := $nonBreakingTags }}{{ if $key }} {{ end }}<a class="link link--internal" href='{{ relLangURL (lower (i18n "tags")) }}/{{ index $breakingTags $key | urlize }}/' rel="noreferrer">{{ $val | safeHTML }}</a>{{ end }}