From 7f391e070f69ecf01ade7916c0f83df099b11d79 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Wed, 27 Apr 2022 00:56:19 +0200 Subject: Reformat a bit layout structure --- layouts/partials/head.html | 12 ++++++------ layouts/partials/scripts.html | 1 + layouts/partials/sidebar.html | 2 +- layouts/partials/styles.html | 3 +++ 4 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 layouts/partials/styles.html (limited to 'layouts/partials') diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 51ec8e3..be1f666 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,3 +1,4 @@ +{{/* */}} {{- $description := print .Params.Description -}} {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}} @@ -5,11 +6,13 @@ {{- end -}} {{- $author := print .Site.Author.name -}} - {{- if .Params.author -}}{{ $author = .Params.author }}{{- end -}} + {{- if .Params.author -}}{{ $author = .Params.author }}{{- end }} + + {{ block "title" . }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }} {{ hugo.Generator }} @@ -37,12 +40,9 @@ - - {{- $sass := resources.Get "sass/style.scss" }} - {{- $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint }} - + {{ partial "styles.html" . -}} + {{ partial "scripts.html" . -}} - diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index e69de29..e6462a9 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -0,0 +1 @@ +{{/* For Users's overwrite */}} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 5b5c016..8178537 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,4 +1,4 @@ -{{- /* Target for toggling the sidebar `.sidebar-checkbox` is for regular styles, `#sidebar-checkbox` for behavior. */ -}} +{{/* Target for toggling the sidebar `.sidebar-checkbox` is for regular styles, `#sidebar-checkbox` for behavior. */}} diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html new file mode 100644 index 0000000..5cc2dbd --- /dev/null +++ b/layouts/partials/styles.html @@ -0,0 +1,3 @@ +{{- $sass := resources.Get "sass/style.scss" -}} +{{- $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint -}} + -- cgit v1.2.3