From 6e00a5558d8f2e7d48e105c6f0f36d59a5193f55 Mon Sep 17 00:00:00 2001 From: Jan Heinrich Reimer Date: Mon, 4 Mar 2024 12:56:22 +0100 Subject: [PATCH] Improve template readability --- data/skills.yaml | 2 +- layouts/_default/baseof.html | 26 +++++++++++++------------- layouts/partials/site/favicon.html | 10 +++++----- layouts/partials/site/footer.html | 14 +++++++------- layouts/partials/site/navigation.html | 6 +++--- layouts/partials/site/scripts.html | 5 +++-- layouts/partials/site/styles.html | 13 ++++++------- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/data/skills.yaml b/data/skills.yaml index 1e951eb..21904df 100644 --- a/data/skills.yaml +++ b/data/skills.yaml @@ -23,7 +23,7 @@ - name: CSS url: https://w3.org/Style/CSS/ - name: TypeScript - url: https://www.typescriptlang.org/ + url: https://typescriptlang.org/ - name: Elm url: https://elm-lang.org/ - name: Bash Script diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 451d38a..4a59e73 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,36 +1,36 @@ - + {{/* NOTE: the Site's title, and if there is a page title, that is set too */}} - {{ block "title" . }}{{ with .Params.Title }}{{ . }} • {{ end }}{{ $.Site.Title }}{{ end }} + {{ block "title" . }}{{ with .Params.Title }}{{ . }} • {{ end }}{{ site.Title }}{{ end }} {{- hugo.Generator -}} {{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}} - {{- if eq $.Site.Params.env "production" -}} + {{- if eq site.Params.env "production" -}} {{- else -}} {{- end -}} {{- block "styles" . -}} - {{- partial "site/styles" $ -}} + {{- partial "site/styles" page -}} {{- end -}} {{- block "favicon" . -}} - {{- partial "site/favicon" $ -}} + {{- partial "site/favicon" page -}} {{- end -}} {{- with .OutputFormats.Get "RSS" -}} - - + + {{- end -}} - {{- range $.Site.Languages -}} - {{- if ne . $.Site.Language -}} - {{- range $.Translations -}} + {{- range site.Languages -}} + {{- if ne . site.Language -}} + {{- range page.Translations -}} {{- end -}} {{- end -}} @@ -45,14 +45,14 @@ {{ block "navigation" . }} - {{ partial "site/navigation" $ }} + {{ partial "site/navigation" page }} {{ end }}
{{ block "main" . }}{{ end }}
-{{ block "footer" . }}{{ partial "site/footer" $ }}{{ end }} -{{ block "scripts" . }}{{ partial "site/scripts" $ }}{{ end }} +{{ block "footer" . }}{{ partial "site/footer" page }}{{ end }} +{{ block "scripts" . }}{{ partial "site/scripts" page }}{{ end }} diff --git a/layouts/partials/site/favicon.html b/layouts/partials/site/favicon.html index 043866c..8faeedf 100644 --- a/layouts/partials/site/favicon.html +++ b/layouts/partials/site/favicon.html @@ -2,8 +2,8 @@ - - - - - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/layouts/partials/site/footer.html b/layouts/partials/site/footer.html index 10e1e1f..41a2978 100644 --- a/layouts/partials/site/footer.html +++ b/layouts/partials/site/footer.html @@ -4,14 +4,14 @@ {{- end -}}