Inline encouragements with the submit button, vertically centered
Deploy / deploy (push) Successful in 33s

Was stacked vertically; now a row (encouragements left, button right,
center-aligned), falling back to the stacked layout under 640px where
a row would get cramped.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-08-06 13:03:43 +02:00
co-authored by Claude Sonnet 5
parent a200161334
commit 400316f622
2 changed files with 18 additions and 8 deletions
+2
View File
@@ -770,11 +770,13 @@ fn AlternativeCard(
.then(|| { .then(|| {
view! { view! {
<div class="alt-cta"> <div class="alt-cta">
<div class="alt-encouragements">
<For <For
each=move || alternative.encouragements.clone() each=move || alternative.encouragements.clone()
key=|e| e.clone() key=|e| e.clone()
children=move |e| view! { <p class="alt-encouragement">{e}</p> } children=move |e| view! { <p class="alt-encouragement">{e}</p> }
/> />
</div>
<form on:submit=on_submit> <form on:submit=on_submit>
<button <button
type="submit" type="submit"
+11 -3
View File
@@ -222,12 +222,19 @@ main.loading, main.not-found {
.alt-cta { .alt-cta {
display: flex; display: flex;
flex-direction: column; flex-direction: row;
align-items: flex-start; align-items: center;
gap: 0.4rem; justify-content: space-between;
gap: 1.2rem;
margin-top: 1.4rem; margin-top: 1.4rem;
} }
.alt-encouragements {
display: flex;
flex-direction: column;
gap: 0.3rem;
}
.features { display: grid; gap: 1.1rem; margin-top: 0.6rem; } .features { display: grid; gap: 1.1rem; margin-top: 0.6rem; }
.feature h3 { font-size: 1rem; margin-bottom: 0.15em; } .feature h3 { font-size: 1rem; margin-bottom: 0.15em; }
@@ -490,4 +497,5 @@ input:focus, textarea:focus {
@media (max-width: 640px) { @media (max-width: 640px) {
.hero { padding: 3rem 1.25rem 2rem; } .hero { padding: 3rem 1.25rem 2rem; }
.alt-card { padding: 1.4rem 1.3rem; } .alt-card { padding: 1.4rem 1.3rem; }
.alt-cta { flex-direction: column; align-items: flex-start; }
} }