diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-10-16 23:47:46 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-10-16 23:56:56 +0530 |
| commit | 3edc160c5937d627cd95bb6b0c67e603f00bdf59 (patch) | |
| tree | 8246eb5180851c709434db664b73d9621b7cdf48 /layouts/partials/header.html | |
| parent | db52aa994294f3f2a412efee7802c752073018e2 (diff) | |
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
Diffstat (limited to 'layouts/partials/header.html')
| -rw-r--r-- | layouts/partials/header.html | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 40e7b15..c73333a 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -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>
\ No newline at end of file +</header> |
