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:
Romulus21andClaude Opus 5.5 committed 2026-11-05 22:39:42 +01:00
1 parent 6b5eaa0ba6
commit e47db8b070
8 files changed
+1060 -233

No files matched your search

+25 -26
View File
@@ -25,8 +25,8 @@ fn AdminView(me: User) -> impl IntoView {
if !me.is_admin {
return view! {
<AdminLayout>
<section class="ticket relative mt-6 bg-paper px-5 pt-6 pb-8">
<p class="text-lg text-ink/70">"Cette page est réservée aux administrateurs."</p>
<section class="ticket">
<p class="lead">"Cette page est réservée aux administrateurs."</p>
</section>
</AdminLayout>
}
@@ -40,17 +40,17 @@ fn AdminView(me: User) -> impl IntoView {
view! {
<AdminLayout>
<section class="ticket relative mt-6 bg-paper px-5 pt-6 pb-8">
<p class="font-mono text-sm tracking-[0.2em] text-ink/60 uppercase">"Lisette · Comptes"</p>
<h2 class="mt-1 font-display text-[1.7rem] leading-tight font-bold tracking-tight">
<section class="ticket">
<p class="eyebrow">"Lisette · Comptes"</p>
<h2 class="ticket-title">
"Utilisateurs"
</h2>
<Transition fallback=|| view! { <p class="mt-4 text-ink/50">"…"</p> }>
<Transition fallback=|| view! { <p class="loading">"…"</p> }>
{move || Suspend::new(async move {
match accounts.await {
Ok(accounts) => view! { <AccountRows accounts me_id editor /> }.into_any(),
Err(err) => {
view! { <p class="mt-4 font-medium">{error_message(err)}</p> }.into_any()
view! { <p class="lead">{error_message(err)}</p> }.into_any()
}
}
})}
@@ -58,7 +58,7 @@ fn AdminView(me: User) -> impl IntoView {
</section>
<button
class="tile-shadow fixed right-[max(1rem,calc(50vw-14rem+1rem))] bottom-[max(1.25rem,env(safe-area-inset-bottom))] z-10 rounded-2xl border-2 border-ink bg-pink px-6 py-4 font-display text-xl font-bold active:translate-y-1 active:shadow-none"
class="fab"
on:click=move |_| editor.set(Some(AccountEditor::New))
>
"+ compte"
@@ -86,12 +86,12 @@ fn AdminView(me: User) -> impl IntoView {
#[component]
fn AdminLayout(children: Children) -> impl IntoView {
view! {
<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-32">
<header class="flex items-start justify-between gap-4">
<h1 class="font-display text-5xl leading-[0.9] font-extrabold tracking-tight">"admin"</h1>
<main class="page">
<header class="page-header">
<h1 class="page-title">"admin"</h1>
<A
href="/"
attr:class="shrink-0 rounded-2xl border-2 border-ink bg-paper px-4 py-3 font-semibold"
attr:class="button button-paper"
>
"← mes listes"
</A>
@@ -108,13 +108,13 @@ fn AccountRows(
editor: RwSignal<Option<AccountEditor>>,
) -> impl IntoView {
view! {
<p class="mt-1 text-lg text-ink/70">
<p class="lead">
{match accounts.len() {
1 => "1 compte.".to_owned(),
n => format!("{n} comptes."),
}}
</p>
<ul class="mt-5 flex flex-col gap-2">
<ul class="people">
{accounts
.into_iter()
.map(|Account { user, created_at }| {
@@ -123,22 +123,22 @@ fn AccountRows(
view! {
<li>
<button
class="flex w-full items-center justify-between gap-3 rounded-xl bg-mist px-3 py-2 text-left active:bg-ink/10"
class="person"
on:click=move |_| editor.set(Some(AccountEditor::Edit(edited.clone())))
>
<div class="min-w-0">
<p class="truncate font-semibold">
<div class="person-info">
<p class="person-name">
{user.name.clone()}
{is_me.then_some(" (toi)")}
</p>
<p class="truncate text-sm text-ink/60">{user.email.clone()}</p>
<p class="text-sm text-ink/50">{format!("Inscrit·e le {}", french_date(&created_at))}</p>
<p class="person-email">{user.email.clone()}</p>
<p class="person-date">{format!("Inscrit·e le {}", french_date(&created_at))}</p>
</div>
{user
.is_admin
.then(|| {
view! {
<span class="shrink-0 rounded-lg border-2 border-ink bg-lime px-2 py-0.5 font-mono text-xs uppercase">
<span class="badge">
"admin"
</span>
}
@@ -234,7 +234,7 @@ fn AccountForm(
view! {
<Sheet title=title.to_owned() on_close>
<form class="mt-4 flex flex-col gap-4" on:submit=submit>
<form class="form form-compact" on:submit=submit>
<FormError error=error />
<Field label="Prénom ou pseudo">
<input class="field" required maxlength="40" autocomplete="off" bind:value=name />
@@ -253,23 +253,22 @@ fn AccountForm(
bind:value=password
/>
</Field>
<label class="flex items-center gap-3 font-medium">
<label class="checkbox">
<input
type="checkbox"
class="size-6 accent-ink"
disabled=is_me
bind:checked=is_admin
/>
"Administrateur"
</label>
<div class="mt-2 flex gap-3">
<div class="actions">
{(user_id.is_some() && !is_me)
.then(|| {
view! {
<button
type="button"
class="rounded-2xl border-2 border-ink px-4 py-3 font-semibold"
class="button"
disabled=move || pending.get()
on:click=delete
>
@@ -279,7 +278,7 @@ fn AccountForm(
})}
<button
type="submit"
class="tile-shadow flex-1 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()
>
{if user_id.is_some() { "Enregistrer" } else { "Créer" }}