From 7713251fc4bce0039b007d934b900df3e716cd42 Mon Sep 17 00:00:00 2001 From: Igor Zaripov Date: Wed, 4 Dec 2024 13:28:37 +0100 Subject: [PATCH] add a carousel element with bookmark-tabs at the front page (#193) * add a carousel element with bookmarks-tabs at the front page * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .../lib/components/FrontPageBookmarks.svelte | 47 +++++++++++++++++++ frontend/src/lib/components/Frontpage.svelte | 38 +++++++++++++++ frontend/src/locales/de.json | 17 +++++++ 3 files changed, 102 insertions(+) create mode 100644 frontend/src/lib/components/FrontPageBookmarks.svelte diff --git a/frontend/src/lib/components/FrontPageBookmarks.svelte b/frontend/src/lib/components/FrontPageBookmarks.svelte new file mode 100644 index 00000000..bf17516a --- /dev/null +++ b/frontend/src/lib/components/FrontPageBookmarks.svelte @@ -0,0 +1,47 @@ + + +
+ +
+ {#each bookmarks as { titleKey }, index} + + {/each} +
+ +
+

+ {bookmarks[activeIndex]?.contentKey}

+
+ +
diff --git a/frontend/src/lib/components/Frontpage.svelte b/frontend/src/lib/components/Frontpage.svelte index ece6a471..cfda714b 100644 --- a/frontend/src/lib/components/Frontpage.svelte +++ b/frontend/src/lib/components/Frontpage.svelte @@ -4,8 +4,41 @@ import CardDisplay from "$lib/components//DataDisplay/CardDisplay.svelte"; import GalleryDisplay from "$lib/components/DataDisplay/GalleryDisplay.svelte"; import FrontPageAbout from "$lib/components/FrontPageAbout.svelte"; import FrontPageCard from "$lib/components/FrontPageCard.svelte"; +import { _ } from "svelte-i18n"; +import FrontPageBookmarks from "./FrontPageBookmarks.svelte"; let { items = [] } = $props(); + +const bookmarks = [ + { + titleKey: $_("frontpageBookmarks.headingMotor"), + contentKey: $_("frontpageBookmarks.summaryMotor"), + }, + { + titleKey: $_("frontpageBookmarks.headingFineMotor"), + contentKey: $_("frontpageBookmarks.summaryFineMotor"), + }, + { + titleKey: $_("frontpageBookmarks.headingThinking"), + contentKey: $_("frontpageBookmarks.summaryThinking"), + }, + { + titleKey: $_("frontpageBookmarks.headingLanguage"), + contentKey: $_("frontpageBookmarks.summaryLanguage"), + }, + { + titleKey: $_("frontpageBookmarks.headingSocialDevelopment"), + contentKey: $_("frontpageBookmarks.summarySocialDevelopment"), + }, + { + titleKey: $_("frontpageBookmarks.headingInnerStates"), + contentKey: $_("frontpageBookmarks.summaryInnerStates"), + }, + { + titleKey: $_("frontpageBookmarks.headingSchool"), + contentKey: $_("frontpageBookmarks.summarySchool"), + }, +]; +
+

{$_('frontpageBookmarks.title')}

+ +
+