mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-31 03:45:24 +01:00 
			
		
		
		
	Fix logo not being displayed with no title pages
- use a local var to get label text ot site title fixes: #281
This commit is contained in:
		| @@ -80,13 +80,14 @@ | |||||||
| <header class="header"> | <header class="header"> | ||||||
|     <nav class="nav"> |     <nav class="nav"> | ||||||
|         <div class="logo"> |         <div class="logo"> | ||||||
|             {{- if .Title }} |             {{- $label_text := (.Site.Params.label.text | default .Site.Title) }} | ||||||
|             <a href="{{ "" | absLangURL }}" accesskey="h" title="{{ .Site.Params.label.text | default .Site.Title }} (Alt + H)"> |             {{- if .Site.Title }} | ||||||
|  |             <a href="{{ "" | absLangURL }}" accesskey="h" title="{{ $label_text }} (Alt + H)"> | ||||||
|                 {{- if .Site.Params.label.icon }} |                 {{- if .Site.Params.label.icon }} | ||||||
|                 <img src="{{- .Site.Params.label.icon -}}" alt="logo" aria-label="logo" |                 <img src="{{- .Site.Params.label.icon -}}" alt="logo" aria-label="logo" | ||||||
|                     height="{{- .Site.Params.label.iconHeight | default "30px" -}}"> |                     height="{{- .Site.Params.label.iconHeight | default "30px" -}}"> | ||||||
|                 {{- end -}} |                 {{- end -}} | ||||||
|                 {{- .Site.Params.label.text | default .Site.Title -}} |                 {{- $label_text -}} | ||||||
|             </a> |             </a> | ||||||
|             {{- end }} |             {{- end }} | ||||||
|             <span class="logo-switches"> |             <span class="logo-switches"> | ||||||
| @@ -113,7 +114,7 @@ | |||||||
|                 </button> |                 </button> | ||||||
|                 {{- end}} |                 {{- end}} | ||||||
|                 {{ $lang := .Lang}} |                 {{ $lang := .Lang}} | ||||||
|                 {{ $separator := or .Title (not .Site.Params.disableThemeToggle)}} |                 {{ $separator := or $label_text (not .Site.Params.disableThemeToggle)}} | ||||||
|                 {{- with $.Site.Home.AllTranslations }} |                 {{- with $.Site.Home.AllTranslations }} | ||||||
|  |  | ||||||
|                 <ul class="lang-switch"> |                 <ul class="lang-switch"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange