Skip to content

Commit

Permalink
Resolve broken URLs in pagination & series sidebar widgets.
Browse files Browse the repository at this point in the history
  • Loading branch information
toddbirchard committed Jun 9, 2024
1 parent 3a7650d commit b7b9263
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"defaults"
],
"config": {
"posts_per_page": 15,
"posts_per_page": 10,
"image_sizes": {
"xxs": {
"width": 30
Expand Down Expand Up @@ -140,7 +140,8 @@
"type": "boolean",
"default": false,
"group": "homepage"
}
},
"posts_per_series_page": 15
},
"renovate": {
"extends": [
Expand Down
23 changes: 14 additions & 9 deletions partials/pagination.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<nav class="pagination" role="navigation">

<a class="pagination-arrow newer-posts {{#unless prev}}hidden{{/unless}}" href="{{page_url prev}}">
<i class="fa-sharp fa-solid fa-arrow-left"></i>
</a>

{{#if prev}}
<a class="pagination-arrow newer-posts" href="{{page_url prev}}">
<i class="fa-sharp fa-solid fa-arrow-left"></i>
</a>
{{else}}
<div class="fake-pagination-button"></div>
{{/if}}
<span class="page-number">Page {{page}} of {{pages}}</span>

<a class="pagination-arrow older-posts {{#unless next}}hidden{{/unless}}" href="{{page_url next}}">
<i class="fa-sharp fa-solid fa-arrow-right"></i>
</a>
{{#if next}}
<a class="pagination-arrow older-posts }" href="{{page_url next}}">
<i class="fa-sharp fa-solid fa-arrow-right"></i>
</a>
{{else}}
<div class="fake-pagination-button"></div>
{{/if}}
</nav>
5 changes: 3 additions & 2 deletions partials/sidebar/series-widget.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
{{#get "tags"
limit="all"
filter="slug:-[adventures-in-excel,newsletter,code-snippet-corner,hacking-tableau-server,microsoft-powerpivot,mongodb-cloud,create-an-aws-api]"
include="count.posts,meta_title,accent_color"
include="slug,count.posts,meta_title,accent_color"
visibility="internal"
order="count.posts DESC"
}}
{{#foreach tags visibility="internal"}}
<div class="series-list-link">
<a href="{{url}}" class="series-list-link-title">{{meta_title}}</a>
<a href="/series/{{slug}}/" class="series-list-link-title">{{meta_title}}</a>
<span class="series-list-count" style="color:{{accent_color}};border-color:{{accent_color}};">{{count.posts}}</span>
</div>
{{/foreach}}
Expand Down
6 changes: 6 additions & 0 deletions src/scss/pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
}
}

.fake-pagination-button {
display: block;
width: 21px;
height: 21px;
}

.hidden {
visibility: hidden;
}
Expand Down

0 comments on commit b7b9263

Please sign in to comment.