diff options
author | Aniket Teredesai <50461557+icy-comet@users.noreply.github.com> | 2022-07-23 07:15:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-23 07:15:32 +0300 |
commit | 77ffb308c32a46a9336dcebbc242cb325ea98fa9 (patch) | |
tree | cfd6fdb4ccc8e95ebd0f2c2cb97864c6e44d9ab8 | |
parent | 87ffee9fcf6dc3255b5d7346122ba32606430dcf (diff) |
Allow adding SVG in place of logo image (#976)
Usage =>
Params.label.iconSVG: "<your SVG as a string>"
-rw-r--r-- | assets/css/common/header.css | 2 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/assets/css/common/header.css b/assets/css/common/header.css index 5a213848..64894da4 100644 --- a/assets/css/common/header.css +++ b/assets/css/common/header.css @@ -27,7 +27,7 @@ font-weight: 700; } -.logo a img { +.logo a img, .logo a svg { display: inline; vertical-align: middle; pointer-events: none; diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 1e29e75a..4a7291e2 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -66,6 +66,8 @@ <img src="{{- site.Params.label.icon | absURL -}}" alt="" aria-label="logo" height="{{- site.Params.label.iconHeight | default "30" -}}"> {{- end -}} + {{- else if hasPrefix site.Params.label.iconSVG "<svg" }} + {{ site.Params.label.iconSVG | safeHTML }} {{- end -}} {{- $label_text -}} </a> |