diff options
| author | eltrac <hi@eltr.ac> | 2026-04-04 16:50:26 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-04-04 16:50:26 +0800 |
| commit | 8afa0c2805e7c66d433c746dffb82315d61811cb (patch) | |
| tree | c76bf5de1dc1879def753dc9998c70c96f08472d /layouts | |
| parent | 48fe1b48d9784f780ac9f5f62c098ec1ab0245f8 (diff) | |
feat: support custom logo per page
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_partials/components/logo.html | 8 | ||||
| -rw-r--r-- | layouts/fiction/page.html | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/layouts/_partials/components/logo.html b/layouts/_partials/components/logo.html index 9c5ba1f5..88c2284e 100644 --- a/layouts/_partials/components/logo.html +++ b/layouts/_partials/components/logo.html @@ -1,8 +1,10 @@ {{ $ctx := .ctx }} {{ $link := .link | default "" }} -{{- $src := printf "%s%s" - (.ctx.Site.Params.assetBaseUrl) - (.ctx.Site.Params.logo) +{{- $src := + (or .ctx.Params.logo + (printf "%s%s" + (.ctx.Site.Params.assetBaseUrl) + (.ctx.Site.Params.logo))) -}} {{ $class := .class | default "" }} {{ $imageClass := .imageClass | default "" }} diff --git a/layouts/fiction/page.html b/layouts/fiction/page.html index 7535de2f..9f988586 100644 --- a/layouts/fiction/page.html +++ b/layouts/fiction/page.html @@ -3,7 +3,6 @@ <header class="text-center"> {{ partial "components/logo" (dict "link" "fictions/" - "src" "/img/potted-skeleton.svg" "ctx" . "imageClass" "block w-[10rem]" "class" "flex justify-center" |
