From d11d1d2014a756bbcbf35efea9bbfa93e19903c2 Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Sat, 12 Oct 2024 14:14:24 +0200 Subject: [PATCH] add param to customize the featured image in page and site header - Add the param to the example with an explanation - It can also be used to add more classes for futher customization if needed --- exampleSite/config.toml | 2 ++ layouts/partials/page-header.html | 2 +- layouts/partials/site-header.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 1e99986..b7e9a74 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -34,6 +34,8 @@ site_logo = "" description = "The last theme you'll ever need. Maybe." # choose a background color from any on this page: https://tachyons.io/docs/themes/skins/ and preface it with "bg-" background_color_class = "bg-black" +# choose an alignment style for the featured image from "bg-top|bg-center|bg-bottom", or add any other class space-separated to customize further +featured_image_class = "bg-top" recent_posts_number = 3 [[params.ananke_socials]] diff --git a/layouts/partials/page-header.html b/layouts/partials/page-header.html index 96c00c7..fa11f40 100644 --- a/layouts/partials/page-header.html +++ b/layouts/partials/page-header.html @@ -1,7 +1,7 @@ {{ $featured_image := partial "func/GetFeaturedImage.html" . }} {{ if $featured_image }} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} -
+
{{ partial "site-navigation.html" . }}
diff --git a/layouts/partials/site-header.html b/layouts/partials/site-header.html index 1a0b3cb..bb57630 100644 --- a/layouts/partials/site-header.html +++ b/layouts/partials/site-header.html @@ -1,7 +1,7 @@ {{ $featured_image := partial "func/GetFeaturedImage.html" . }} {{ if $featured_image }} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} -
+
{{ partial "site-navigation.html" .}}