Remove dependency on tail select component and instead role my own to minmise bundle size

This commit is contained in:
Peter Stockings
2026-01-29 12:49:12 +11:00
parent 04fe00412a
commit 509d11443d
13 changed files with 309 additions and 581 deletions

View File

@@ -12,13 +12,21 @@
</div>
<div class="mr-4">
<select name="view" hx-get="{{ url_for('calendar.get_calendar', person_id=person_id) }}"
hx-target="#container" x-push-url="true" _="init js(me) tail.select(me, {}) end" class="h-10 invisible">
<option value="month">Month</option>
<option value="year">Year</option>
<option value="notes" selected>Notes</option>
<option value="overview">Overview</option>
</select>
{{ render_partial('partials/custom_select.html',
name='view',
options=[
{'id': 'month', 'name': 'Month'},
{'id': 'year', 'name': 'Year'},
{'id': 'notes', 'name': 'Notes', 'selected': true},
{'id': 'overview', 'name': 'Overview'}
],
multiple=false,
search=false,
placeholder='View',
hx_get=url_for('calendar.get_calendar', person_id=person_id),
hx_target='#container',
hx_push_url=true)
}}
</div>
</div>