From 7ba1562e0912d6db13e7d195b087316a00764ca6731bd77cf634c7c47bceff4c Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Tue, 9 May 2023 00:00:00 +0000 Subject: Make non-critical page elements optional --- layouts/_default/baseof.gmi | 4 +++- layouts/_default/baseof.html | 2 ++ layouts/index.gmi | 4 ++++ layouts/index.html | 4 ++++ layouts/partials/head.html | 6 ++++++ 5 files changed, 19 insertions(+), 1 deletion(-) (limited to 'layouts') 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 @@ {{ partial "header.html" . }} {{ block "main" . }}{{ end }} + {{- if $.Site.Copyright }} {{ partial "footer.html" . }} + {{- end }} \ 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" -}}
+ {{- if .Site.Params.indexTitle }}

{{ .Site.Params.indexTitle }}

+ {{- end }} + {{- if .Site.Params.indexIntro }}

{{ .Site.Params.indexIntro }}

+ {{- end }}

Navigation Links