314efe8b22
* fix(design): stop synthesizing bold on Hedvig display headings Hedvig Letters Serif ships weight 400 only, but the h1-h3 base rule forced font-weight 500 and DialogTitle/SheetTitle stacked font-semibold on top, so every display heading rendered browser-synthesized bold: the smudged heavy look on dialog titles and page headings. Drop the base rule to 400, remove the weight utilities from the title primitives, and sweep the 41 files that hand-set font-medium/semibold/bold on serif headings (a pattern design.md already forbids). Headings that opt into font-sans keep their weight. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(design): drop empty className left by the weight sweep Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
41 lines
1.6 KiB
TypeScript
41 lines
1.6 KiB
TypeScript
import Link from 'next/link'
|
|
import { getTranslations } from 'next-intl/server'
|
|
import { Card, CardContent } from '@/components/ui/card'
|
|
import { resolveIcon } from '@/lib/extensions/icon-resolver'
|
|
import { sectorNameKey, sectorDescriptionKey } from '@/lib/extensions/i18n'
|
|
import type { Sector } from '@/lib/extensions/types'
|
|
|
|
export default async function SectorCard({ sector }: { sector: Sector }) {
|
|
const t = await getTranslations('extensions')
|
|
|
|
const nameKey = sectorNameKey(sector.slug)
|
|
const descriptionKey = sectorDescriptionKey(sector.slug)
|
|
const name = nameKey ? t(nameKey) : sector.name
|
|
const description = descriptionKey ? t(descriptionKey) : sector.description
|
|
|
|
const Icon = resolveIcon(sector.icon)
|
|
|
|
return (
|
|
<Link href={`/extensions/${sector.slug}`} className="h-full">
|
|
<Card className="group h-full cursor-pointer transition-colors duration-150 hover:bg-secondary/60">
|
|
<CardContent className="p-6">
|
|
<div className="flex items-start gap-3">
|
|
<div className="flex h-10 w-10 items-center justify-center rounded-lg bg-secondary flex-shrink-0">
|
|
<Icon className="h-5 w-5 text-foreground" />
|
|
</div>
|
|
<div>
|
|
<h3 className="text-sm">
|
|
{name}
|
|
</h3>
|
|
<p className="text-xs text-muted-foreground mt-0.5 line-clamp-2">{description}</p>
|
|
<p className="text-xs text-muted-foreground mt-1.5">
|
|
{t('extension_count', { count: sector.extensions.length })}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
</Link>
|
|
)
|
|
}
|