feat(sidebar): add option to disable avatar in left sidebar (#268)
* Allow to disable logo image in left sidebar * Enable sidebar avatar by default for backward compatibility Co-authored-by: Jimmy Cai <github@jimmycai.com>
This commit is contained in:
parent
8cb11d721f
commit
a25e6463bd
@ -37,6 +37,7 @@ params:
|
|||||||
emoji: 🍥
|
emoji: 🍥
|
||||||
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||||
avatar:
|
avatar:
|
||||||
|
enabled: true
|
||||||
local: true
|
local: true
|
||||||
src: img/avatar.png
|
src: img/avatar.png
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
<header class="site-info">
|
<header class="site-info">
|
||||||
{{ with .Site.Params.sidebar.avatar }}
|
{{ with .Site.Params.sidebar.avatar }}
|
||||||
|
{{ if (default true .enabled) }}
|
||||||
<figure class="site-avatar">
|
<figure class="site-avatar">
|
||||||
{{ if not .local }}
|
{{ if not .local }}
|
||||||
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
||||||
@ -27,6 +28,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
||||||
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
||||||
</header>
|
</header>
|
||||||
|
Loading…
Reference in New Issue
Block a user