add wip footer menu and fix edit links

This commit is contained in:
a 2022-10-14 03:36:35 -05:00
parent 607c2a538e
commit 13c5b18a1a
10 changed files with 43 additions and 21 deletions

View file

@ -118,9 +118,13 @@
} }
/* tables */ /* tables */
table {text-align: center;} table {text-align: center;}
thead {font-weight: 700;} thead {
font-weight: 700;
background: var(--ui-overlay);
color: var(--ui-overlay-text);
}
th, td { th, td {
border: 1px solid black; border: 1px solid var(--ui-text);
padding: 0.5em; padding: 0.5em;
} }
/* {{<hint>}} shortcode */ /* {{<hint>}} shortcode */

View file

@ -8,7 +8,7 @@
.header-nav, .header-nav,
.docs-nav, .docs-nav,
.site-footer, .site-footer,
.edit-on-github, .edit-link,
.footnote-backref .footnote-backref
{ {
display: none; display: none;

View file

@ -5,7 +5,8 @@
<div class="container"> <div class="container">
<h1 class="page-title">{{ .Title }}</h1> <h1 class="page-title">{{ .Title }}</h1>
<p class="page-summary">{{.Page.Summary}}</p> <p class="page-summary">{{.Page.Summary}}</p>
<p class="lastmod">Last modified <datetime class="date">{{ .Lastmod.Format "Mon Jan 2, 2006" }}</datetime><span class="edit-on-github"> - <a href="{{.Site.Params.repo}}/edit/{{.Site.Params.branch}}/content/{{.File.Lang}}/{{.File.Path}}">Edit this page on Github</a></span></p>
<p class="lastmod">Last modified <datetime class="date">{{ .Lastmod.Format "Mon Jan 2, 2006" }}</datetime><span class="edit-link"> - <a href='{{if eq .Site.Params.forge "github"}}{{printf "https://github.com/%s/edit/%s/%s/%s" .Site.Params.repo .Site.Params.branch .Site.Language.ContentDir .File.Path}}{{else if eq .Site.Params.forge "gitea"}}{{printf "%s/%s/_edit/%s/%s/%s" .Site.Params.forgeUrl .Site.Params.repo .Site.Params.branch (cond (isset .Site.Language "ContentDir") .Site.Language.ContentDir "content") .File.Path}}{{else}}#{{end}}'>Edit this page</a></span></p>
{{ partial "i18nlist.html" . }} {{ partial "i18nlist.html" . }}
</div> </div>
</header> </header>

View file

@ -17,7 +17,7 @@
<section class="content section"> <section class="content section">
<div class="container"> <div class="container">
{{ .Content }} {{ .Content }}
<p class="lastmod">Last modified <datetime class="date"> {{ .Lastmod.Format "Mon Jan 2, 2006" }} </datetime> - <a href="{{.Site.Params.repo}}/edit/{{.Site.Params.branch}}/content/{{.File.Lang}}/{{.File.Path}}">Edit this page on Github</a></p> <p class="lastmod">Last modified <datetime class="date"><span class="edit-link">{{ .Lastmod.Format "Mon Jan 2, 2006" }}</datetime> - <a href='{{if eq .Site.Params.forge "github"}}{{printf "https://github.com/%s/edit/%s/%s/%s" .Site.Params.repo .Site.Params.branch .Site.Language.ContentDir .File.Path}}{{else if eq .Site.Params.forge "gitea"}}{{printf "%s/%s/_edit/%s/%s/%s" .Site.Params.forgeUrl .Site.Params.repo .Site.Params.branch (cond (isset .Site.Language "ContentDir") .Site.Language.ContentDir "content") .File.Path}}{{else}}#{{end}}'>Edit this page</a></span></p>
</div> </div>
</section> </section>
</article> </article>

View file

@ -0,0 +1,14 @@
<ul class="breadcrumbs">
{{ template "breadcrumb" (dict "p1" . "p2" .) }}
</ul>
{{ define "breadcrumb" }}
{{ if .p1.Parent }}
{{ template "breadcrumb" (dict "p1" .p1.Parent "p2" .p2 ) }}
{{ else if not .p1.IsHome }}
{{ template "breadcrumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
{{ end }}
<li{{ if eq .p1 .p2 }} class="active"{{ end }}>
<a href="{{ .p1.RelPermalink }}">{{ .p1.Title }}</a>
</li>
{{ end }}

View file

@ -4,7 +4,7 @@
<label class="toggle-menu__label" for="toggle"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" <label class="toggle-menu__label" for="toggle"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h7" /> <path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h7" />
</svg> Menu</label> </svg> Documentation Menu</label>
<ul class="menu"> <ul class="menu">
<a id="menu" href="#top">Skip menu</a> <a id="menu" href="#top">Skip menu</a>
{{ $currentPage := . }} {{ $currentPage := . }}

View file

@ -0,0 +1,15 @@
<nav class="footer-nav">
<ul class="menu">
{{ $currentPage := . }}
{{ range .Site.Menus.footer }}
<li
class='{{ if or ($currentPage.IsMenuCurrent "footer" .) (eq $currentPage.Section .Identifier) }}active{{ end }}'>
<a href="{{ .URL | absLangURL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
{{ .Post }}
</a>
</li>
{{ end }}
</ul>
</nav>

View file

@ -1,20 +1,8 @@
<footer class="site-footer"> <footer class="site-footer">
<hr> <hr>
<div class="container"> <div class="container">
<ul class="breadcrumbs"> {{ partial "nav-footer.html" . }}
{{ template "breadcrumb" (dict "p1" . "p2" .) }}
</ul>
<a href="#top">back to top</a> <a href="#top">back to top</a>
</div> </div>
</footer> </footer>
{{ define "breadcrumb" }}
{{ if .p1.Parent }}
{{ template "breadcrumb" (dict "p1" .p1.Parent "p2" .p2 ) }}
{{ else if not .p1.IsHome }}
{{ template "breadcrumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
{{ end }}
<li{{ if eq .p1 .p2 }} class="active"{{ end }}>
<a href="{{ .p1.RelPermalink }}">{{ .p1.Title }}</a>
</li>
{{ end }}

View file

@ -4,10 +4,10 @@
<img class="site-icon" height="32" src="{{.Site.Params.icon}}"> <img class="site-icon" height="32" src="{{.Site.Params.icon}}">
<p class="site-title">{{.Site.Params.title}}</p> <p class="site-title">{{.Site.Params.title}}</p>
</a> </a>
{{ partial "main-menu.html" . }} {{ partial "nav-header.html" . }}
</div> </div>
</header> </header>
<div class="scroll-margin" style="position: relative;"> <div class="scroll-margin" style="position: relative;">
<div id="top" style="scroll-margin-top: var(--header-height);"></div> <div id="top" style="scroll-margin-top: var(--header-height);"></div>
</div> </div>
{{ partial "docs-menu.html" . }} {{ partial "nav-docs.html" . }}