mirror of
https://github.com/trwnh/hugo-theme-paradox.git
synced 2024-12-25 23:58:47 +00:00
add wip footer menu and fix edit links
This commit is contained in:
parent
607c2a538e
commit
13c5b18a1a
10 changed files with 43 additions and 21 deletions
|
@ -118,9 +118,13 @@
|
|||
}
|
||||
/* tables */
|
||||
table {text-align: center;}
|
||||
thead {font-weight: 700;}
|
||||
thead {
|
||||
font-weight: 700;
|
||||
background: var(--ui-overlay);
|
||||
color: var(--ui-overlay-text);
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
border: 1px solid var(--ui-text);
|
||||
padding: 0.5em;
|
||||
}
|
||||
/* {{<hint>}} shortcode */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
.header-nav,
|
||||
.docs-nav,
|
||||
.site-footer,
|
||||
.edit-on-github,
|
||||
.edit-link,
|
||||
.footnote-backref
|
||||
{
|
||||
display: none;
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
<div class="container">
|
||||
<h1 class="page-title">{{ .Title }}</h1>
|
||||
<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" . }}
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<section class="content section">
|
||||
<div class="container">
|
||||
{{ .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>
|
||||
</section>
|
||||
</article>
|
||||
|
|
14
layouts/partials/breadcrumbs.html
Normal file
14
layouts/partials/breadcrumbs.html
Normal 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 }}
|
|
@ -4,7 +4,7 @@
|
|||
<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">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h7" />
|
||||
</svg> Menu</label>
|
||||
</svg> Documentation Menu</label>
|
||||
<ul class="menu">
|
||||
<a id="menu" href="#top">Skip menu</a>
|
||||
{{ $currentPage := . }}
|
15
layouts/partials/nav-footer.html
Normal file
15
layouts/partials/nav-footer.html
Normal 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>
|
|
@ -1,20 +1,8 @@
|
|||
<footer class="site-footer">
|
||||
<hr>
|
||||
<div class="container">
|
||||
<ul class="breadcrumbs">
|
||||
{{ template "breadcrumb" (dict "p1" . "p2" .) }}
|
||||
</ul>
|
||||
{{ partial "nav-footer.html" . }}
|
||||
<a href="#top">back to top</a>
|
||||
</div>
|
||||
</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 }}
|
|
@ -4,10 +4,10 @@
|
|||
<img class="site-icon" height="32" src="{{.Site.Params.icon}}">
|
||||
<p class="site-title">{{.Site.Params.title}}</p>
|
||||
</a>
|
||||
{{ partial "main-menu.html" . }}
|
||||
{{ partial "nav-header.html" . }}
|
||||
</div>
|
||||
</header>
|
||||
<div class="scroll-margin" style="position: relative;">
|
||||
<div id="top" style="scroll-margin-top: var(--header-height);"></div>
|
||||
</div>
|
||||
{{ partial "docs-menu.html" . }}
|
||||
{{ partial "nav-docs.html" . }}
|
Loading…
Reference in a new issue