--- a/hugo/themes/learn/layouts/partials/footer.html Tue Jun 11 03:44:34 2019 +0100
+++ b/hugo/themes/learn/layouts/partials/footer.html Tue Jun 11 03:59:19 2019 +0100
@@ -2,7 +2,7 @@
</div> <!-- end chapter-->
{{ partial "custom-comments.html" . }}
@@ -15,7 +15,7 @@
{{ define "menu-nextprev" }}
{{ $currentNode := .currentnode }}
{{ if ne .menu.Params.hidden true }}
- {{ if hasPrefix $currentNode.URL .menu.URL }}
+ {{ if hasPrefix $currentNode.RelPermalink .menu.RelPermalink }} {{ $currentNode.Scratch.Set "NextPageOK" "OK" }}
{{ $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") }}
@@ -44,16 +44,16 @@
{{ $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }}
{{ with ($.Scratch.Get "prevPage") }}
- <a class="nav nav-prev" href="{{ .URL }}" title="{{ .Title }}"> <i class="fa fa-chevron-left"></i></a>
+ <a class="nav nav-prev" href="{{ .RelPermalink }}" title="{{ .Title }}"> <i class="fa fa-chevron-left"></i></a> {{ with ($.Scratch.Get "nextPage") }}
- <a class="nav nav-next" href="{{ .URL }}" title="{{ .Title }}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
+ <a class="nav nav-next" href="{{ .RelPermalink }}" title="{{ .Title }}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
--- a/hugo/themes/learn/layouts/partials/header.html Tue Jun 11 03:44:34 2019 +0100
+++ b/hugo/themes/learn/layouts/partials/header.html Tue Jun 11 03:59:19 2019 +0100
@@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ partial "meta.html" . }}
{{ partial "favicon.html" . }}
<title>{{ .Title }} :: {{ .Site.Title }}</title>
@@ -50,13 +50,21 @@
{{ if and (or .IsPage .IsSection) .Site.Params.editURL }}
- <div id="top-github-link">
- <a class="github-link" title='{{ T "Edit-this-page" }}' href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" target="blank">
- <i class="fas fa-code-branch"></i>
- <span id="top-github-link-text">{{ T "Edit-this-page" }}</span>
+ <div id="top-github-link"> + title='{{ T "Edit-this-page" }}' + href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" + <i class="fas fa-code-branch"></i> + <span id="top-github-link-text">{{ T "Edit-this-page" }}</span> @@ -75,7 +83,7 @@
{{ template "breadcrumb" dict "page" . "value" .Title }}
@@ -109,9 +117,9 @@
{{ define "breadcrumb" }}
{{ $parent := .page.Parent }}
- {{ $value := (printf "<a href='%s'>%s</a> > %s" $parent.URL $parent.Title .value) }}
- {{ template "breadcrumb" dict "page" $parent "value" $value }}
+ {{ $value := (printf "<a href='%s'>%s</a> > %s" $parent.RelPermalink $parent.Title .value) }} + {{ template "breadcrumb" dict "page" $parent "value" $value }}
+ {{ .value | safeHTML }} --- a/hugo/themes/learn/layouts/partials/menu.html Tue Jun 11 03:44:34 2019 +0100
+++ b/hugo/themes/learn/layouts/partials/menu.html Tue Jun 11 03:59:19 2019 +0100
@@ -13,16 +13,12 @@
<div class="highlightable">
+ {{ $orderByTitle := (eq .Site.Params.ordersectionsby "title") }} + {{ $sections := cond $orderByTitle .Site.Home.Sections.ByTitle .Site.Home.Sections.ByWeight }} - {{ if eq .Site.Params.ordersectionsby "title" }}
- {{ range .Site.Home.Sections.ByTitle }}
- {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
- {{ range .Site.Home.Sections.ByWeight }}
- {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
+ {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} {{ $disableShortcutsTitle := .Site.Params.DisableShortcutsTitle }}
@@ -31,7 +27,7 @@
<h3>{{ if not $disableShortcutsTitle }}{{ T "Shortcuts-Title" }}{{ end }}</h3>
{{ range sort . "Weight" }}
{{ .Pre }}<a class="padding" href="{{ .URL | absLangURL }}">{{ safeHTML .Name }}</a>{{ .Post }}
@@ -56,11 +52,11 @@
{{ range $siteLanguages }}
{{ if eq $translation.Lang .Lang }}
- {{ if eq $pageLang .Lang }}
- <option id="{{ $translation.Language }}" value="{{ $translation.URL }}" selected>{{ .LanguageName }}</option>
- <option id="{{ $translation.Language }}" value="{{ $translation.URL }}">{{ .LanguageName }}</option>
+ id="{{ $translation.Language }}" + value="{{ $translation.RelPermalink }}" + {{ if eq $pageLang .Lang }}selected{{ end }} + >{{ .LanguageName }}</option> @@ -90,16 +86,16 @@
{{ define "section-tree-nav" }}
{{ $showvisitedlinks := .showvisitedlinks }}
{{ $currentNode := .currentnode }}
{{ safeHTML .Params.head }}
- <li data-nav-id="{{ .URL }}" title="{{ .Title }}" class="dd-item
+ <li data-nav-id="{{ .RelPermalink }}" title="{{ .Title }}" class="dd-item {{- if .IsAncestor $currentNode }} parent{{ end -}}
- {{- if eq .UniqueID $currentNode.UniqueID }} active{{ end -}}
+ {{- if and (eq .File.UniqueID $currentNode.File.UniqueID) }} active{{ end -}} {{- if .Params.alwaysopen }} parent{{ end }}">
<a href="{{ .RelPermalink }}">
{{ safeHTML .Params.Pre }}{{ or .Params.menuTitle .LinkTitle .Title }}{{ safeHTML .Params.Post }}
@@ -136,9 +132,15 @@
{{ if not .Params.Hidden }}
- <li data-nav-id="{{ .URL }}" title="{{ .Title }}" class="dd-item {{ if eq .UniqueID $currentNode.UniqueID }}active{{ end }}">
+ data-nav-id="{{ .RelPermalink }}" + class="dd-item {{ if eq .File.UniqueID $currentNode.File.UniqueID }}active{{ end }}" <a href="{{ .RelPermalink }}">
- {{ safeHTML .Params.Pre }}{{ or .Params.menuTitle .LinkTitle .Title }}{{ safeHTML .Params.Post }}
+ {{ safeHTML .Params.Pre }} + {{ or .Params.menuTitle .LinkTitle .Title }} + {{ safeHTML .Params.Post }} {{ if $showvisitedlinks }}
<i class="fas fa-check read-icon"></i>
@@ -148,4 +150,3 @@