Skip to content

Commit 1b08b2a

Browse files
committed
- remove year filters and add show and hide buttons
1 parent 540ea3a commit 1b08b2a

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

index.html

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,16 @@
2323
</div>
2424

2525
<p style="text-align:right">
26-
<em id="reverse-filter"><a>&#8644; reverse order</a></em>
26+
<a id="reverse-filter">&#8644; reverse order</a> |
27+
<a id="hide-all">hide all</a> |
28+
<a id="show-all">show all</a>
2729
</p>
2830

2931
<p id="categories">
3032

3133
<strong>filter posts:</strong>
32-
3334
{% assign sorted_categories = site.categories | sort %}
34-
3535
<span>
36-
{% assign most_recent_year = site.posts[0].date | date:'%Y' %}
37-
38-
<a class="disabled">{{ most_recent_year }}</a>
39-
40-
{% for post in site.posts %}
41-
{% assign year = post.date | date:'%Y' %}
42-
{% if year != most_recent_year %}
43-
<a class="disabled">{{ year }}</a>
44-
{% assign most_recent_year = year %}
45-
{% endif %}
46-
{% endfor %}
47-
4836
{% for category in sorted_categories %}
4937
<a class="disabled">{{ category | first }}</a>
5038
{% endfor %}
@@ -83,7 +71,6 @@
8371
if (location.hash) {
8472
var hash = location.hash.slice(1);
8573
hash = hash.split('-');
86-
8774
}
8875

8976
if (hash) {
@@ -93,6 +80,6 @@
9380
document.getElementById('reader-title').style.display = 'none';
9481
}
9582
else {
96-
categoryFilter(['2020', '2019', '2018', '2017', '2016', '2015']);
83+
categoryFilter(['all']);
9784
}
9885
</script>

0 commit comments

Comments
 (0)