Remplace Tailwind par une feuille de style classique
style/main.css est désormais servi tel quel par cargo-leptos (style-file) : remise à zéro des styles du navigateur, couleurs en variables CSS et classes nommées par composant à la place des classes utilitaires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6b5eaa0ba6
commit
e47db8b070
8 files changed
+1060
-233
No files matched your search
+20
-20
@@ -83,13 +83,13 @@ fn RedirectIfSignedIn() -> impl IntoView {
|
||||
fn AuthLayout(title: &'static str, children: Children) -> impl IntoView {
|
||||
view! {
|
||||
<RedirectIfSignedIn />
|
||||
<main class="mx-auto flex min-h-dvh max-w-md flex-col px-4 pt-[max(1.5rem,env(safe-area-inset-top))] pb-16">
|
||||
<h1 class="font-display text-5xl leading-[0.9] font-extrabold tracking-tight">
|
||||
<main class="page page-auth">
|
||||
<h1 class="page-title">
|
||||
"mes listes"
|
||||
</h1>
|
||||
<section class="ticket relative mt-8 bg-paper px-5 pt-6 pb-8">
|
||||
<p class="font-mono text-sm tracking-[0.2em] text-ink/60 uppercase">"Lisette · Courses"</p>
|
||||
<h2 class="mt-1 font-display text-[1.7rem] leading-tight font-bold tracking-tight">{title}</h2>
|
||||
<section class="ticket">
|
||||
<p class="eyebrow">"Lisette · Courses"</p>
|
||||
<h2 class="ticket-title">{title}</h2>
|
||||
{children()}
|
||||
</section>
|
||||
</main>
|
||||
@@ -101,7 +101,7 @@ pub fn FormError(#[prop(into)] error: Signal<Option<String>>) -> impl IntoView {
|
||||
move || {
|
||||
error.get().map(|msg| {
|
||||
view! {
|
||||
<p role="alert" class="rounded-xl border-2 border-ink bg-pink px-3 py-2 font-medium">
|
||||
<p role="alert" class="form-error">
|
||||
{msg}
|
||||
</p>
|
||||
}
|
||||
@@ -114,7 +114,7 @@ pub fn LoginPage() -> impl IntoView {
|
||||
let auth = expect_context::<Auth>();
|
||||
view! {
|
||||
<AuthLayout title="Connexion">
|
||||
<ActionForm action=auth.login attr:class="mt-5 flex flex-col gap-4">
|
||||
<ActionForm action=auth.login attr:class="form form-compact">
|
||||
<FormError error=Signal::derive(move || auth.login.value().get().and_then(Result::err).map(error_message)) />
|
||||
<Field label="Email">
|
||||
<input class="field" type="email" name="email" required autocomplete="email" />
|
||||
@@ -135,9 +135,9 @@ pub fn LoginPage() -> impl IntoView {
|
||||
matches!(auth.registration.await, Ok(true))
|
||||
.then(|| {
|
||||
view! {
|
||||
<p class="mt-6 text-center text-ink/70">
|
||||
<p class="footnote">
|
||||
"Pas encore de compte ? "
|
||||
<A href="/inscription" attr:class="font-semibold text-ink underline">
|
||||
<A href="/inscription">
|
||||
"Créer un compte"
|
||||
</A>
|
||||
</p>
|
||||
@@ -158,14 +158,14 @@ pub fn RegisterPage() -> impl IntoView {
|
||||
{move || Suspend::new(async move {
|
||||
if !matches!(auth.registration.await, Ok(true)) {
|
||||
return view! {
|
||||
<p class="mt-4 text-lg text-ink/70">
|
||||
<p class="lead">
|
||||
"Les inscriptions sont fermées pour le moment."
|
||||
</p>
|
||||
}
|
||||
.into_any();
|
||||
}
|
||||
view! {
|
||||
<ActionForm action=auth.register attr:class="mt-5 flex flex-col gap-4">
|
||||
<ActionForm action=auth.register attr:class="form form-compact">
|
||||
<FormError error=Signal::derive(move || auth.register.value().get().and_then(Result::err).map(error_message)) />
|
||||
<Field label="Prénom ou pseudo">
|
||||
<input
|
||||
@@ -196,9 +196,9 @@ pub fn RegisterPage() -> impl IntoView {
|
||||
.into_any()
|
||||
})}
|
||||
</Suspense>
|
||||
<p class="mt-6 text-center text-ink/70">
|
||||
<p class="footnote">
|
||||
"Déjà inscrit·e ? "
|
||||
<A href="/connexion" attr:class="font-semibold text-ink underline">
|
||||
<A href="/connexion">
|
||||
"Se connecter"
|
||||
</A>
|
||||
</p>
|
||||
@@ -209,8 +209,8 @@ pub fn RegisterPage() -> impl IntoView {
|
||||
#[component]
|
||||
pub fn Field(label: &'static str, children: Children) -> impl IntoView {
|
||||
view! {
|
||||
<label class="flex flex-col gap-1.5">
|
||||
<span class="font-mono text-xs tracking-[0.2em] text-ink/60 uppercase">{label}</span>
|
||||
<label class="field-group">
|
||||
<span class="label">{label}</span>
|
||||
{children()}
|
||||
</label>
|
||||
}
|
||||
@@ -221,7 +221,7 @@ fn SubmitButton(#[prop(into)] pending: Signal<bool>, label: &'static str) -> imp
|
||||
view! {
|
||||
<button
|
||||
type="submit"
|
||||
class="tile-shadow mt-2 rounded-2xl border-2 border-ink bg-pink px-4 py-3 font-display text-lg font-bold active:translate-y-1 active:shadow-none disabled:opacity-60"
|
||||
class="button button-primary"
|
||||
disabled=move || pending.get()
|
||||
>
|
||||
{label}
|
||||
@@ -240,23 +240,23 @@ pub fn AccountSheet(user: User) -> impl IntoView {
|
||||
view! {
|
||||
<Show when=move || ctx.account_open.get()>
|
||||
<Sheet title=user.with_value(|u| u.name.clone()) on_close=close>
|
||||
<p class="mt-1 text-ink/70">{user.with_value(|u| u.email.clone())}</p>
|
||||
<p class="sheet-text">{user.with_value(|u| u.email.clone())}</p>
|
||||
{user
|
||||
.with_value(|u| u.is_admin)
|
||||
.then(|| {
|
||||
view! {
|
||||
<A
|
||||
href="/admin"
|
||||
attr:class="mt-6 block w-full rounded-2xl border-2 border-ink bg-lime px-4 py-3 text-center font-semibold"
|
||||
attr:class="button button-lime button-block"
|
||||
>
|
||||
"Gérer les utilisateurs"
|
||||
</A>
|
||||
}
|
||||
})}
|
||||
<ActionForm action=auth.logout attr:class="mt-3">
|
||||
<ActionForm action=auth.logout>
|
||||
<button
|
||||
type="submit"
|
||||
class="w-full rounded-2xl border-2 border-ink px-4 py-3 font-semibold"
|
||||
class="button button-block"
|
||||
>
|
||||
"Se déconnecter"
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user