Commit 71c38783 authored by Dan Allen's avatar Dan Allen
Browse files

add pagination nav to bottom of page

parent ff7f9dd7
......@@ -63,6 +63,14 @@ page:
editUrl: http://example.com/project-xyz/blob/master/index.adoc
origin:
private: false
previous:
content: Quickstart
url: '#'
urlType: 'internal'
next:
content: Liber Recusabo
url: '#'
urlType: 'internal'
breadcrumbs:
- content: Quickstart
url: '#'
......
nav.pagination {
display: flex;
border-top: 1px solid var(--toolbar-border-color);
line-height: 1;
margin: 2rem -1rem -1rem;
padding: 0.75rem 1rem 0;
}
nav.pagination span {
display: flex;
flex: 50%;
flex-direction: column;
}
nav.pagination .prev {
padding-right: 0.5rem;
}
nav.pagination .next {
margin-left: auto;
padding-left: 0.5rem;
text-align: right;
}
nav.pagination span::before {
color: var(--toolbar-muted-color);
font-size: 0.75em;
padding-bottom: 0.1em;
}
nav.pagination .prev::before {
content: "Prev";
}
nav.pagination .next::before {
content: "Next";
}
nav.pagination a {
font-weight: var(--body-font-weight-bold);
line-height: 1.3;
position: relative;
}
nav.pagination a::before,
nav.pagination a::after {
color: var(--toolbar-muted-color);
font-weight: normal;
font-size: 1.5em;
line-height: 0.75;
position: absolute;
top: 0;
width: 1rem;
}
nav.pagination .prev a::before {
content: "\2039";
transform: translateX(-100%);
}
nav.pagination .next a::after {
content: "\203a";
}
......@@ -10,6 +10,7 @@
@import "page-versions.css";
@import "toc.css";
@import "doc.css";
@import "pagination.css";
@import "header.css";
@import "footer.css";
@import "highlight.css";
......
......@@ -14,4 +14,5 @@ If you typed the URL of this page manually, please double check that you entered
{{/with}}
{{{page.contents}}}
{{/if}}
{{> pagination}}
</article>
{{#if (or page.previous page.next)}}
<nav class="pagination">
{{#with page.previous}}
<span class="prev"><a href="{{{relativize ./url}}}">{{{./content}}}</a></span>
{{/with}}
{{#with page.next}}
<span class="next"><a href="{{{relativize ./url}}}">{{{./content}}}</a></span>
{{/with}}
</nav>
{{/if}}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment