Skip to content

Commit

Permalink
Fix: Single post pagination.
Browse files Browse the repository at this point in the history
Fixes #40.
  • Loading branch information
ellenbauer committed Sep 18, 2019
1 parent e9efe6c commit 2690a4f
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 88 deletions.
19 changes: 16 additions & 3 deletions assets/sass/layout/_grid.scss
Expand Up @@ -198,6 +198,7 @@
/* Grid Columns */
.posts-container,
.single-post .nav-links {

@include flexbox;
flex-wrap: wrap;
flex-direction: row;
Expand Down Expand Up @@ -232,18 +233,30 @@
.s6,
.single-post .related-post,
.single-post .navigation .next,
.post-navigation .nav-next,
.single-post .navigation .prev,
.post-navigation .nav-previous {
.single-post .navigation .prev {
width: 100%; // 1-column on mobile
flex-grow: 0;

@include breakpoint(m) {
flex-basis: calc(50% - 48px);
margin-left: $spacing-desktop-3;
margin-right: $spacing-desktop-3;
}
}

.post-navigation .nav-next,
.post-navigation .nav-previous {
width: 100%; // 1-column on mobile
flex-grow: 0;

@include breakpoint(m) {
flex-basis: calc(50%);
padding-left: $spacing-desktop-3;
padding-right: $spacing-desktop-3;
}
}


/* 3-Columns */
.blog-3-column .posts-container .hentry,
.header-infobar .col,
Expand Down
1 change: 0 additions & 1 deletion assets/sass/mixins/_mixins-master.scss
Expand Up @@ -56,7 +56,6 @@ $var: true !default; // Can be overridden elsewhere

// Flexbox
@mixin flexbox {
display: -ms-flexbox;
display: flex;
}

Expand Down
32 changes: 27 additions & 5 deletions assets/sass/site/_pagination.scss
Expand Up @@ -124,9 +124,25 @@
align-items: center;
}

.nav-previous {
padding-bottom: $spacing-mobile-6;

@include breakpoint(m) {
padding-bottom: 0;
}
}

.nav-next {
flex-direction: row-reverse;
justify-content: flex-end;
padding-top: $spacing-mobile-6;
border-top: 1px solid $color__border;

@include breakpoint(m) {
flex-direction: row-reverse;
justify-content: flex-end;
padding-top: 0;
border-top: none;
border-left: 1px solid $color__border;
}
}

.nav-thumb {
Expand All @@ -138,16 +154,22 @@
}

.nav-next .nav-thumb {
margin: 0 0 0 $spacing-2;

@include breakpoint(m) {
margin: 0 0 0 $spacing-2;
}
}

.nav-title {
display: block;
width: 360px;
}

.nav-next .nav-title {
text-align: right;

@include breakpoint(m) {
text-align: right;
flex-grow: 3;
}
}

.nav-title span {
Expand Down
2 changes: 1 addition & 1 deletion style-editor.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion style-editor.css.map

Large diffs are not rendered by default.

86 changes: 48 additions & 38 deletions style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion style.css.map

Large diffs are not rendered by default.

79 changes: 42 additions & 37 deletions style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion template-parts/post/nav-single.php
Expand Up @@ -10,7 +10,7 @@

<nav class="navigation post-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Post navigation', 'aino' ); ?></h2>
<div class="nav-links cf">
<div class="nav-links">

<?php $prev_post = get_previous_post(); ?>

Expand Down

0 comments on commit 2690a4f

Please sign in to comment.