diff options
Diffstat (limited to 'themes/default/layouts/partials/navigator-middle.html')
-rw-r--r-- | themes/default/layouts/partials/navigator-middle.html | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/themes/default/layouts/partials/navigator-middle.html b/themes/default/layouts/partials/navigator-middle.html index 6521119..2c72120 100644 --- a/themes/default/layouts/partials/navigator-middle.html +++ b/themes/default/layouts/partials/navigator-middle.html @@ -1,8 +1,15 @@ -{{- $id := .Id -}} {{- $href := .Href -}} +{{- $id := or .Id "top" -}} +{{- $label := title $id -}} {{- $icon := readFile (print (partial "function-paths.html").static "/icons/feather/arrow-up.svg") -}} {{- $refresh := readFile (print (partial "function-paths.html").static "/icons/feather/refresh-cw.svg") -}} -{{- $label := "Top" -}} + +{{- with $paginator := .Context.Paginator -}} + {{- $href = or (and (eq $paginator.PageNumber 1) $href) + (and (gt $paginator.PageNumber 1) ($paginator.Prev.URL | absURL)) + "#" + -}} +{{- end -}} {{- with .Icon -}} {{- $icon = readFile (print (partial "function-paths.html").static "/icons/feather/" . ".svg") -}} @@ -16,8 +23,8 @@ <icon-button> <a data-update="" - id="{{ or $id "top" }}" - href="{{ or $href "#" }}" + id="{{ $id }}" + href="{{ $href }}" > {{ safeHTML $icon }} {{ safeHTML $refresh }} @@ -37,7 +44,7 @@ {{ if .Context.Site.Menus.main }} {{ range .Context.Site.Menus.main }} - <icon-navigator hidden> + <icon-navigator hidden=""> <icon-button> <a id="nav-middle-{{ path.Base .Identifier }}" href="{{ .URL | absURL }}"> {{ with .Identifier }} @@ -70,11 +77,11 @@ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/search.svg")) }} <small>Search</small> </button> - <ul hidden id="search-results"></ul> + <ul hidden="" id="search-results"></ul> </form> </search-entry> </nav> <navigation-separator> - <hr hidden /> + <hr hidden="" /> </navigation-separator> |