Move copyright div out of conditional

This commit is contained in:
Michael Noronha
2018-03-03 13:51:26 -06:00
parent d20c953181
commit c150a79386

View File

@@ -2,16 +2,14 @@
<div class="container">
{{ if .Site.Params.githubRepo }}
<div class="copyright">
{{ $length := len ( split .Site.Params.githubRepo "/" ) }}
{{ if eq $length 2 }}
<div class="copyright">
<a href="https://github.com/{{ .Site.Params.githubRepo }}/tree/master/content/{{ .File.Path }}" target="_blank">View this post on GitHub</a>
</div>
{{ else }}
<div class="copyright">
<a href="https://github.com/{{ .Site.Params.githubRepo }}/content/{{ .File.Path }}" target="_blank">View this post on GitHub</a>
</div>
{{ end }}
</div>
{{ end }}
<div class="copyright">