update theme to allow easier ending of sections via short code
This commit is contained in:
parent
32b05f862f
commit
dfee4bc1fe
|
@ -27,13 +27,13 @@
|
||||||
|
|
||||||
{{ if $.Scratch.Get "has_related" }}
|
{{ if $.Scratch.Get "has_related" }}
|
||||||
<h2>See Also</h2>
|
<h2>See Also</h2>
|
||||||
<a href="#top">Back to top</a>
|
|
||||||
<ul>
|
<ul>
|
||||||
{{ $num_to_show := .Site.Params.related_content_limit | default 15 }}
|
{{ $num_to_show := .Site.Params.related_content_limit | default 15 }}
|
||||||
{{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
{{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
<a class="back_to_top" href="#top">Back to top</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{ partial "foot_custom.html" . }}
|
{{ partial "foot_custom.html" . }}
|
||||||
{{ with .Site.Params.footer }}
|
{{ with .Site.Params.footer }}
|
||||||
<hr/>
|
<hr/>
|
||||||
<a href="#top">Back to top</a>
|
<a class="back_to_top" href="#top">Back to top</a>
|
||||||
<br />{{ replace . "{Year}" now.Year | markdownify}}
|
<br />{{ replace . "{Year}" now.Year | markdownify}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .GitInfo}}
|
{{ if .GitInfo}}
|
||||||
|
|
2
themes/hugo-xmin/layouts/shortcodes/end_section.html
Normal file
2
themes/hugo-xmin/layouts/shortcodes/end_section.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<a class="back_to_top" href="#top">Back to top</a>
|
||||||
|
<hr />
|
Loading…
Reference in a new issue