Adopt the new palette; square corners, superellipse buttons
The theme defaults (light and dark) come from the 16-color grid, kept as PALETTE in src/lib/color.ts; every text pair passes the admin's 4.5:1 check. Nothing is rounded any more except buttons, which share one btn utility (Poppins Bold, a superellipse corner where the browser has corner-shape) and true dots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ecdcd4ec37
commit
d81f7bd856
62 changed files with 416 additions and 384 deletions
|
|
@ -11,7 +11,7 @@ export default function ArrowLink({ to, label, color, size = "h-9 w-9" }) {
|
|||
to={to}
|
||||
aria-label={label}
|
||||
title={label}
|
||||
className={`${size} shrink-0 rounded-full flex items-center justify-center transition-transform duration-200 hover:scale-110`}
|
||||
className={`${size} shrink-0 btn flex items-center justify-center transition-transform duration-200 hover:scale-110`}
|
||||
style={{ border: `1px solid ${color}`, color }}
|
||||
>
|
||||
<ArrowRight className="h-4 w-4" weight="bold" aria-hidden="true" />
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export default function Banner() {
|
|||
<button
|
||||
onClick={dismiss}
|
||||
aria-label="Dismiss announcement"
|
||||
className="absolute right-3 top-1/2 -translate-y-1/2 p-1.5 rounded-md text-white/50 hover:text-white hover:bg-white/10 transition-colors"
|
||||
className="absolute right-3 top-1/2 -translate-y-1/2 p-1.5 text-white/50 hover:text-white hover:bg-white/10 transition-colors"
|
||||
>
|
||||
<X className="w-4 h-4" weight="bold" aria-hidden="true" />
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const CONTACT = 'info@nextgenerationofunity.org'
|
|||
export default function ComingSoon({ what }: { what: string }) {
|
||||
return (
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<p className="max-w-xl rounded-2xl border border-dashed border-brand/30 bg-surface/60 p-6 text-body">
|
||||
<p className="max-w-xl border border-dashed border-brand/30 bg-surface/60 p-6 text-body">
|
||||
We’re putting {what} together. In the meantime, ask us at{' '}
|
||||
<a href={`mailto:${CONTACT}`} className="font-semibold text-link underline underline-offset-2">
|
||||
{CONTACT}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ function LinkCard({ item }: { item: ContentBlockItem }) {
|
|||
return (
|
||||
<Anchor
|
||||
href={url}
|
||||
className="group flex h-full flex-col overflow-hidden rounded-2xl border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg"
|
||||
className="group flex h-full flex-col overflow-hidden border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg"
|
||||
>
|
||||
{!img.failed && (
|
||||
<img src={img.src} alt="" loading="lazy" onError={img.onError} className="aspect-video w-full object-cover" />
|
||||
|
|
@ -184,7 +184,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
|||
<Anchor
|
||||
key={index}
|
||||
href={item.url as string}
|
||||
className="rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||
className="btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
{item.text}
|
||||
|
|
@ -199,7 +199,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
|||
<div>
|
||||
<Anchor
|
||||
href={block.href}
|
||||
className="inline-block rounded-full px-6 py-2.5 font-semibold text-white transition-transform hover:scale-105"
|
||||
className="inline-block btn px-6 py-2.5 text-white transition-transform hover:scale-105"
|
||||
style={{ background: accent }}
|
||||
>
|
||||
{text}
|
||||
|
|
@ -245,7 +245,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
|||
return (
|
||||
// Wide tables scroll sideways inside their box on a phone
|
||||
// rather than squeezing every column to a word.
|
||||
<div className="overflow-x-auto rounded-2xl border border-brand/15">
|
||||
<div className="overflow-x-auto border border-brand/15">
|
||||
<table className="min-w-full text-left text-sm leading-snug">
|
||||
<thead className="bg-tint">
|
||||
<tr>
|
||||
|
|
@ -282,7 +282,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
|||
if (!text) return null
|
||||
return (
|
||||
<aside
|
||||
className="space-y-3 rounded-2xl border-l-4 px-6 py-5 leading-relaxed"
|
||||
className="space-y-3 border-l-4 px-6 py-5 leading-relaxed"
|
||||
style={{ borderColor: accent, background: `color-mix(in srgb, ${accent} 8%, var(--color-surface))`, color: 'var(--color-body)' }}
|
||||
>
|
||||
<Paragraphs text={text} accent={accent} />
|
||||
|
|
@ -300,7 +300,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
|||
alt={block.alt ?? ''}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="w-full rounded-lg"
|
||||
className="w-full"
|
||||
/>
|
||||
)
|
||||
return (
|
||||
|
|
@ -315,7 +315,7 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
|
|||
if (!block.href) return null
|
||||
return (
|
||||
<figure>
|
||||
<div className="overflow-hidden rounded-lg">
|
||||
<div className="overflow-hidden">
|
||||
<VideoPlayer url={block.href} still={mediaUrl(block.media)} title={text || null} />
|
||||
</div>
|
||||
<Caption text={text} />
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ function Card({ card }: { card: FeaturedCard }) {
|
|||
// blurb are part of the click without nesting links.
|
||||
<HomeLink
|
||||
url={href}
|
||||
className="after:absolute after:inset-0 after:rounded-2xl after:content-[''] hover:underline"
|
||||
className="after:absolute after:inset-0 after:content-[''] hover:underline"
|
||||
>
|
||||
{card.title}
|
||||
</HomeLink>
|
||||
|
|
@ -100,7 +100,7 @@ function Card({ card }: { card: FeaturedCard }) {
|
|||
)
|
||||
|
||||
return (
|
||||
<li className="relative flex flex-col overflow-hidden rounded-2xl border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg">
|
||||
<li className="relative flex flex-col overflow-hidden border border-brand/15 bg-surface shadow-sm transition-shadow hover:shadow-lg">
|
||||
{card.kind === 'video' ? (
|
||||
// Above the stretched link, which a video card doesn't have
|
||||
// anyway, so the play button always gets the click.
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ export default function Footer() {
|
|||
href={giveAction.to}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-block mt-8 px-6 py-2.5 rounded-full text-sm font-bold text-white whitespace-nowrap transition-all duration-200 hover:scale-105"
|
||||
className="inline-block mt-8 px-6 py-2.5 btn text-sm text-white whitespace-nowrap transition-all duration-200 hover:scale-105"
|
||||
style={{ background: "var(--color-action)" }}
|
||||
>
|
||||
{giveAction.label}
|
||||
|
|
@ -129,7 +129,7 @@ export default function Footer() {
|
|||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label={label}
|
||||
className="footer-icons w-10 h-10 rounded-full flex items-center justify-center text-white/70 transition-colors"
|
||||
className="footer-icons w-10 h-10 btn flex items-center justify-center text-white/70 transition-colors"
|
||||
style={{ background: "rgba(255,255,255,0.08)", border: "1px solid rgba(255,255,255,0.15)" }}
|
||||
>
|
||||
<PlatformIcon platform={platform} className="w-6 h-6" />
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ function NavAction({
|
|||
onClick?: () => void;
|
||||
}) {
|
||||
const v = ACTION_VARIANTS[item.variant] ?? ACTION_VARIANTS.ghost;
|
||||
const className = `inline-block whitespace-nowrap rounded-full transition-all duration-200 active:scale-[0.98] ${ACTION_SIZES[size]} ${v.className}`;
|
||||
const className = `inline-block whitespace-nowrap btn transition-all duration-200 active:scale-[0.98] ${ACTION_SIZES[size]} ${v.className}`;
|
||||
|
||||
return item.external ? (
|
||||
<a
|
||||
|
|
@ -167,7 +167,7 @@ export default function Layout() {
|
|||
>
|
||||
<a
|
||||
href="#main"
|
||||
className="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[70] focus:rounded-full focus:bg-surface focus:px-4 focus:py-2 focus:font-semibold focus:text-ink"
|
||||
className="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[70] focus:bg-surface focus:px-4 focus:py-2 focus:font-semibold focus:text-ink"
|
||||
>
|
||||
Skip to content
|
||||
</a>
|
||||
|
|
@ -318,7 +318,7 @@ export default function Layout() {
|
|||
end={page.path === "/"}
|
||||
className={({ isActive }) =>
|
||||
`block text-2xl font-bold py-3 transition-colors ${
|
||||
isActive ? "text-[#aac992]" : "text-white hover:text-[#9fe7d0]"
|
||||
isActive ? "text-[#aac992]" : "text-white hover:text-[#c2ffd6]"
|
||||
}`
|
||||
}
|
||||
>
|
||||
|
|
@ -335,7 +335,7 @@ export default function Layout() {
|
|||
<a
|
||||
key={section.hash}
|
||||
href={section.hash}
|
||||
className="text-white/80 text-lg py-2 hover:text-[#9fe7d0] transition-colors"
|
||||
className="text-white/80 text-lg py-2 hover:text-[#c2ffd6] transition-colors"
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
>
|
||||
{section.label}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ export default function OrgLogo({
|
|||
return (
|
||||
<Logo
|
||||
src={mediaUrl(org.logo)}
|
||||
className={`${size} object-contain rounded-xl shrink-0`}
|
||||
className={`${size} object-contain shrink-0`}
|
||||
fallback={
|
||||
<span
|
||||
className={`${size} rounded-xl shrink-0 flex items-center justify-center font-extrabold`}
|
||||
className={`${size} shrink-0 flex items-center justify-center font-extrabold`}
|
||||
style={{ border: `1px solid ${color}`, color: accentText(color) }}
|
||||
aria-hidden="true"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export default function PageState({
|
|||
</p>
|
||||
<Link
|
||||
to={backTo}
|
||||
className="mt-4 inline-block rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||
className="mt-4 inline-block btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
||||
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
||||
>
|
||||
{backLabel}
|
||||
|
|
@ -66,7 +66,7 @@ export default function PageState({
|
|||
<button
|
||||
type="button"
|
||||
onClick={onRetry}
|
||||
className="mt-3 rounded-full border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-tint"
|
||||
className="mt-3 btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
||||
style={{ borderColor: BRAND, color: accentText(BRAND) }}
|
||||
>
|
||||
Try again
|
||||
|
|
@ -79,9 +79,9 @@ export default function PageState({
|
|||
<div className="max-w-6xl mx-auto px-6" role="status">
|
||||
<span className="sr-only">Loading this {noun}…</span>
|
||||
<div aria-hidden="true" className="space-y-4">
|
||||
<div className="skeleton !min-h-0 h-8 w-2/3 !rounded-xl" />
|
||||
<div className="skeleton !min-h-0 h-4 w-full !rounded-lg" />
|
||||
<div className="skeleton !min-h-0 h-4 w-5/6 !rounded-lg" />
|
||||
<div className="skeleton !min-h-0 h-8 w-2/3" />
|
||||
<div className="skeleton !min-h-0 h-4 w-full" />
|
||||
<div className="skeleton !min-h-0 h-4 w-5/6" />
|
||||
<div className="skeleton !min-h-0 mt-8 aspect-video w-full max-w-3xl" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
--pl-radius: 3px;
|
||||
|
||||
/* color */
|
||||
--pl-accent: #0f7183;
|
||||
--pl-accent: var(--color-link);
|
||||
--pl-frame-bg: var(--color-surface);
|
||||
--pl-frame-edge: color-mix(in srgb, var(--color-muted) 20%, transparent);
|
||||
--pl-photo-bg: color-mix(in srgb, var(--color-muted) 15%, var(--color-surface));
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function List({ entries, lit }: { entries: ContentsEntry[]; lit: string | null }
|
|||
onClick={(event) => jump(event, entry.id)}
|
||||
aria-current={entry.id === lit ? 'location' : undefined}
|
||||
className={
|
||||
'block rounded-lg border-l-2 px-3 py-1.5 transition-colors ' +
|
||||
'block border-l-2 px-3 py-1.5 transition-colors ' +
|
||||
(entry.id === lit
|
||||
? 'border-link bg-tint font-semibold text-link'
|
||||
: 'border-transparent text-muted hover:text-link')
|
||||
|
|
@ -74,7 +74,7 @@ export default function PostContents({ entries }: { entries: ContentsEntry[] })
|
|||
const lit = useLit(entries)
|
||||
return (
|
||||
<>
|
||||
<details className="rounded-2xl border border-brand/20 bg-tint-soft p-4 lg:hidden print:hidden">
|
||||
<details className="border border-brand/20 bg-tint-soft p-4 lg:hidden print:hidden">
|
||||
<summary className="cursor-pointer font-semibold text-ink">On this page</summary>
|
||||
<div className="mt-3">
|
||||
<List entries={entries} lit={lit} />
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default function PrivacyNotice() {
|
|||
<div
|
||||
role="region"
|
||||
aria-label="Privacy notice"
|
||||
className="fixed bottom-4 left-4 right-4 z-40 mx-auto max-w-md rounded-2xl border border-brand/20 bg-surface p-4 text-sm text-body shadow-xl sm:right-auto"
|
||||
className="fixed bottom-4 left-4 right-4 z-40 mx-auto max-w-md border border-brand/20 bg-surface p-4 text-sm text-body shadow-xl sm:right-auto"
|
||||
>
|
||||
<p>
|
||||
No tracking cookies here. Videos and maps come from YouTube, Facebook or Google only when you press
|
||||
|
|
@ -54,7 +54,7 @@ export default function PrivacyNotice() {
|
|||
<button
|
||||
type="button"
|
||||
onClick={close}
|
||||
className="mt-3 rounded-full bg-action px-4 py-1.5 font-semibold text-white hover:bg-action-hover"
|
||||
className="mt-3 btn bg-action px-4 py-1.5 text-white hover:bg-action-hover"
|
||||
>
|
||||
Got it
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ import { qrMatrix, qrPath } from '../lib/qr.ts'
|
|||
const MARGIN = 4
|
||||
|
||||
/* Dark enough to scan as black; the site's deep teal. */
|
||||
export const QR_INK = '#04262e'
|
||||
export const QR_INK = '#001011'
|
||||
export const QR_PAPER = '#ffffff'
|
||||
export const QR_DOVE = '#138ba0'
|
||||
export const QR_DOVE = '#008fa8'
|
||||
|
||||
/* Badge side as a share of the code's width. */
|
||||
const BADGE = 0.24
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default function RequestLink({ type, label, className = "" }: { type: str
|
|||
return (
|
||||
<Link
|
||||
to={requestLink(type)}
|
||||
className={`inline-flex items-center gap-2 rounded-full border border-brand/40 px-4 py-2 text-sm font-semibold text-link transition-colors hover:bg-tint print:hidden ${className}`}
|
||||
className={`inline-flex items-center gap-2 btn border border-brand/40 px-4 py-2 text-sm text-link transition-colors hover:bg-tint print:hidden ${className}`}
|
||||
>
|
||||
<PaperPlaneTilt aria-hidden="true" weight="bold" className="h-4 w-4" />
|
||||
{label}
|
||||
|
|
|
|||
|
|
@ -69,11 +69,11 @@ const mapLink = (place: string) =>
|
|||
function Avatar({ person, size }: { person: NonNullable<ContentBlockItem['person']>; size: string }) {
|
||||
const img = useSmallImage(mediaUrl(person.photo))
|
||||
return !img.failed ? (
|
||||
<img src={img.src} alt="" onError={img.onError} className={`${size} shrink-0 rounded-full object-cover`} />
|
||||
<img src={img.src} alt="" onError={img.onError} className={`${size} shrink-0 object-cover`} />
|
||||
) : (
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={`${size} flex shrink-0 items-center justify-center rounded-full bg-tint text-xs font-bold text-link`}
|
||||
className={`${size} flex shrink-0 items-center justify-center bg-tint text-xs font-bold text-link`}
|
||||
>
|
||||
{initials(person.name)}
|
||||
</span>
|
||||
|
|
@ -131,7 +131,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
aria-expanded={open}
|
||||
aria-controls={panelId}
|
||||
aria-label={open ? `Less about ${entry.text}` : `More about ${entry.text}`}
|
||||
className="h-8 w-8 shrink-0 rounded-full border text-sm transition-colors hover:bg-tint"
|
||||
className="h-8 w-8 shrink-0 btn border text-sm transition-colors hover:bg-tint"
|
||||
style={{ borderColor: `${withAlpha(accent, 33)}`, color: accentText(accent) }}
|
||||
>
|
||||
<CaretDown
|
||||
|
|
@ -144,7 +144,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
</div>
|
||||
|
||||
{more && open && (
|
||||
<div id={panelId} className="mb-5 space-y-5 rounded-2xl bg-tint-soft p-5 sm:ml-38">
|
||||
<div id={panelId} className="mb-5 space-y-5 bg-tint-soft p-5 sm:ml-38">
|
||||
{entry.person && (
|
||||
<div className="flex items-center gap-4">
|
||||
<Avatar person={entry.person} size="h-16 w-16" />
|
||||
|
|
@ -171,7 +171,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
</div>
|
||||
)}
|
||||
|
||||
{graphic && <img src={graphic} alt={entry.media_alt ?? ""} loading="lazy" className="w-full rounded-lg" />}
|
||||
{graphic && <img src={graphic} alt={entry.media_alt ?? ""} loading="lazy" className="w-full" />}
|
||||
|
||||
{place && (
|
||||
<div>
|
||||
|
|
@ -181,13 +181,13 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
title={`Map: ${place}`}
|
||||
loading="lazy"
|
||||
referrerPolicy="no-referrer-when-downgrade"
|
||||
className="aspect-video w-full rounded-lg border-0"
|
||||
className="aspect-video w-full border-0"
|
||||
/>
|
||||
) : (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowMap(true)}
|
||||
className="flex aspect-video w-full flex-col items-center justify-center gap-1 rounded-lg border border-dashed text-sm"
|
||||
className="flex aspect-video w-full flex-col items-center justify-center gap-1 border border-dashed text-sm"
|
||||
style={{ borderColor: `${withAlpha(accent, 33)}`, color: BODY }}
|
||||
>
|
||||
<span className="font-semibold">Show map</span>
|
||||
|
|
@ -265,7 +265,7 @@ export default function ScheduleBlock({
|
|||
tabIndex={selected ? 0 : -1}
|
||||
onClick={() => setActive(index)}
|
||||
onKeyDown={onKey}
|
||||
className="rounded-full border px-5 py-2 text-sm font-semibold transition-colors"
|
||||
className="btn border px-5 py-2 text-sm transition-colors"
|
||||
style={
|
||||
selected
|
||||
? { background: accent, borderColor: accent, color: readableOn(accent) }
|
||||
|
|
@ -283,7 +283,7 @@ export default function ScheduleBlock({
|
|||
id={`${baseId}-panel`}
|
||||
role={days.length > 1 ? 'tabpanel' : undefined}
|
||||
aria-labelledby={days.length > 1 ? `${baseId}-tab-${days.indexOf(current)}` : undefined}
|
||||
className="rounded-2xl border border-brand/15 bg-surface px-5"
|
||||
className="border border-brand/15 bg-surface px-5"
|
||||
>
|
||||
{current.entries.map((entry, index) => (
|
||||
<Entry key={`${current.name}-${index}`} entry={entry} accent={accent} />
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export default function ThemeToggle({ className = '' }: { className?: string })
|
|||
onClick={toggle}
|
||||
aria-label={dark ? 'Switch to light mode' : 'Switch to dark mode'}
|
||||
title={dark ? 'Light mode' : 'Dark mode'}
|
||||
className={`flex h-9 w-9 items-center justify-center rounded-full transition-colors ${className}`}
|
||||
className={`flex h-9 w-9 items-center justify-center btn transition-colors ${className}`}
|
||||
>
|
||||
{dark ? <Sun size={20} weight="bold" aria-hidden="true" /> : <Moon size={20} weight="bold" aria-hidden="true" />}
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@ export default function VideoPlayer({
|
|||
{image ? (
|
||||
<img src={image} alt="" loading="lazy" className={`aspect-video w-full object-cover ${className}`} />
|
||||
) : (
|
||||
<div className={`aspect-video w-full bg-[#073d4a] ${className}`} />
|
||||
<div className={`aspect-video w-full bg-[#004552] ${className}`} />
|
||||
)}
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/25"
|
||||
>
|
||||
<span className="flex h-16 w-16 items-center justify-center rounded-full bg-white/90 shadow-lg transition-transform group-hover:scale-110">
|
||||
<span className="flex h-16 w-16 items-center justify-center btn bg-white/90 shadow-lg transition-transform group-hover:scale-110">
|
||||
<Play className="ml-1 h-7 w-7" weight="fill" style={{ color: BRAND }} aria-hidden="true" />
|
||||
</span>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export function DriveFolderTabs({ folders, value, onChange }: { folders: string[
|
|||
aria-selected={value === tab}
|
||||
onClick={() => onChange(tab)}
|
||||
className={
|
||||
"rounded-full px-3 py-1 text-sm transition-colors " +
|
||||
"btn px-3 py-1 text-sm transition-colors " +
|
||||
(value === tab ? "bg-action font-semibold text-white" : "border border-muted/25 text-muted hover:border-brand/50")
|
||||
}
|
||||
>
|
||||
|
|
@ -82,7 +82,7 @@ export function DriveFolderTabs({ folders, value, onChange }: { folders: string[
|
|||
}
|
||||
|
||||
const button =
|
||||
"rounded-full border border-brand px-3 py-1 text-sm font-medium text-link " +
|
||||
"btn border border-brand px-3 py-1 text-sm text-link " +
|
||||
"transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50";
|
||||
|
||||
export const FILE_HELP =
|
||||
|
|
@ -205,7 +205,7 @@ export function FileList({
|
|||
const isSelected = selected === file.url;
|
||||
const body = (
|
||||
<span className="flex items-center gap-3">
|
||||
<span className="flex h-16 w-14 shrink-0 items-center justify-center overflow-hidden rounded-md border border-muted/20 bg-tint">
|
||||
<span className="flex h-16 w-14 shrink-0 items-center justify-center overflow-hidden border border-muted/20 bg-tint">
|
||||
{file.preview ? (
|
||||
<img src={file.preview} alt="" loading="lazy" className="h-full w-full object-cover object-top" />
|
||||
) : (
|
||||
|
|
@ -223,7 +223,7 @@ export function FileList({
|
|||
return (
|
||||
<li
|
||||
key={file.id}
|
||||
className={`rounded-xl border bg-surface p-2 ${isSelected ? "border-brand ring-2 ring-brand/30" : "border-muted/20"}`}
|
||||
className={`border bg-surface p-2 ${isSelected ? "border-brand ring-2 ring-brand/30": "border-muted/20"}`}
|
||||
>
|
||||
{onPick ? (
|
||||
<button type="button" onClick={() => onPick(file)} className="block w-full text-left" aria-pressed={isSelected}>
|
||||
|
|
@ -273,7 +273,7 @@ export function FilePicker({
|
|||
onClick={(e) => {
|
||||
if (e.target === dialogRef.current) dialogRef.current?.close();
|
||||
}}
|
||||
className="m-auto w-[min(48rem,calc(100vw-2rem))] rounded-2xl p-0 backdrop:bg-[#0f2f36]/40"
|
||||
className="m-auto w-[min(48rem,calc(100vw-2rem))] p-0 backdrop:bg-[#001011]/40"
|
||||
>
|
||||
<div className="flex max-h-[85vh] flex-col">
|
||||
<div className="flex flex-wrap items-center gap-3 border-b border-brand/15 px-5 py-4">
|
||||
|
|
@ -283,13 +283,13 @@ export function FilePicker({
|
|||
value={query}
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder="Search by file name"
|
||||
className="ml-auto w-56 rounded-lg border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
||||
className="ml-auto w-56 border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => dialogRef.current?.close()}
|
||||
aria-label="Close"
|
||||
className="flex h-8 w-8 items-center justify-center rounded-full text-muted hover:bg-tint"
|
||||
className="flex h-8 w-8 items-center justify-center btn text-muted hover:bg-tint"
|
||||
>
|
||||
<X aria-hidden="true" weight="bold" className="h-4 w-4" />
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export function FolderTabs({
|
|||
aria-selected={value === folder}
|
||||
onClick={() => onChange(folder)}
|
||||
className={
|
||||
"rounded-full px-3 py-1 text-sm transition-colors " +
|
||||
"btn px-3 py-1 text-sm transition-colors " +
|
||||
(value === folder ? "bg-action font-semibold text-white" : "border border-muted/25 text-muted hover:border-brand/50")
|
||||
}
|
||||
>
|
||||
|
|
@ -103,7 +103,7 @@ export function FolderTabs({
|
|||
}
|
||||
|
||||
const button =
|
||||
"rounded-full border border-brand px-3 py-1 text-sm font-medium text-link " +
|
||||
"btn border border-brand px-3 py-1 text-sm text-link " +
|
||||
"transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50";
|
||||
|
||||
/* A light checkerboard, so a white logo on a transparent background
|
||||
|
|
@ -111,8 +111,8 @@ const button =
|
|||
const CHECKER = {
|
||||
backgroundColor: "#fff",
|
||||
backgroundImage:
|
||||
"linear-gradient(45deg,#e6eef0 25%,transparent 25%),linear-gradient(-45deg,#e6eef0 25%,transparent 25%)," +
|
||||
"linear-gradient(45deg,transparent 75%,#e6eef0 75%),linear-gradient(-45deg,transparent 75%,#e6eef0 75%)",
|
||||
"linear-gradient(45deg,#c2fbff 25%,transparent 25%),linear-gradient(-45deg,#c2fbff 25%,transparent 25%)," +
|
||||
"linear-gradient(45deg,transparent 75%,#c2fbff 75%),linear-gradient(-45deg,transparent 75%,#c2fbff 75%)",
|
||||
backgroundSize: "12px 12px",
|
||||
backgroundPosition: "0 0,0 6px,6px -6px,-6px 0",
|
||||
};
|
||||
|
|
@ -231,7 +231,7 @@ export function UploadButton({
|
|||
type="checkbox"
|
||||
checked={keepOriginal}
|
||||
onChange={(e) => setKeepOriginal(e.target.checked)}
|
||||
className="h-3.5 w-3.5 rounded border-muted/40 text-link"
|
||||
className="h-3.5 w-3.5 border-muted/40 text-link"
|
||||
/>
|
||||
Keep original
|
||||
</label>
|
||||
|
|
@ -268,7 +268,7 @@ export function MediaGrid({
|
|||
const isSelected = selected === item.url;
|
||||
const thumb = (
|
||||
<>
|
||||
<div className="aspect-[4/3] overflow-hidden rounded-lg" style={CHECKER}>
|
||||
<div className="aspect-[4/3] overflow-hidden" style={CHECKER}>
|
||||
{item.content_type.startsWith("video/") ? (
|
||||
// A still of the first frame; metadata only, not the file.
|
||||
<video src={item.url} preload="metadata" muted className="h-full w-full bg-black object-contain" />
|
||||
|
|
@ -295,7 +295,7 @@ export function MediaGrid({
|
|||
return (
|
||||
<li
|
||||
key={item.id}
|
||||
className={`rounded-xl border bg-surface p-2 ${
|
||||
className={`border bg-surface p-2 ${
|
||||
isSelected ? "border-brand ring-2 ring-brand/30" : "border-muted/20"
|
||||
}`}
|
||||
>
|
||||
|
|
@ -362,9 +362,9 @@ function RequestImages({ folder, onPick }: { folder?: string; onPick: (item: Med
|
|||
{error && <p className="mb-3 text-sm text-danger">{error}</p>}
|
||||
<ul className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4">
|
||||
{files.map((file) => (
|
||||
<li key={file.id} className="rounded-xl border border-muted/20 bg-surface p-2">
|
||||
<li key={file.id} className="border border-muted/20 bg-surface p-2">
|
||||
<button type="button" disabled={busy !== null} onClick={() => pick(file)} className="block w-full text-left disabled:opacity-60">
|
||||
<div className="aspect-[4/3] overflow-hidden rounded-lg" style={CHECKER}>
|
||||
<div className="aspect-[4/3] overflow-hidden" style={CHECKER}>
|
||||
{/* Straight from Drive through the server; private to the admin. */}
|
||||
<img
|
||||
src={`/api/admin/feedback/${file.feedback_id}/files/${file.id}`}
|
||||
|
|
@ -422,7 +422,7 @@ export function MediaPicker({
|
|||
// A click on the backdrop lands on the dialog itself.
|
||||
if (e.target === dialogRef.current) dialogRef.current?.close();
|
||||
}}
|
||||
className="m-auto w-[min(56rem,calc(100vw-2rem))] rounded-2xl p-0 backdrop:bg-[#0f2f36]/40"
|
||||
className="m-auto w-[min(56rem,calc(100vw-2rem))] p-0 backdrop:bg-[#001011]/40"
|
||||
>
|
||||
<div className="flex max-h-[85vh] flex-col">
|
||||
<div className="flex flex-wrap items-center gap-3 border-b border-brand/15 px-5 py-4">
|
||||
|
|
@ -432,13 +432,13 @@ export function MediaPicker({
|
|||
value={query}
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder="Search by file name"
|
||||
className="ml-auto w-56 rounded-lg border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
||||
className="ml-auto w-56 border border-muted/25 px-3 py-1.5 text-sm outline-none focus:border-brand"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => dialogRef.current?.close()}
|
||||
aria-label="Close"
|
||||
className="flex h-8 w-8 items-center justify-center rounded-full text-muted hover:bg-tint"
|
||||
className="flex h-8 w-8 items-center justify-center btn text-muted hover:bg-tint"
|
||||
>
|
||||
<X aria-hidden="true" weight="bold" className="h-4 w-4" />
|
||||
</button>
|
||||
|
|
@ -525,7 +525,7 @@ export function ImageInput({
|
|||
return (
|
||||
<div className="flex gap-3">
|
||||
<div
|
||||
className="flex h-20 w-20 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-muted/20"
|
||||
className="flex h-20 w-20 shrink-0 items-center justify-center overflow-hidden border border-muted/20"
|
||||
style={CHECKER}
|
||||
>
|
||||
{src && !broken ? (
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ export function SectionJump({ sections }: { sections: EditorSection[] }) {
|
|||
<select
|
||||
value={active ?? ""}
|
||||
onChange={(e) => jump(e.target.value)}
|
||||
className="w-full rounded-lg border border-muted/25 bg-surface px-3 py-1.5 text-sm text-body outline-none focus:border-brand"
|
||||
className="w-full border border-muted/25 bg-surface px-3 py-1.5 text-sm text-body outline-none focus:border-brand"
|
||||
>
|
||||
{sections.map((section) => (
|
||||
<option key={section.id} value={section.id}>
|
||||
|
|
|
|||
|
|
@ -119,12 +119,12 @@ const PREVIEWS = {
|
|||
};
|
||||
|
||||
const input =
|
||||
"w-full rounded-lg border border-muted/25 bg-surface px-3 py-2 text-sm text-body " +
|
||||
"w-full border border-muted/25 bg-surface px-3 py-2 text-sm text-body "+
|
||||
"outline-none transition-colors focus:border-brand focus:ring-2 focus:ring-brand/25";
|
||||
|
||||
/* Same box, but lit by the real input nested inside it. */
|
||||
const inputShell =
|
||||
"flex w-full items-center rounded-lg border border-muted/25 bg-surface px-3 py-2 text-sm " +
|
||||
"flex w-full items-center border border-muted/25 bg-surface px-3 py-2 text-sm "+
|
||||
"text-body transition-colors focus-within:border-brand focus-within:ring-2 " +
|
||||
"focus-within:ring-brand/25";
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ const shellError =
|
|||
/* Reads as settled fact rather than as an empty box someone forgot
|
||||
to fill in. */
|
||||
const inputLocked =
|
||||
"w-full rounded-lg border border-muted/20 bg-tint-soft px-3 py-2 text-sm " +
|
||||
"w-full border border-muted/20 bg-tint-soft px-3 py-2 text-sm "+
|
||||
"text-muted outline-none cursor-default focus:border-muted/40";
|
||||
|
||||
/* ── Dotted paths ────────────────────────────────────────────── */
|
||||
|
|
@ -145,7 +145,7 @@ const inputLocked =
|
|||
else the brand teal. */
|
||||
function colorPlaceholder(field, row): string {
|
||||
const own = typeof field.placeholder === "function" ? field.placeholder(row) : field.placeholder;
|
||||
return own || "#138ba0";
|
||||
return own || "#008fa8";
|
||||
}
|
||||
|
||||
export function getPath(object, path) {
|
||||
|
|
@ -278,7 +278,7 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
|||
checked={value === 1 || value === true}
|
||||
disabled={locked}
|
||||
onChange={(e) => onChange(e.target.checked ? 1 : 0)}
|
||||
className="h-4 w-4 rounded border-muted/40 text-link focus:ring-brand/40 disabled:opacity-50"
|
||||
className="h-4 w-4 border-muted/40 text-link focus:ring-brand/40 disabled:opacity-50"
|
||||
/>
|
||||
{helpText(field, row) ?? "Yes"}
|
||||
</label>
|
||||
|
|
@ -315,7 +315,7 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
|||
value={/^#[0-9a-f]{6}$/i.test(value ?? "") ? value : colorPlaceholder(field, row)}
|
||||
disabled={locked}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
className="h-9 w-12 shrink-0 rounded border border-muted/25 bg-surface disabled:opacity-50"
|
||||
className="h-9 w-12 shrink-0 border border-muted/25 bg-surface disabled:opacity-50"
|
||||
/>
|
||||
<input
|
||||
{...common}
|
||||
|
|
@ -547,7 +547,7 @@ export function Repeater({
|
|||
<button
|
||||
type="button"
|
||||
onClick={add}
|
||||
className="ml-auto rounded-full border border-brand px-3 py-1 text-sm font-medium text-link transition-colors hover:bg-tint"
|
||||
className="ml-auto btn border border-brand px-3 py-1 text-sm text-link transition-colors hover:bg-tint"
|
||||
>
|
||||
{spec.addLabel ?? "Add"}
|
||||
</button>
|
||||
|
|
@ -586,7 +586,7 @@ export function Repeater({
|
|||
endDrag();
|
||||
}}
|
||||
className={
|
||||
`rounded-xl border bg-tint-soft ${expanded ? "p-4" : "px-4 py-2.5"} transition-colors ` +
|
||||
`border bg-tint-soft ${expanded ? "p-4": "px-4 py-2.5"} transition-colors `+
|
||||
(over
|
||||
? "border-brand ring-2 ring-brand/25 "
|
||||
: "border-muted/20 ") +
|
||||
|
|
@ -710,7 +710,7 @@ export function Repeater({
|
|||
))}
|
||||
|
||||
{spec.preview && PREVIEWS[spec.preview] && (
|
||||
<div className="mt-4 rounded-lg border border-dashed border-brand/30 bg-surface p-4">
|
||||
<div className="mt-4 border border-dashed border-brand/30 bg-surface p-4">
|
||||
<p className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted/70">
|
||||
Preview
|
||||
</p>
|
||||
|
|
@ -736,7 +736,7 @@ function IconButton({ label, onClick, danger = false, disabled = false, children
|
|||
aria-label={label}
|
||||
title={label}
|
||||
className={
|
||||
"flex h-7 w-7 items-center justify-center rounded-full border text-sm leading-none transition-colors " +
|
||||
"flex h-7 w-7 items-center justify-center btn border text-sm leading-none transition-colors " +
|
||||
(disabled
|
||||
? "cursor-default border-muted/20 text-muted/40"
|
||||
: danger
|
||||
|
|
@ -796,7 +796,7 @@ function TestNoticeInput({
|
|||
type="button"
|
||||
disabled={busy || !value?.trim()}
|
||||
onClick={send}
|
||||
className="rounded-full border border-brand px-3 py-1 text-sm font-medium text-link transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50"
|
||||
className="btn border border-brand px-3 py-1 text-sm text-link transition-colors hover:bg-tint disabled:cursor-default disabled:opacity-50"
|
||||
>
|
||||
{busy ? "Sending…" : "Send a test notice"}
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue