save
This commit is contained in:
@@ -2,76 +2,11 @@ import type * as React from "react"
|
||||
import { Link } from "react-router-dom"
|
||||
import { ArrowRight } from "lucide-react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import { Card, CardContent } from "@/components/ui/card"
|
||||
import { IconBadge } from "@/components/solenos/icon-tile"
|
||||
import { PageBreadcrumb } from "@/components/solenos/page-breadcrumb"
|
||||
import { PageHero } from "@/components/solenos/page-hero"
|
||||
import { Container, Section } from "@/components/solenos/section"
|
||||
|
||||
/** The paragraph of the HeizkostenV a property is cited against. */
|
||||
type LegalSource = {
|
||||
cite: string
|
||||
href: string
|
||||
}
|
||||
|
||||
/** One technical property: line icon, title, body, optional legal citation. */
|
||||
type Topic = {
|
||||
icon: React.ReactNode
|
||||
title: string
|
||||
body: string
|
||||
source?: LegalSource
|
||||
}
|
||||
|
||||
const HEIZKOSTENV = "https://www.gesetze-im-internet.de/heizkostenv"
|
||||
|
||||
/** Cited source line, pinned to the card's baseline so rows stay aligned. */
|
||||
function LegalSourceNote({ source }: { source: LegalSource }) {
|
||||
return (
|
||||
<p className="mt-auto pt-4 text-xs text-muted-foreground">
|
||||
Quelle:{" "}
|
||||
<a
|
||||
href={source.href}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="font-medium text-brand-700 underline-offset-2 transition-colors hover:text-brand-800 hover:underline"
|
||||
>
|
||||
{source.cite}
|
||||
</a>
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
/** Property grid: line icon over a navy title, body copy, optional citation. */
|
||||
function TopicCards({
|
||||
items,
|
||||
className,
|
||||
}: {
|
||||
items: Topic[]
|
||||
className?: string
|
||||
}) {
|
||||
return (
|
||||
<div className={cn("mt-10 grid gap-5", className)}>
|
||||
{items.map((item) => (
|
||||
<Card key={item.title}>
|
||||
<CardContent className="flex flex-1 flex-col">
|
||||
<IconBadge variant="outline" shape="squircle" size="lg">
|
||||
{item.icon}
|
||||
</IconBadge>
|
||||
<h3 className="mt-5 text-base font-bold text-balance text-navy">
|
||||
{item.title}
|
||||
</h3>
|
||||
<p className="mt-2 text-sm leading-relaxed text-pretty text-muted-foreground">
|
||||
{item.body}
|
||||
</p>
|
||||
{item.source ? <LegalSourceNote source={item.source} /> : null}
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Shared shell for the /wissen articles: split PageHero with the
|
||||
* Startseite → Wissen → article breadcrumb, then the article's own sections.
|
||||
@@ -165,5 +100,4 @@ function WissenRelated({
|
||||
)
|
||||
}
|
||||
|
||||
export { HEIZKOSTENV, TopicCards, WissenArticle, WissenRelated }
|
||||
export type { LegalSource, Topic }
|
||||
export { WissenArticle, WissenRelated }
|
||||
|
||||
Reference in New Issue
Block a user