SPB Git

Repository Public

Symbol.tsx 3.1 KB 99 lines tsx

1// Symbole, logotype et signature de Lou-Ka.2// Le symbole est une porte de logement entrouverte dans son encadrement :3// l'héritage du logo d'origine, redessiné sur une grille 64 × 64.45import { cn } from "@/lib/cn";6import { BRAND, DOOR, DOOR_PATHS } from "./geometry";78export type SymbolTone =9  /** cadre orange, panneau couleur du texte (suit le thème) */10  | "brand"11  /** une seule couleur : celle du texte courant */12  | "mono"13  /** tout orange historique */14  | "orange"15  /** pour fonds sombres fixes : cadre orange, panneau ivoire */16  | "inverse";1718export function LoukaSymbol({19  size = 28,20  tone = "brand",21  className,22  title,23}: {24  size?: number;25  tone?: SymbolTone;26  className?: string;27  title?: string;28}) {29  const micro = size <= 20;30  const frame = tone === "mono" ? "currentColor" : BRAND.orange;31  const panel =32    tone === "orange" ? BRAND.orange : tone === "inverse" ? BRAND.ivory : tone === "mono" ? "currentColor" : "var(--door)";33  const handle = tone === "mono" || tone === "orange" ? "var(--bg)" : BRAND.orange;34  return (35    <svg36      viewBox="0 0 64 64"37      width={size}38      height={size}39      className={cn("shrink-0", className)}40      role={title ? "img" : undefined}41      aria-label={title}42      aria-hidden={title ? undefined : true}43    >44      <path45        d={micro ? DOOR_PATHS.frameMicro : DOOR_PATHS.frame}46        fill="none"47        stroke={frame}48        strokeWidth={micro ? 6.5 : DOOR.frame.stroke}49        strokeLinejoin="round"50      />51      <path className="lk-logo-panel" d={micro ? DOOR_PATHS.panelMicro : DOOR_PATHS.panel} fill={panel} />52      {!micro && <circle className="lk-logo-handle" cx={DOOR.handle.cx} cy={DOOR.handle.cy} r={DOOR.handle.r} fill={handle} />}53      <path54        d={DOOR_PATHS.threshold}55        stroke={panel}56        strokeWidth={micro ? 4 : DOOR.threshold.stroke}57        strokeLinecap="round"58        fill="none"59      />60    </svg>61  );62}6364/** Logotype : « Lou » et « Ka » distingués par la couleur, reliés par un trait d'union fin. */65export function LoukaWordmark({ className, tone = "brand" }: { className?: string; tone?: SymbolTone }) {66  const ka = tone === "mono" ? "currentColor" : BRAND.orange;67  return (68    <span69      className={cn("font-display font-medium leading-none tracking-[-0.02em]", className)}70      style={{ color: tone === "inverse" ? BRAND.ivory : undefined }}71    >72      Lou73      <span aria-hidden className="mx-[0.04em] inline-block w-[0.3em] translate-y-[-0.28em] border-t-[0.07em] border-current opacity-45" />74      <span className="sr-only">-</span>75      <span style={{ color: ka }}>Ka</span>76    </span>77  );78}7980/** Signature : symbole + logotype (horizontal), ou symbole seul (compact). */81export function LoukaLogo({82  size = 30,83  compact,84  tone = "brand",85  className,86}: {87  size?: number;88  compact?: boolean;89  tone?: SymbolTone;90  className?: string;91}) {92  return (93    <span className={cn("inline-flex items-center text-ink", className)} style={{ gap: size * 0.28 }}>94      <LoukaSymbol size={size} tone={tone} />95      {!compact && <LoukaWordmark tone={tone} className="text-ink" />}96    </span>97  );98}99
Files main
Menu

Theme