Skip to content

Commit ca13525

Browse files
Vowels and consonants in all albums.
1 parent a29eb1a commit ca13525

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

templates/frontend/components/album-table.html

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
{{ end }}
5050
</button>
5151
</th>
52-
<th class="px-4 py-3 min-w-[100px]">
52+
<th class="px-4 py-3 min-w-[60px]">
5353
<button class="flex items-center gap-1 hover:text-white w-full"
5454
hx-get="/all-albums/sort"
5555
hx-target="#albums-table"
@@ -61,6 +61,30 @@
6161
{{ end }}
6262
</button>
6363
</th>
64+
<th class="px-4 py-3 min-w-[60px]">
65+
<button class="flex items-center gap-1 hover:text-white w-full"
66+
hx-get="/all-albums/sort"
67+
hx-target="#albums-table"
68+
hx-indicator="#loading-indicator"
69+
hx-vals='{"sort": "vowels", "dir": "{{ .NextSortDir }}"}'>
70+
Vowels
71+
{{ if eq .Sort "vowels" }}
72+
{{ if eq .SortDir "asc" }}↑{{ else }}↓{{ end }}
73+
{{ end }}
74+
</button>
75+
</th>
76+
<th class="px-4 py-3 min-w-[60px]">
77+
<button class="flex items-center gap-1 hover:text-white w-full"
78+
hx-get="/all-albums/sort"
79+
hx-target="#albums-table"
80+
hx-indicator="#loading-indicator"
81+
hx-vals='{"sort": "consonants", "dir": "{{ .NextSortDir }}"}'>
82+
Consonants
83+
{{ if eq .Sort "consonants" }}
84+
{{ if eq .SortDir "asc" }}↑{{ else }}↓{{ end }}
85+
{{ end }}
86+
</button>
87+
</th>
6488
</tr>
6589
</thead>
6690
<tbody class="divide-y divide-gray-700">
@@ -78,6 +102,8 @@
78102
<td class="px-4 py-3">{{ .TotalUniqueWords }}</td>
79103
<td class="px-4 py-3">{{ .FormattedLength }}</td>
80104
<td class="px-4 py-3">{{ .AverageWordsPerTrack }}</td>
105+
<td class="px-4 py-3">Soon</td>
106+
<td class="px-4 py-3">Soon</td>
81107
</tr>
82108
{{ end }}
83109
</tbody>

0 commit comments

Comments
 (0)