Align pagination and post navigation with wide layout
This commit is contained in:
+7
-1
@@ -46,7 +46,13 @@
|
||||
comments_template();
|
||||
}
|
||||
|
||||
the_post_navigation();
|
||||
// Wrap navigation titles so directional markers can remain un-underlined.
|
||||
the_post_navigation(
|
||||
array(
|
||||
'prev_text' => '<span class="post-navigation-title">%title</span>',
|
||||
'next_text' => '<span class="post-navigation-title">%title</span>',
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
@@ -651,9 +651,87 @@ h4 {
|
||||
font-family: "Berkeley Mono", monospace;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
/* Archive and search pagination follows the wide page-title alignment. */
|
||||
.pagination {
|
||||
width: min(var(--wide), calc(100vw - 3rem));
|
||||
max-width: none;
|
||||
margin-left: 50%;
|
||||
margin-right: 0;
|
||||
transform: translateX(-50%);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.pagination .nav-links {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-height: 1.8em;
|
||||
gap: 0.8rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Keep the numbered sequence centered independently of the available directional links. */
|
||||
.pagination .prev,
|
||||
.pagination .next {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.pagination .prev {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.pagination .next {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* Previous/next article navigation uses the same wide treatment as archive pagination. */
|
||||
.post-navigation {
|
||||
width: min(var(--wide), calc(100vw - 3rem));
|
||||
max-width: none;
|
||||
margin-left: 50%;
|
||||
margin-right: 0;
|
||||
transform: translateX(-50%);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.post-navigation .nav-links {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.post-navigation .nav-next {
|
||||
margin-left: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Keep link decoration on the title only, leaving the directional markers clean. */
|
||||
.post-navigation a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-navigation .post-navigation-title {
|
||||
text-decoration-line: underline;
|
||||
text-decoration-thickness: 0.08em;
|
||||
text-underline-offset: 0.14em;
|
||||
}
|
||||
|
||||
.post-navigation .nav-previous a::before,
|
||||
.post-navigation .nav-next a::after {
|
||||
color: var(--accent);
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.post-navigation .nav-previous a::before {
|
||||
margin-right: 0.5em;
|
||||
content: "◂";
|
||||
}
|
||||
|
||||
.post-navigation .nav-next a::after {
|
||||
margin-left: 0.5em;
|
||||
content: "▸";
|
||||
}
|
||||
.page-numbers {
|
||||
padding: 0.25rem;
|
||||
|
||||
Reference in New Issue
Block a user