Lay out the login card and wire up the passkey button

Sign In and "Sign in with a passkey" (btn-accent) now sit side by side with
"Remember Me" on the same row, and the email/password block is given room above
and below.

The passkey button was dead. It submits a *different* form -- the hidden
`mfa_login` that allauth renders from its `extra_body` block -- and our layout
base never defined that block, so neither the form nor the webauthn script was
ever emitted and clicking the button did nothing. _base.html now has the block,
and there is a test asserting the form and script are on the page.

The `fields` element grows an `exclude`, so a page can lay a field out itself
(here: "remember", moved onto the button row). It splits on commas rather than
testing for a substring -- "password" is a substring of "password2", and a page
excluding one would otherwise silently drop the other.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-13 22:47:26 +02:00
parent 7b18b39f49
commit b3f153a2dc
6 changed files with 140 additions and 1 deletions

View File

@@ -2461,12 +2461,18 @@
.mt-4 {
margin-top: calc(var(--spacing) * 4);
}
.mt-8 {
margin-top: calc(var(--spacing) * 8);
}
.mb-4 {
margin-bottom: calc(var(--spacing) * 4);
}
.mb-6 {
margin-bottom: calc(var(--spacing) * 6);
}
.mb-10 {
margin-bottom: calc(var(--spacing) * 10);
}
.ml-2 {
margin-left: calc(var(--spacing) * 2);
}
@@ -3159,6 +3165,13 @@
--tw-ease: var(--ease-out);
transition-timing-function: var(--ease-out);
}
.btn-accent {
@layer daisyui.l1.l2 {
--btn-color: var(--color-accent);
--btn-fg: var(--color-accent-content);
--btn-soft-bg: initial;
}
}
.btn-error {
@layer daisyui.l1.l2 {
--btn-color: var(--color-error);