Skip to content

Commit 9d1d21e

Browse files
authored
Build out feature (#245)
* Link the logotype to our website * Improve contrast on the logotype
1 parent 63f9dc8 commit 9d1d21e

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

components/src/ChartFooter/ChartFooter.stories.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</script>
1414

1515
<Story name="One-up" asChild>
16-
<DesignTokens>
16+
<DesignTokens theme="light">
1717
<ChartFooter layout="one-up">
1818
Daten: <a href="#1">Zensus 2022</a>
1919
(Durchschnittsmieten und Einwohnerzahlen),
@@ -24,7 +24,7 @@
2424
</Story>
2525

2626
<Story name="One-up Centered" asChild>
27-
<DesignTokens>
27+
<DesignTokens theme="light">
2828
<ChartFooter layout="one-up" align="center">
2929
Daten: <a href="#1">Zensus 2022</a>
3030
(Durchschnittsmieten und Einwohnerzahlen),
@@ -44,7 +44,7 @@
4444
});
4545
}}
4646
>
47-
<DesignTokens>
47+
<DesignTokens theme="light">
4848
<ChartFooter layout="one-up" align="center" showLogo={false}>
4949
Daten: <a href="#1">Zensus 2022</a>
5050
(Durchschnittsmieten und Einwohnerzahlen),

components/src/ChartFooter/ChartFooter.svelte

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
</Note>
2121
{/if}
2222
{#if showLogo}
23-
<Logotype />
23+
<a href="https://www.swr.de/home/swr-data-lab-team-100.html" class="logo-link">
24+
SWR Data Lab
25+
<Logotype />
26+
</a>
2427
{/if}
2528
</footer>
2629

@@ -33,6 +36,17 @@
3336
width: 100%;
3437
}
3538
}
39+
40+
.logo-link {
41+
font-size: 0;
42+
&:hover,
43+
&:focus-visible {
44+
:global(path) {
45+
fill: var(--color-logoFillHover);
46+
}
47+
}
48+
}
49+
3650
.one-up {
3751
display: flex;
3852
flex-flow: column;

components/src/DesignTokens/DesignTokens.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
--color-textSecondary: var(--textSecondary-light);
5959
--color-textSecondaryHover: var(--textSecondaryHover-light);
6060
--color-logoFill: var(--logoFill-light);
61+
--color-logoFillHover: var(--logoFillHover-light);
6162
--color-pageFill: var(--pageFill-light);
6263
--color-surfaceFill: var(--surfaceFill-light);
6364
--color-surfaceHover: var(--surfaceHover-light);
@@ -66,6 +67,7 @@
6667
6768
&[data-theme='dark'] {
6869
--color-logoFill: var(--logoFill-dark);
70+
--color-logoFillHover: var(--logoFillHover-dark);
6971
--color-pageFill: var(--pageFill-dark);
7072
--color-surfaceFill: var(--surfaceFill-dark);
7173
--color-surfaceBorder: var(--surfaceBorder-dark);

components/src/DesignTokens/Tokens.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,13 @@ const semantics: ColourMap = {
170170
dark: '#b4b4b4'
171171
},
172172
logoFill: {
173-
light: shades.gray.light3,
173+
light: shades.gray.light1,
174174
dark: shades.gray.base
175175
},
176+
logoFillHover: {
177+
light: shades.gray.base,
178+
dark: shades.gray.light1
179+
},
176180
surfaceFill: {
177181
dark: '#222325',
178182
light: '#ffffff'

0 commit comments

Comments
 (0)