mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Add prev/next post navigation links
Also adjust some margins to eliminate cut-off elements.
This commit is contained in:
parent
937369b777
commit
b519c5f371
4 changed files with 24 additions and 3 deletions
|
@ -77,10 +77,12 @@ html {
|
|||
|
||||
/* Compensate for misalignment and wasted space caused by padding
|
||||
* and margin adjustments in nav children made to meet SC 2.5.5 */
|
||||
header > nav,
|
||||
footer > nav {
|
||||
header > nav {
|
||||
margin: 0 0 -.75em -.25em;
|
||||
}
|
||||
footer > nav {
|
||||
margin: -.75em 0 0 -.25em;
|
||||
}
|
||||
|
||||
summary {
|
||||
/* The tappable region of a <summary> extends across the page.
|
||||
|
@ -277,6 +279,7 @@ picture > img {
|
|||
/* WCAG Technique C25: use borders to separate sections.
|
||||
* Also use "content-visibility: auto" to improve performance by
|
||||
* reducing the number of DOM nodes rendered at once. */
|
||||
aside,
|
||||
footer,
|
||||
section[aria-labelledby="webmentions"] {
|
||||
border-top: 1px solid;
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
list-style: none;
|
||||
}
|
||||
|
||||
/* Hide screen-only content */
|
||||
|
||||
aside,
|
||||
/* An un-opened summary inside an article has no use in print.
|
||||
* Outside an article it's used in my webring list where it has some
|
||||
* use, see below. */
|
||||
|
|
14
layouts/partials/prev-next.html
Normal file
14
layouts/partials/prev-next.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<aside aria-labelledby="continue-hd">
|
||||
<nav aria-labelledby="continue-hd">
|
||||
<h2 id="continue-hd">Continue reading</h2>
|
||||
<ul>
|
||||
{{- with .PrevInSection }}
|
||||
<li>Previous post: <a href="{{ .Permalink }}" rel="prev">{{ .Title }}</a></li>
|
||||
{{- end -}}
|
||||
{{- with .NextInSection }}
|
||||
<li>Next post: <a href="{{ .Permalink }}" rel="next">{{ .Title }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
<p role="separator">That's all, folks.</p>
|
||||
</aside>
|
|
@ -5,4 +5,5 @@
|
|||
{{ partial "full-article.html" . }}
|
||||
{{ partial "webmentions.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
||||
{{ partial "prev-next.html" . -}}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue