Skip to content

Commit

Permalink
Fix reading year nav bar now we're 5yrs+
Browse files Browse the repository at this point in the history
Bar was too wide for mobile view, so let's simply it
  • Loading branch information
huwd committed Jan 10, 2024
1 parent 1c915b6 commit 648017d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
16 changes: 16 additions & 0 deletions _data/books.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
[
{
"title": "Not the end of the world",
"authors": [
"Hannah Richie"
],
"work_iri": "https://www.wikidata.org/wiki/",
"edition_iri": "https://www.wikidata.org/wiki/"
},
{
"title": "Cinema Speculation",
"authors": [
"Quentin Tarintio"
],
"work_iri": "https://www.wikidata.org/wiki/",
"edition_iri": "https://www.wikidata.org/wiki/"
},
{
"title": "Wilding",
"subtitle": "The return of nature to a British far",
Expand Down
4 changes: 1 addition & 3 deletions _data/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
"book_years": [
"2024",
"2023",
"2022",
"2021",
"2020"
"2022"
]
}
3 changes: 3 additions & 0 deletions _includes/book_list_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
<a {% if year==page.year %} class="active" {% endif %} href="/reading/{{year}}">{{year}}</a>
</li>
{% endfor %}
<li>
<a href="/reading#2021">older</a>
</li>
</ul>
</nav>
2 changes: 1 addition & 1 deletion reading.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% assign finished_books_by_year = finished_books | group_by_exp:"book", "book.date_finished | date: '%Y'" %}
{% for year in finished_books_by_year %}

<h2>{{ year.name }}</h2>
<h2 id="{{year.name}}">{{ year.name }}</h2>
<ul>
{% for book in year.items %}
<li>
Expand Down

0 comments on commit 648017d

Please sign in to comment.