Skip to content

Commit 67edba4

Browse files
authored
Ecosystem pagination (#55)
1 parent bbe58a6 commit 67edba4

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

_sass/ecosystem.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,3 +459,14 @@
459459
z-index: 1;
460460
position: absolute;
461461
}
462+
463+
.ecosystem .pagination {
464+
.page {
465+
border: 1px solid #dee2e6;
466+
padding: 0.5rem 0.75rem;
467+
}
468+
469+
.active .page {
470+
background-color: #dee2e6;
471+
}
472+
}

assets/filter-hub-tags.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ $(".filter-btn").on("click", function() {
7070

7171
//Scroll back to top of hub cards on click of next/previous page button
7272

73-
$(document).on("click", ".page", function() {
73+
$(document).on("click", ".page", function(e) {
74+
e.preventDefault();
7475
$('html, body').animate(
7576
{scrollTop: $("#pagination-scroll").position().top},
7677
'slow'

ecosystem/ecosystem.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h1>
1919
</div>
2020
</div>
2121

22-
<div class="main-content-wrapper">
22+
<div id="pagination-scroll" class="main-content-wrapper">
2323
<div class="main-content">
2424
<div class="container">
2525

@@ -60,6 +60,7 @@ <h1>
6060
</div>
6161
{% endfor %}
6262
</div>
63+
<div class="pagination d-flex justify-content-center"></div>
6364
</div>
6465

6566
<div class="join-notice">
@@ -122,7 +123,7 @@ <h1>
122123
});
123124
</script>
124125

125-
<script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
126-
<script ecosystem="true" star-count-call-date="ecosystemStarCountCallDate" star-count-data="ecosystemStarCountData" src="{{ site.baseurl }}/assets/github-stars.js"></script>
127126
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
128-
<script id="filter-script" list-id="ecosystem-index-cards" display-count="100" pagination="false" src="{{ site.baseurl }}/assets/filter-hub-tags.js"></script>
127+
<script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
128+
<script list-id="ecosystem-index-cards" display-count="10" pagination="true" src="{{ site.baseurl }}/assets/filter-hub-tags.js"></script>
129+
<script ecosystem="true" star-count-call-date="ecosystemStarCountCallDate" star-count-data="ecosystemStarCountData" src="{{ site.baseurl }}/assets/github-stars.js"></script>

0 commit comments

Comments
 (0)