From c1d4f0c003c726c356e1851bb567b590a2aa8947 Mon Sep 17 00:00:00 2001 From: Wolf Noble Date: Tue, 24 Oct 2023 16:27:08 -0500 Subject: [PATCH] [SVG_Logo_support] add logic brace around img dimension math, so as to support SVGs. Add warning discouraging specifying the same asset as both logo and logo_dark. --- layouts/partials/functions/warnings.html | 3 +++ layouts/partials/logo.html | 24 ++++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/layouts/partials/functions/warnings.html b/layouts/partials/functions/warnings.html index d7cb61785..ce8c2914d 100644 --- a/layouts/partials/functions/warnings.html +++ b/layouts/partials/functions/warnings.html @@ -7,3 +7,6 @@ {{ if ne .Params.logo nil }} {{ warnf "[CONGO] Theme parameter `logo` has been renamed to `header.logo`. Please update your site configuration." }} {{ end }} +{{ if eq .Params.header.logo .Params.header.logo_dark }} + {{- warnf "[CONGO] Interactions with a single resource via multiple distinct resource handles can be problematic. It is recommended to only declare `header.logo_dark` when it is distinct from `header.logo`." }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html index ee1191687..41261ed6a 100644 --- a/layouts/partials/logo.html +++ b/layouts/partials/logo.html @@ -5,17 +5,29 @@ {{- if $logo_dark }} {{ .Site.Title }} {{- end}}