hugo-theme-even/layouts/partials/footer.html
Simon Wörner 8384f02483 fix: allow all url protocols in social and menu links (#4)
Adding "| safeURL" allows the usage of "unsafe" url protocols such as irc:// or xmpp://
2017-09-14 23:11:46 +08:00

33 lines
No EOL
1.2 KiB
HTML

<div class="social-links">
{{- range $name, $path := .Site.Params.social }}
{{- if $path }}
{{- $realName := slicestr $name 2 }}
<a href="{{ $path | safeURL }}" class="iconfont icon-{{ $realName }}" title="{{ $realName }}"></a>
{{- end }}
{{- end }}
<a href="{{ .Site.RSSLink }}" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
</div>
<div class="copyright">
<span class="power-by">
{{ (printf .Site.Data.even.default.footer.powered `<a class="hexo-link" href="https://gohugo.io">Hugo</a>`) | safeHTML }}
</span>
<span class="division">|</span>
<span class="theme-info">
{{ .Site.Data.even.default.footer.theme }} -
<a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
</span>
<span class="copyright-year">
{{- $current := now.Format "2006" }}
&copy;
{{ if ne .Site.Params.since $current }}
{{ .Site.Params.since }} -
{{ end }}
{{- $current }}
<span class="heart">
<i class="iconfont icon-heart"></i>
</span>
<span class="author">{{if .Site.Copyright }}{{ .Site.Copyright | safeHTML }}{{ else }}{{ .Site.Author.name | safeHTML }}{{ end }}</span>
</span>
</div>