add page menu and tie it into jump links to be useful and efficient for nav
This commit is contained in:
parent
70aa1b57a1
commit
35553fcb08
|
@ -23,7 +23,7 @@
|
||||||
{{ if $.Scratch.Get "has_related" }}
|
{{ if $.Scratch.Get "has_related" }}
|
||||||
| <a class="back_to_top" href="#related">Back to related pages</a>
|
| <a class="back_to_top" href="#related">Back to related pages</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
| <a class="back_to_top" href="#page_menu">Back to page menu</a>
|
||||||
| <a class="back_to_top" href="#nav_menu">Back to site menu</a>
|
| <a class="back_to_top" href="#nav_menu">Back to site menu</a>
|
||||||
|
|
||||||
{{ with .Site.Params.footer }}
|
{{ with .Site.Params.footer }}
|
||||||
|
|
|
@ -1,9 +1,29 @@
|
||||||
<div class="article-meta">
|
<div class="article-meta">
|
||||||
{{ if .Params.toc }}
|
|
||||||
|
<a id="page_menu" />
|
||||||
|
|
||||||
|
{{ if .Page.Params.toc }}
|
||||||
<a class="back_to_top" href="#top">Jump to ToC</a>
|
<a class="back_to_top" href="#top">Jump to ToC</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a class="back_to_top" href="#top">Jump to content</a>
|
<a class="back_to_top" href="#top">Jump to content</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .Page.Params.categories }}
|
||||||
|
| <a class="back_to_top" href="#categories">Jump to categories</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .Page.Params.tags }}
|
||||||
|
| <a class="back_to_top" href="#tags">Jump to tags</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||||
|
{{ $.Scratch.Set "has_related" true }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if $.Scratch.Get "has_related" }}
|
||||||
|
| <a class="back_to_top" href="#related">Jump to related pages</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<h1><span class="title">{{ .Title | markdownify }}</span></h1>
|
<h1><span class="title">{{ .Title | markdownify }}</span></h1>
|
||||||
{{ with .Params.author }}
|
{{ with .Params.author }}
|
||||||
<h3 class="author">By:
|
<h3 class="author">By:
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{{ if .Page.Params.toc }}
|
{{ if .Page.Params.toc }}
|
||||||
<a class="back_to_top" href="#top">Back to ToC</a>
|
<a class="back_to_top" href="#top">Back to ToC</a>
|
||||||
|
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a class="back_to_top" href="#top">Back to top</a>
|
<a class="back_to_top" href="#top">Back to top</a>
|
||||||
|
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<a class="back_to_top" href="#page_menu">Back to page menu</a>
|
|
@ -1,6 +1,9 @@
|
||||||
{{ if .Page.Params.toc }}
|
{{ if .Page.Params.toc }}
|
||||||
<a class="back_to_top" href="#top">Back to ToC</a>
|
<a class="back_to_top" href="#top">Back to ToC</a>
|
||||||
|
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a class="back_to_top" href="#top">Back to top</a>
|
<a class="back_to_top" href="#top">Back to top</a>
|
||||||
|
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<a class="back_to_top" href="#page_menu">Back to page menu</a>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
Loading…
Reference in a new issue