Skip to content

Commit 7347642

Browse files
authored
chore: move download button into header (#219)
Move download button into header
1 parent 3a68fc5 commit 7347642

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/lib/components/features/download-button.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { IconDownload, IconSpinner } from "$lib/components";
55
import { downloadCalendar } from "$lib/services/download-ics";
66
7-
export let background = "bg-fristenkalender_primary";
7+
export let background = "bg-fristenkalender_secondary";
88
export let textColor = "text-black";
99
export let selectedYear: number;
1010

src/lib/components/shared/header.svelte

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
CalendarMonthSelect,
66
CalendarTypeSelect,
77
CalendarYearSelect,
8+
DownloadButton,
89
IconSymbol,
910
} from "$lib/components";
1011
import type { MonthValue } from "$lib/types/calendar-month";
@@ -32,10 +33,13 @@
3233
</div>
3334
</div>
3435

35-
<div class="flex-none py-2 pr-1">
36-
<AuthButton
37-
background="bg-fristenkalender_secondary"
38-
textColor="text-black/70"
39-
/>
36+
<div class="flex-none py-2 pr-3">
37+
<div class="flex items-center gap-4">
38+
<DownloadButton {selectedYear} />
39+
<AuthButton
40+
background="bg-fristenkalender_secondary"
41+
textColor="text-black/70"
42+
/>
43+
</div>
4044
</div>
4145
</header>

src/routes/fristenkalender/+page.svelte

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { goto } from "$app/navigation";
55
import { base } from "$app/paths";
66
import { page } from "$app/stores";
7-
import { DownloadButton, GlossaryToggle, Header } from "$lib/components";
7+
import { GlossaryToggle, Header } from "$lib/components";
88
import CalendarTable from "$lib/components/features/calendar-table.svelte";
99
import type { MonthValue } from "$lib/types/calendar-month";
1010
import type { TypeValue } from "$lib/types/calendar-type";
@@ -96,9 +96,6 @@
9696
?.label || "alle"}
9797
</h2>
9898
</div>
99-
<div class="px-24 py-12">
100-
<DownloadButton {selectedYear} />
101-
</div>
10299
</div>
103100
<div class="flex-1 min-h-0 px-24 pb-8">
104101
<CalendarTable {selectedYear} {selectedMonth} {selectedType} />

0 commit comments

Comments
 (0)