mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 19:35:26 +01:00 
			
		
		
		
	nav-label: init
* label can be set differently from title
* label can have an optional icon with preffered size
* in site config =>
params:
  label:
    text: "Home"
    icon: /apple-touch-icon.png
    iconHeight: 35
			
			
This commit is contained in:
		| @@ -25,6 +25,15 @@ | |||||||
|     font-weight: 700; |     font-weight: 700; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .logo a img { | ||||||
|  |     display: inline; | ||||||
|  |     vertical-align: middle; | ||||||
|  |     pointer-events: none; | ||||||
|  |     transform: translate(0, -10%); | ||||||
|  |     border-radius: 6px; | ||||||
|  |     margin-right: 8px; | ||||||
|  | } | ||||||
|  |  | ||||||
| .theme-toggle svg{ | .theme-toggle svg{ | ||||||
|     height: 18px; |     height: 18px; | ||||||
|     margin: 0 10px; |     margin: 0 10px; | ||||||
|   | |||||||
| @@ -30,7 +30,13 @@ | |||||||
| <header class="header"> | <header class="header"> | ||||||
|     <nav class="nav"> |     <nav class="nav"> | ||||||
|         <p class="logo"> |         <p class="logo"> | ||||||
|             <a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a> |             <a href="{{ "" | absLangURL }}"> | ||||||
|  |                 {{- if .Site.Params.label.icon }} | ||||||
|  |                 <img src="{{- .Site.Params.label.icon -}}" | ||||||
|  |                     height="{{- .Site.Params.label.iconHeight | default "30px" -}}"> | ||||||
|  |                 {{- end -}} | ||||||
|  |                 {{- .Site.Params.label.text | default .Site.Title -}} | ||||||
|  |             </a> | ||||||
|             {{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }} |             {{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }} | ||||||
|             <span class="theme-toggle"> |             <span class="theme-toggle"> | ||||||
|                 <a id="theme-toggle"> |                 <a id="theme-toggle"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange