remove unnecessary links from footer ; add missing top/page_menu anchors on some templates

This commit is contained in:
KemoNine 2023-03-21 11:09:35 -04:00
parent b1a8aa429a
commit 2adad06454
4 changed files with 6 additions and 17 deletions

View file

@ -1,6 +1,8 @@
{{ partial "header.html" . }}
{{ if not .Params.isBranchWithContent }}
<a id="top" />
<a id="page_menu" />
{{if not .IsHome }}
<h1>{{ .Title | markdownify }}</h1>
{{ end }}

View file

@ -1,5 +1,6 @@
{{ partial "header.html" . }}
<a id="top" />
<a id="page_menu" />
<main>
<form action="/search" method="GET">
<input type="search" name="q" id="search-query" title="Search query" placeholder="Search....">

View file

@ -1,7 +1,8 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
<a id="top" />
<a id="page_menu" />
<ul class="terms">
{{ range .Data.Terms }}
<li>

View file

@ -9,23 +9,8 @@
<a class="back_to_top" href="#top">Back to top</a>
{{ end }}
{{ with .Page.Params.categories }}
&nbsp;|&nbsp;<a class="back_to_top" href="#categories">Back to categories</a>
{{ end }}
{{ with .Page.Params.tags }}
&nbsp;|&nbsp;<a class="back_to_top" href="#tags">Back 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" }}
&nbsp;|&nbsp;<a class="back_to_top" href="#related">Back to related pages</a>
{{ end }}
&nbsp;|&nbsp;<a class="back_to_top" href="#page_menu">Back to page menu</a>
&nbsp;|&nbsp;<a class="back_to_top" href="#nav_menu">Back to site menu</a>
{{ with .Site.Params.footer }}
<br />{{ replace . "{Year}" now.Year | markdownify}}
{{ end }}