Skip to content

Commit 417980c

Browse files
author
Pat Mellon
committed
wip - sort button
1 parent 26aa538 commit 417980c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

blog/all-posts.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,20 @@
1212
<div class="main-content-wrapper">
1313
<div class="main-content">
1414
<div class="container">
15-
<div id="all-blog-posts">
15+
{% assign all_tags = posts | map: "tags" | join: ',' | split: ',' | uniq | sort %}
16+
17+
<div class="dropdown">
18+
<button id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
19+
Sort <img src="{{ site.baseurl }}/assets/images/filter-arrow.svg">
20+
</button>
21+
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
22+
{% for tag in all_tags %}
23+
<div class="dropdown-item filter-btn" data-tag="{{ tag }}">{{ tag | capitalize }}</div>
24+
{% endfor %}
25+
</div>
26+
</div>
1627

28+
<div id="all-blog-posts">
1729
<div class="list row blog-index">
1830
{% for post in posts %}
1931
<div class="col-md-4" data-tags="{{ post.tags | join: ',' }}">

0 commit comments

Comments
 (0)