diff --git a/src/components/MoveToTopButton/index.astro b/src/components/MoveToTopButton/index.astro new file mode 100644 index 0000000000..39d05ff097 --- /dev/null +++ b/src/components/MoveToTopButton/index.astro @@ -0,0 +1,37 @@ +--- +const { class: customClass = "" } = Astro.props; +--- + + + + + diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index e711c57b2a..51ccf0d912 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -11,6 +11,8 @@ import "@styles/base.scss"; import type { CollectionEntry } from "astro:content"; import { getCollectionInLocaleWithFallbacks } from "@pages/_utils"; import { removeLocalePrefix } from "@i18n/utils"; +import MoveToTopButton from "@components/MoveToTopButton/index.astro"; +import "@styles/move-to-top.scss"; interface Props { title: string; @@ -21,7 +23,6 @@ interface Props { variant?: "root" | "item" | "search" | "homepage"; topic?: PageTopic; mainContentParentClass?: string; - /* Only needed for the homepage */ homepageConfig?: CollectionEntry<"homepage">; } @@ -62,10 +63,7 @@ const headerTopic = topic : { name: t(capitalize(fallbackTopic)) as string, url: `/${fallbackTopic}` }; --- - +