Skip to content

Commit 83815fc

Browse files
committed
chore: even moar index magic
1 parent 9b1fff2 commit 83815fc

9 files changed

Lines changed: 97 additions & 61 deletions

File tree

docs/_includes/ipage.html

Lines changed: 89 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,94 @@
1-
## Latest {{ include.header }}:
2-
3-
<div>
4-
{% assign main = include.main %}
5-
{% assign secondary = include.secondary | split: ',' %}
6-
7-
{% assign options = main | concat: secondary %}
8-
{% assign second = options[1] | strip %}
9-
10-
{% assign sorted_posts = site.pages | sort: main %}
11-
12-
<div id="sortOptions">
13-
14-
<i>Sort by:</i>
15-
<br />
16-
{% for opt in options %}
17-
<label style="margin-right: 20px">
18-
<input type="radio" name="sortBy" value="{{ opt | strip }}" {% if forloop.first %}checked{% endif %}>
19-
{{ opt | capitalize }}
20-
</label>
21-
{% endfor %}
22-
23-
<br />
24-
<i>Order:</i><br />
25-
<label id="labelAsc">
26-
<input type="radio" name="sortOrder" value="asc" checked>
27-
</label>
28-
<label id="labelDesc" style="margin-left: 20px;">
29-
<input type="radio" name="sortOrder" value="desc">
30-
</label>
31-
32-
</div>
33-
34-
35-
36-
<ul id="itemList">
37-
{% for post in sorted_posts %}
38-
{% if post.path contains include.area and post[main] %}
39-
<li data-{{ main }}="{{ post[main] }}"
40-
{% if secondary %}
41-
{% for opt in secondary %}
42-
data-{{opt}}="{{ post[opt] | downcase }}"
43-
{% endfor %}
1+
<style>
2+
.container {
3+
display: flex;
4+
flex-direction: column;
5+
gap: 0rem;
6+
}
7+
8+
.row2 {
9+
display: flex;
10+
gap: 1rem;
11+
}
12+
13+
.row2 .first {
14+
flex: none;
15+
}
16+
17+
.row2 .last {
18+
flex: 1;
19+
}
20+
21+
@media (max-width: 600px) {
22+
.row2 {
23+
flex-direction: column;
24+
}
25+
}
26+
</style>
27+
28+
<hr/>
29+
30+
<div class="container">
31+
<!--<h4 class="text-epsilon">Latest {{ include.header }}</h4>-->
32+
33+
<div>
34+
{% assign main = include.main %}
35+
{% assign secondary = include.secondary | split: ',' %}
36+
37+
{% assign options = main | concat: secondary %}
38+
{% assign second = options[1] | strip %}
39+
40+
{% assign sorted_posts = site.pages | sort: main %}
41+
42+
<div class="row2" id="sortOptions">
43+
44+
<div class="first">
45+
<h4 class="text-delta"><i>Sort by:</i></h4>
46+
{% for opt in options %}
47+
<label style="margin-right: 20px">
48+
<input type="radio" name="sortBy" value="{{ opt | strip }}" {% if forloop.first %}checked{% endif %}>
49+
{{ opt | capitalize }}
50+
</label>
51+
{% endfor %}
52+
</div>
53+
54+
55+
<div class="last">
56+
<h4 class="text-delta"><i>Order by:</i></h4>
57+
<label id="labelAsc">
58+
<input type="radio" name="sortOrder" value="asc" checked>
59+
</label>
60+
<label id="labelDesc" style="margin-left: 20px;">
61+
<input type="radio" name="sortOrder" value="desc">
62+
</label>
63+
</div>
64+
</div>
65+
66+
<h4 class="text-delta"><i>{{ include.header }}:</i></h4>
67+
<ul id="itemList">
68+
{% for post in sorted_posts %}
69+
{% if post.path contains include.area and post[main] %}
70+
<li data-{{ main }}="{{ post[main] }}"
71+
{% if secondary %}
72+
{% for opt in secondary %}
73+
data-{{opt}}="{{ post[opt] | downcase }}"
74+
{% endfor %}
75+
{% endif %}
76+
>
77+
<a href="{{ post.url }}">
78+
{{ post[main]}}
79+
{% if secondary %}
80+
81+
{% for sec in secondary %}
82+
{{post[sec]}}{% unless forloop.last %}, {% endunless %}
83+
{% endfor %}
84+
{% endif %}
85+
</a>
86+
</li>
4487
{% endif %}
45-
>
46-
<a href="{{ post.url }}">
47-
{{ post[main]}}
48-
{% if secondary %}
49-
50-
{% for sec in secondary %}
51-
{{post[sec]}}{% unless forloop.last %}, {% endunless %}
52-
{% endfor %}
53-
{% endif %}
54-
</a>
55-
</li>
56-
{% endif %}
57-
{% endfor %}
58-
</ul>
88+
{% endfor %}
89+
</ul>
90+
</div>
5991
</div>
60-
6192
<script>
6293
document.addEventListener("DOMContentLoaded", () => {
6394
function updateOrderLabels(sortField) {

docs/blog/2025-06-25.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 25-06-2025
2+
title: June 25th, 2025
33
layout: page
44
parent: Blog posts
55
tags: [one finger death punch, savegame, python]

docs/blog/2025-07-16.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 16-07-2025
2+
title: July 16th, 2025
33
layout: page
44
parent: Blog posts
55
tags: [calisthenics, woodworking, planche, parallettes, training]

docs/blog/2025-09-10.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 10-09-2025
2+
title: September 10th, 2025
33
layout: page
44
parent: Blog posts
55
tags: [data, backups, archival, minimalism]

docs/blog/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Blog posts
33
nav_order: 3
44
layout: page
55
has_children: true
6+
67
---
78

89
{% include ipage.html

docs/calculators/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Calculators and utilities
33
nav_order: 4
44
layout: page
55
has_children: true
6+
has_toc: false
67
---
78

89
# On the fly calculators and utilities

docs/cheatsheets/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Cheatsheets and resources
33
nav_order: 5
44
layout: page
55
has_children: true
6+
has_toc: false
67
---
78

89
# Cheatsheets and various useful resources!

docs/projects/hardware/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ nav_order: 2
44
layout: page
55
parent: Projects
66
has_children: true
7+
has_toc: false
78
---
89

910
# Hardware projects

docs/projects/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Projects
33
nav_order: 2
44
layout: page
55
has_children: true
6+
has_toc: false
67
---
78

89

0 commit comments

Comments
 (0)