aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicholasjohnson.ch>2023-05-09 00:00:00 +0000
committerNicholas Johnson <nick@nicholasjohnson.ch>2023-05-09 00:00:00 +0000
commit7ba1562e0912d6db13e7d195b087316a00764ca6731bd77cf634c7c47bceff4c (patch)
tree7fff0909c33b06d4e52068b845bd6aeedcb3647ce0d7c97c6f351457e51afde7 /layouts
parentb077fceef78e9bda5f1402c22f8e7d4ffb47d0e3ac242ea8297981c45e30155b (diff)
downloadhugo-theme-journal-7ba1562e0912d6db13e7d195b087316a00764ca6731bd77cf634c7c47bceff4c.tar.gz
hugo-theme-journal-7ba1562e0912d6db13e7d195b087316a00764ca6731bd77cf634c7c47bceff4c.zip
Make non-critical page elements optionalv0.5.2
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.gmi4
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/index.gmi4
-rw-r--r--layouts/index.html4
-rw-r--r--layouts/partials/head.html6
5 files changed, 19 insertions, 1 deletions
diff --git a/layouts/_default/baseof.gmi b/layouts/_default/baseof.gmi
index d866a14..a583bfe 100644
--- a/layouts/_default/baseof.gmi
+++ b/layouts/_default/baseof.gmi
@@ -2,4 +2,6 @@
{{ block "main" . }}{{ end }}
-{{ partial "footer.gmi" . -}} \ No newline at end of file
+{{- if $.Site.Copyright }}
+{{ partial "footer.gmi" . }}
+{{- end -}} \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 8129bb3..7dd28ff 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -4,6 +4,8 @@
<body class="body">
{{ partial "header.html" . }}
{{ block "main" . }}{{ end }}
+ {{- if $.Site.Copyright }}
{{ partial "footer.html" . }}
+ {{- end }}
</body>
</html> \ No newline at end of file
diff --git a/layouts/index.gmi b/layouts/index.gmi
index ab4fdb4..b97ef74 100644
--- a/layouts/index.gmi
+++ b/layouts/index.gmi
@@ -1,7 +1,11 @@
{{ define "main" }}
+{{- if .Site.Params.indexTitle }}
# {{ .Site.Params.indexTitle | safeHTML }}
+{{- end }}
+{{- if .Site.Params.indexIntro }}
{{ .Site.Params.indexIntro | safeHTML }}
+{{- end }}
## Navigation Links
{{ range .Site.Menus.main -}}
=> {{ .URL }} {{ emojify ":link:" | safeHTML }} {{ .Name | safeHTML }}
diff --git a/layouts/index.html b/layouts/index.html
index 3ba0607..d29c86a 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,7 +1,11 @@
{{ define "main" -}}
<main>
+ {{- if .Site.Params.indexTitle }}
<h1>{{ .Site.Params.indexTitle }}</h1>
+ {{- end }}
+ {{- if .Site.Params.indexIntro }}
<p>{{ .Site.Params.indexIntro }}</p>
+ {{- end }}
<h2>Navigation Links</h2>
<nav>
<ul class="list">
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 22efeb8..9f6faf9 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,9 +1,15 @@
<head>
<meta charset="utf-8">
<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 }}
<meta name="theme-color" content="#000">
<link rel="stylesheet" type="text/css" href="{{ (resources.Get "css/style.css").RelPermalink }}">
+ {{- if $.Site.Params.title }}
<title>{{ .Title }}</title>
+ {{- end }}
</head> \ No newline at end of file