rename "social.html" to "social-icons.html"
This commit is contained in:
parent
4cba618ce1
commit
a29bf0d7b0
@ -2,7 +2,7 @@
|
|||||||
<div class="header-top-left">
|
<div class="header-top-left">
|
||||||
{{ partial "site-title.html" . }}
|
{{ partial "site-title.html" . }}
|
||||||
{{ partial "theme-switcher.html" . }}
|
{{ partial "theme-switcher.html" . }}
|
||||||
{{ partial "social.html" . }}
|
{{ partial "social-icons.html" . }}
|
||||||
</div>
|
</div>
|
||||||
<div class="header-top-right">
|
<div class="header-top-right">
|
||||||
|
|
||||||
|
37
layouts/partials/social-icons.html
Normal file
37
layouts/partials/social-icons.html
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<ul class="social-icons">
|
||||||
|
|
||||||
|
{{ range $.Site.Params.Social }}
|
||||||
|
{{ if and (isset $.Site.Data.social.social_icons .id) (isset . "url") }}
|
||||||
|
<li>
|
||||||
|
<a {{ printf "href=%q" .url | safeHTMLAttr }} title="{{ humanize .id }}" rel="me">
|
||||||
|
{{ partial "font-awesome.html" (dict "iconName" .id "custom" false) }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ else if and (isset $.Site.Data.social.social_icons .id) (isset . "name") }}
|
||||||
|
{{ $url := index $.Site.Data.social.social_icons .id }}
|
||||||
|
{{ $ref := printf $url .name }}
|
||||||
|
<li>
|
||||||
|
<a {{ printf "href=%q" $ref | safeHTMLAttr }} title="{{ humanize .id }}" rel="me">
|
||||||
|
{{ partial "font-awesome.html" (dict "iconName" .id "custom" false) }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ else if (isset . "url") }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ printf .url }}" title="{{ humanize .id }}" rel="me">
|
||||||
|
{{ partial "font-awesome.html" (dict "iconName" .id "custom" true) }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.rssAsSocialIcon }}
|
||||||
|
{{ with .Site.Home.OutputFormats.Get "rss" -}}
|
||||||
|
<li>
|
||||||
|
<a {{ printf "href=%q" .Permalink | safeHTMLAttr }} title="RSS" rel="me">
|
||||||
|
{{ partial "font-awesome.html" (dict "iconName" "rss" "custom" false) }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end -}}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</ul>
|
Loading…
Reference in New Issue
Block a user