From 90c0a89d9f0f9c6a7fb632db0bc5a0ccbc86a2f1 Mon Sep 17 00:00:00 2001 From: Mirus Date: Sun, 22 Dec 2024 13:07:34 +0200 Subject: [PATCH] fix: now copyright in footer properly align in different combinations of `fullWidthTheme` and `centerTheme` --- assets/css/footer.scss | 6 ++++-- assets/css/style.scss | 4 +++- layouts/partials/head.html | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/assets/css/footer.scss b/assets/css/footer.scss index a405574..9667d2c 100644 --- a/assets/css/footer.scss +++ b/assets/css/footer.scss @@ -2,6 +2,8 @@ padding: 40px 0; flex-grow: 0; opacity: .5; + display: flex; + justify-content: $centerTheme; &__inner { display: flex; @@ -24,9 +26,9 @@ display: flex; flex-flow: row wrap; flex: 1; - align-items: center; + align-items: $centerTheme; font-size: 1rem; - justify-content: center; + justify-content: $centerTheme; &--user { margin: auto; diff --git a/assets/css/style.scss b/assets/css/style.scss index ecda4c5..173b292 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -1,3 +1,5 @@ +$centerTheme: {{ if $.Site.Params.CenterTheme }}center{{ else }}flex-start{{ end }}; + @import "variables"; @import "font"; @@ -17,4 +19,4 @@ @import "syntax"; @import "code"; @import "terms"; -@import "gist"; \ No newline at end of file +@import "gist"; diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1a49763..e896557 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -13,7 +13,8 @@ {{ template "_internal/google_analytics.html" . }} -{{ $defaultStyles := resources.Get "css/style.scss" }} +{{ $defaultStylesTemplate := resources.Get "css/style.scss" }} +{{ $defaultStyles := $defaultStylesTemplate | resources.ExecuteAsTemplate "main.scss" .}} {{ if and (isset .Params "color") (not (eq .Params.color "")) }} {{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }}