diff options
| author | Reorx <novoreorx@gmail.com> | 2022-05-08 01:24:38 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-05-08 01:24:38 +0800 |
| commit | 0d2d905e3b05591cc2b2f1b3926df0a9aa0becf4 (patch) | |
| tree | cfdd1219290be764ed2b5552c38b6fb1e4974950 /layouts/partials/header.html | |
| parent | 4f722e0c6d05755ee47ca748b03ae6bbd2f7ccf6 (diff) | |
rename some image variables; rss default show content
Diffstat (limited to 'layouts/partials/header.html')
| -rw-r--r-- | layouts/partials/header.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 004f7c6..f708cb7 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -42,11 +42,11 @@ <header class="header"> <nav class="nav"> <div class="logo"> - {{- $label_text := (site.Params.label.text | default site.Title) }} + {{- $label_text := (site.Params.logo.text | default site.Title) }} {{- if site.Title }} <a href="{{ "" | absURL }}" accesskey="h" title="{{ $label_text }} (Alt + H)"> - {{- if site.Params.label.icon }} - {{- $img := resources.Get site.Params.label.icon }} + {{- if site.Params.logo.icon }} + {{- $img := resources.Get site.Params.logo.icon }} {{- if $img }} {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} {{- if hugo.IsExtended -}} @@ -54,17 +54,17 @@ {{- end -}} {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} {{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}} - {{- if site.Params.label.iconHeight }} - {{- $img = $img.Resize (printf "x%d" site.Params.label.iconHeight) }} + {{- if site.Params.logo.iconHeight }} + {{- $img = $img.Resize (printf "x%d" site.Params.logo.iconHeight) }} {{ else }} {{- $img = $img.Resize "x30" }} {{- end }} {{- end }} <img src="{{ $img.Permalink }}" alt="logo" aria-label="logo" - height="{{- site.Params.label.iconHeight | default "30" -}}"> + height="{{- site.Params.logo.iconHeight | default "30" -}}"> {{- else }} - <img src="{{- site.Params.label.icon | absURL -}}" alt="logo" aria-label="logo" - height="{{- site.Params.label.iconHeight | default "30" -}}"> + <img src="{{- site.Params.logo.icon | absURL -}}" alt="logo" aria-label="logo" + height="{{- site.Params.logo.iconHeight | default "30" -}}"> {{- end -}} {{- end -}} {{- $label_text -}} |
