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: 🍥
|
||||
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
avatar:
|
||||
enabled: true
|
||||
local: true
|
||||
src: img/avatar.png
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
<header class="site-info">
|
||||
{{ with .Site.Params.sidebar.avatar }}
|
||||
{{ if (default true .enabled) }}
|
||||
<figure class="site-avatar">
|
||||
{{ if not .local }}
|
||||
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
||||
@ -27,6 +28,7 @@
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
||||
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
||||
</header>
|
||||
|
Loading…
Reference in New Issue
Block a user