mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
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
2 changed files with 3 additions and 0 deletions
|
@ -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">
|
||||
|
@ -26,6 +27,7 @@
|
|||
<span class="emoji">{{ . }}</span>
|
||||
{{ 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>
|
||||
|
|
Loading…
Reference in a new issue