From e9b01ab225e1f686704a5d566b1c57d86c48885b Mon Sep 17 00:00:00 2001 From: "Darren J. de Lima" Date: Wed, 20 Jul 2022 16:08:02 +0100 Subject: [Feature] Add custom wallpaper param (not yet adaptive) Custom wallpaper does not change with site switching to dark mode... but then, the theme does not support dark/light mode switching yet. --- exampleSite/config.toml | 3 +++ layouts/_default/baseof.html | 2 +- layouts/partials/head.html | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3986643..be318e6 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -73,6 +73,9 @@ defaultContentLanguage = "en" # Default language to use photoswipe = true # see https://github.com/dimsemenov/PhotoSwipe # 是否启用PhotoSwipe(图片可点击) contentCopyright = 'CC BY-NC-ND 4.0' + # Optional custom wallpaper image URL. Can be a remote image or local /static/img/wallpaper.jpg (make sure it has a small filesize for quick site painting) + wallpaper = "https://followingmyfeet.com/wp-content/uploads/2018/02/825_2229-HDR.jpg" + # Link custom CSS and JS assets # (relative to /static/css and /static/js respectively) customCSS = [] # if ['custom.css'], load '/static/css/custom.css' file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a3df1dc..9efa8bf 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -45,7 +45,7 @@
-
+
{{ block "content" . }}{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3728b97..41fc462 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -78,6 +78,18 @@ + +{{- if .Site.Params.wallpaper }} + +{{- end }} + {{ range .Site.Params.customCSS }} -- cgit v1.2.3