feat: social menu (#401)

This commit is contained in:
Jimmy Cai
2021-10-23 11:58:55 +02:00
committed by GitHub
parent 7c59ac7713
commit 661e59b85d
5 changed files with 60 additions and 0 deletions
+20
View File
@@ -29,8 +29,28 @@
</figure>
{{ end }}
{{ end }}
<h1 class="site-name"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1>
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
{{- with .Site.Menus.social -}}
<ol class="social-menu">
{{ range . }}
<li>
<a
href='{{ .URL | relLangURL }}'
{{ if eq (default true .Params.newTab) true }}target="_blank"{{ end }}
{{ with .Name }}title="{{ . }}"{{ end }}
>
{{ $icon := default "link" .Params.Icon }}
{{ with $icon }}
{{ partial "helper/icon" . }}
{{ end }}
</a>
</li>
{{ end }}
</ol>
{{- end -}}
</header>
<ol class="menu" id="main-menu">