frontend: hoist inline <style> into /static/app.css, drop redundant hx-on

base.html shrinks from a 150-line inline stylesheet to a single <link>;
the CSS moves to web/static/app.css byte-for-byte so there's no visual
change, but the stylesheet is now cacheable independently of the HTML.

Drop hx-on::before-request="this.disabled=true" from the Bewerben /
Ablehnen buttons — it duplicates hx-disabled-elt="find button" on the
parent form, which htmx already applies per request.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
EiSiMo 2026-04-21 19:19:40 +02:00
parent cb617dd38a
commit 4f23726e8f
3 changed files with 166 additions and 158 deletions

View file

@ -158,8 +158,7 @@
<input type="hidden" name="flat_id" value="{{ f.id }}">
<button class="btn btn-primary text-sm" type="submit"
{% if is_running %}disabled{% endif %}
hx-confirm="Bewerbung für {{ (f.address or f.link)|e }} starten?"
hx-on::before-request="this.disabled=true">
hx-confirm="Bewerbung für {{ (f.address or f.link)|e }} starten?">
Bewerben
</button>
{% if partner and f.id in partner.applied_flat_ids %}
@ -176,8 +175,7 @@
<input type="hidden" name="flat_id" value="{{ f.id }}">
<button class="btn btn-ghost text-sm" type="submit"
{% if is_running %}disabled{% endif %}
hx-confirm="Ablehnen und aus der Liste entfernen?"
hx-on::before-request="this.disabled=true">
hx-confirm="Ablehnen und aus der Liste entfernen?">
Ablehnen
</button>
{% if partner and f.id in partner.rejected_flat_ids %}