deploy / deploy (push) Successful in 1m5s
Skills ajoutés (.claude/skills, MIT, relus en entier) : humanizer (textes, guide « Signs of AI writing » de Wikipédia), stop-slop (le skill viral sur TikTok), deslop (code, Cursor). Appliqués à l'app : - tirets longs « — » retirés des textes dans les 18 langues (deux-points ou point selon la phrase, ponctuation propre au chinois, japonais, thaï et hindi) ; - tutoiement partout : 3 textes vouvoyaient en français, 29 en russe ; - écran de plantage : la phrase « le problème nous est signalé automatiquement » était fausse (aucun rapport n'est envoyé), remplacée par un lien pour nous écrire ; - cœur en émoji remplacé par l'icône de l'app, flèche retirée du bouton « Fermer » de la roulette ; - code mort supprimé (StatTile, jamais utilisé). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
73 lines
2.9 KiB
TypeScript
73 lines
2.9 KiB
TypeScript
import type { ReactNode } from 'react'
|
|
import { cx } from '../lib/utils'
|
|
|
|
/** En-tête de page : titre en gras. La partie « accent » n'est colorée que pour le logo (wordmark). */
|
|
export function PageHeader({ title, accent, subtitle, action, wordmark }: { title: string; accent?: string; subtitle?: string; action?: ReactNode; wordmark?: boolean }) {
|
|
return (
|
|
<header className="flex items-end justify-between gap-3 pb-5 pt-7">
|
|
<div className="min-w-0">
|
|
<h1 className={cx('leading-[1.05]', wordmark ? 'text-[2rem] tracking-[-0.02em]' : 'text-[1.9rem]')}>
|
|
{title}
|
|
{accent && <span className={wordmark ? 'text-accent' : undefined}>{accent}</span>}
|
|
</h1>
|
|
{subtitle && <p className="mt-1.5 text-sm text-ink-3">{subtitle}</p>}
|
|
</div>
|
|
{action}
|
|
</header>
|
|
)
|
|
}
|
|
|
|
/** Titre de section : texte simple souligné d'un filet noir (style « Encre »). */
|
|
export function SectionTitle({ children, action }: { children: ReactNode; action?: ReactNode }) {
|
|
return (
|
|
<div className="mb-4 mt-10 flex items-end justify-between gap-3 border-b border-ink pb-2">
|
|
<h2 className="text-[1.15rem] font-semibold leading-tight text-ink">{children}</h2>
|
|
{action}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
/**
|
|
* Progression en pellicule : une image par épisode (regroupées au-delà de 40), perforations en haut et en bas.
|
|
* La pellicule reste sombre dans tous les thèmes ; les images vues prennent l'accent.
|
|
*/
|
|
export function FilmStrip({ done, total, label, className }: { done: number; total: number; label?: string; className?: string }) {
|
|
if (!total) return null
|
|
const frames = Math.min(total, 40)
|
|
const lit = Math.round((Math.min(done, total) / total) * frames)
|
|
return (
|
|
<div
|
|
role="progressbar"
|
|
aria-valuemin={0}
|
|
aria-valuemax={total}
|
|
aria-valuenow={Math.min(done, total)}
|
|
aria-label={label}
|
|
className={cx('film-strip', className)}
|
|
>
|
|
<div className="grid h-full gap-[2px]" style={{ gridTemplateColumns: `repeat(${frames}, minmax(0, 1fr))` }}>
|
|
{Array.from({ length: frames }, (_, k) => (
|
|
<i key={k} className={k < lit ? 'bg-accent-fill' : 'bg-line'} />
|
|
))}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export function LinkArrow({ onClick, children }: { onClick: () => void; children: ReactNode }) {
|
|
return (
|
|
<button onClick={onClick} className="shrink-0 text-sm font-medium text-ink-2 underline-offset-4 transition-colors hover:text-ink hover:underline">
|
|
{children}
|
|
</button>
|
|
)
|
|
}
|
|
|
|
export function EmptyState({ title, text, action }: { title: string; text?: string; action?: ReactNode }) {
|
|
return (
|
|
<div className="card mt-4 flex flex-col items-center px-6 py-12 text-center">
|
|
<p className="font-bold text-[1.5rem] leading-tight">{title}</p>
|
|
{text && <p className="mt-2 max-w-xs text-sm text-ink-2">{text}</p>}
|
|
{action && <div className="mt-6">{action}</div>}
|
|
</div>
|
|
)
|
|
}
|