Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/src/SwrHeader/SwrHeader.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
});
}}
>
<DesignTokens theme="light">
<DesignTokens theme="dark">
<SwrHeader
{imageModules}
title="Große Pläne: Wie Städte klimaneutral heizen wollen"
eyebrow="Wärmewende in Baden-Württemberg"
updated="01-10-2025"
theme="light"
bylines={[
{ name: 'Katharina Forstmair', image: './test/forstmair.jpg' },
{ name: 'Tom Burggraf', image: './test/burggraf.jpg' }
Expand Down
12 changes: 3 additions & 9 deletions components/src/SwrHeader/SwrHeader.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { getContext, type Snippet } from 'svelte';
import { type Snippet } from 'svelte';

import Caption from '../Caption/Caption.svelte';

Expand All @@ -17,7 +17,6 @@
bylines?: Byline[];
}

let theme = getContext('theme');
const {
title,
subtitle,
Expand All @@ -30,7 +29,7 @@
const updated_on = updated ? (updated instanceof Date ? updated : new Date(updated)) : null;
</script>

<header class={`container theme-${theme}`}>
<header class="container">
{#if eyebrow}
<p class="eyebrow">{eyebrow}</p>
{/if}
Expand Down Expand Up @@ -73,11 +72,7 @@
margin: 0 auto;
margin-bottom: 1rem;
max-width: 44rem;
text-shadow: 0 0 4px white;

&.theme-dark {
text-shadow: 0 0 8px rgba(black, 0.5);
}
text-shadow: 0 0 6px var(--color-pageFill);
}
.eyebrow {
font-size: var(--fs-small-1);
Expand All @@ -99,7 +94,6 @@
line-height: 1.4;
font-size: var(--fs-base);
font-weight: 400;
text-shadow: none;
hyphens: auto;
}
.meta {
Expand Down