Add a "social.toml" data file to hold the data for all the social icons in the footer template. This reduces repetition in the template code and makes it easier to reuse the data in other parts of the theme, should that be desired in the future. It also makes it easier for end users to add new icons by just overriding the data file, instead of having to override the whole footer template.
73 lines
3.7 KiB
HTML
73 lines
3.7 KiB
HTML
<footer>
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
|
<ul class="list-inline text-center footer-links">
|
|
{{ range .Site.Data.social.social_icons }}
|
|
{{- if isset $.Site.Author .id }}
|
|
<li>
|
|
<a href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}">
|
|
<span class="fa-stack fa-lg">
|
|
<i class="fa fa-circle fa-stack-2x"></i>
|
|
<i class="fa {{ .icon }} fa-stack-1x fa-inverse"></i>
|
|
</span>
|
|
</a>
|
|
</li>
|
|
{{- end -}}
|
|
{{ end }}
|
|
{{ if .Site.Params.rss }}
|
|
<li>
|
|
<a href="{{ .Site.BaseURL}}/index.xml" title="RSS">
|
|
<span class="fa-stack fa-lg">
|
|
<i class="fa fa-circle fa-stack-2x"></i>
|
|
<i class="fa fa-rss fa-stack-1x fa-inverse"></i>
|
|
</span>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
<p class="credits copyright text-muted">
|
|
{{ .Site.Author.name }}
|
|
•
|
|
{{ .Site.LastChange.Format "2006" }}
|
|
|
|
{{ if .Site.Title }}
|
|
•
|
|
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
|
{{ end }}
|
|
</p>
|
|
<!-- Please don't remove this, keep my open source work credited :) -->
|
|
<p class="credits theme-by text-muted">
|
|
<a href="http://gohugo.io">Hugo v{{ .Hugo.Version }}</a> powered • Theme by <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapted to <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>
|
|
{{ with .Site.Params.commit }} • [<a href="{{.}}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]{{ end }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.js" integrity="sha384-/y1Nn9+QQAipbNQWU65krzJralCnuOasHncUFXGkdwntGeSvQicrYkiUBwsgUqc1" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/contrib/auto-render.min.js" integrity="sha384-dq1/gEHSxPZQ7DdrM82ID4YVol9BYyU7GbWlIwnwyPzotpoc57wDw/guX8EaYGPx" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" integrity="sha256-UplRCs9v4KXVJvVY+p+RSo5Q4ilAUXh7kpjyIP5odyc=" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js" integrity="sha256-PWHOlUzc96pMc8ThwRIXPn8yH4NOLu42RQ0b9SpnpFk=" crossorigin="anonymous"></script>
|
|
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
|
<script src="{{ .Site.BaseURL }}/js/pswp-init.js"></script>
|
|
<script src="{{ .Site.BaseURL }}/js/main.js"></script>
|
|
<script src="{{ .Site.BaseURL }}/js/highlight.min.js"></script>
|
|
<script> hljs.initHighlightingOnLoad(); </script>
|
|
<script> renderMathInElement(document.body); </script>
|
|
<!-- Google Custom Search Engine -->
|
|
<script>
|
|
(function() {
|
|
var cx = '{{ .Site.Params.gcse }}';
|
|
var gcse = document.createElement('script');
|
|
gcse.type = 'text/javascript';
|
|
gcse.async = true;
|
|
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
|
var s = document.getElementsByTagName('script')[0];
|
|
s.parentNode.insertBefore(gcse, s);
|
|
})();
|
|
</script>
|
|
|
|
{{ template "_internal/google_analytics.html" . }}
|