Files
windwiderstand/src/lib/components/Footer.svelte
T
Peter Meier b7093b703a
Deploy / verify (push) Successful in 49s
Deploy / deploy (push) Successful in 1m0s
style(design): consistency sweep + UX upgrades
- Palette: gray/zinc/slate/neutral → stein, red → fire, amber → erde,
  sky → himmel, green → wald
- Footer: replaced raw rgb with stein tokens
- Radius: unified to rounded-xs across cards, buttons, inputs, pagination
- Buttons: .btn-primary/.btn-secondary now font-medium; added secondary
- Card hover: -translate-y-0.5 + shadow + wald-300 border
- Header active link: wald border-bottom + wald-700 text
- Mobile nav: bigger touch targets + wald active accent
- Pagination: prev/next text labels + wald-500 active state with
  separated shape/color classes to avoid Tailwind conflicts
- Lead paragraph: scoped .markdown > p:first-child for top-level
  MarkdownBlock only via [data-block-type="markdown"]
- Section dividers: subtle wald-200 gradient between content rows
- Global focus-visible ring (wald-500)
- Inline hex → palette tokens (Badge amber, Tag custom-color contrast)
- Font weights snapped to design system (300/400/500/600/700)
- transition-all → transition-colors where only color changes
- Removed em-dashes from user-visible templates

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 01:06:22 +02:00

80 lines
2.1 KiB
Svelte

<script lang="ts">
import ContentRows from "./ContentRows.svelte";
import type { RowContentLayout } from "$lib/block-types";
import { t as tStatic, T } from "$lib/translations";
import type { Translations } from "$lib/translations";
interface FooterEntry extends RowContentLayout {
id?: string;
}
let { footer = null, translations = {} }: { footer?: FooterEntry | null; translations?: Translations | null } = $props();
function t(key: string) {
return tStatic(translations ?? null, key);
}
const hasRowContent = $derived(
!!footer &&
((footer.row1Content?.length ?? 0) > 0 ||
(footer.row2Content?.length ?? 0) > 0 ||
(footer.row3Content?.length ?? 0) > 0),
);
</script>
{#if footer}
<footer
class="mt-auto bg-stein-900 text-stein-0 py-10"
data-footer-id={footer.id}
>
<div class="container-custom">
{#if hasRowContent}
<div class="content-footer text-sm text-stein-200">
<ContentRows layout={footer} translations={translations} />
</div>
{:else}
<p class="text-sm text-stein-0/80 text-center">
{t(T.footer_copyright) !== T.footer_copyright
? t(T.footer_copyright)
: `© ${new Date().getFullYear()} Windwiderstand`}
</p>
{/if}
</div>
</footer>
{/if}
<style>
.content-footer :global(.content) {
margin: 0;
}
.content-footer :global(.content-row) {
display: flex;
flex-wrap: wrap;
gap: 2rem;
align-items: flex-start;
}
.content-footer :global(.content-row > *) {
flex: 1 1 200px;
grid-column: auto !important;
min-width: 0;
}
.content-footer :global(.content-row + .content-row) {
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid var(--color-stein-700);
}
.content-footer :global(a) {
color: var(--color-stein-200);
}
.content-footer :global(a:hover) {
color: var(--color-stein-0);
}
.content-footer :global(h3) {
color: var(--color-stein-0);
}
.content-footer :global(.markdown),
.content-footer :global(.prose) {
color: var(--color-stein-200);
}
</style>