mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-10-24 22:22:34 +02: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:
@@ -30,7 +30,13 @@
|
||||
<header class="header">
|
||||
<nav class="nav">
|
||||
<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")))) }}
|
||||
<span class="theme-toggle">
|
||||
<a id="theme-toggle">
|
||||
@@ -72,4 +78,4 @@
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user