Refactor some templating to avoid spurious whitespace
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -1,18 +1,19 @@
|
||||
|
||||
<footer class='page-footer'>
|
||||
{{ $socialMap := .Site.Data.notrack.social }}
|
||||
{{ with $.Site.Params.social }}
|
||||
{{- $socialMap := .Site.Data.notrack.social }}
|
||||
{{- with $.Site.Params.social }}
|
||||
<div class="social">
|
||||
<ul>
|
||||
{{- $socialArray := slice -}}
|
||||
{{ range $website, $user := $.Site.Params.social }}
|
||||
{{- range $website, $user := $.Site.Params.social }}
|
||||
{{- $social := $website | lower | index $socialMap | default dict -}}
|
||||
{{- $social := dict "user" $user | merge $social -}}
|
||||
|
||||
{{- $data := index $socialMap $website -}}
|
||||
|
||||
{{- $socialArray = $socialArray | append $social -}}
|
||||
{{ end }}
|
||||
{{ range sort $socialArray "weight" -}}
|
||||
{{- end }}
|
||||
{{- range sort $socialArray "weight" -}}
|
||||
{{- if .prefix -}}
|
||||
<li><a href="{{- .prefix -}}{{ .user }}" rel="me"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
|
||||
{{- else if .template -}}
|
||||
@ -23,6 +24,6 @@
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ printf "<!-- Icons are from Awesome Font, licensed under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}
|
||||
{{- end }}
|
||||
{{ printf " <!-- Icons are from Awesome Font, licensed under SIL OFL 1.1 (https://scripts.sil.org/OFL) -->" | safeHTML }}
|
||||
</footer>
|
||||
|
Reference in New Issue
Block a user