diff --git a/astro.config.mjs b/astro.config.mjs index 01bcc25..24dc7d2 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -20,12 +20,11 @@ export default defineConfig({ }), starlight({ components: { + Header: '~/components/Header.astro', MarkdownContent: 'starlight-blog/overrides/MarkdownContent.astro', PageFrame: '~/components/CustomPageFrame.astro', Pagination: '~/components/Pagination.astro', - Sidebar: '~/components/Sidebar.astro', - // Sidebar: 'starlight-blog/overrides/Sidebar.astro', - ThemeSelect: '~/components/NavBar.astro' + Sidebar: '~/components/Sidebar.astro' }, defaultLocale: 'root', // optional locales: { @@ -47,10 +46,6 @@ export default defineConfig({ twitter: 'https://twitter.com/Waterfoxproject' }, sidebar: [ - // { - // label: 'Blog', - // autogenerate: { directory: 'blog' } - // }, { label: 'Policies', autogenerate: { directory: 'docs/policies' } diff --git a/src/assets/global.scss b/src/assets/global.scss index 8ade3cf..9279b5e 100644 --- a/src/assets/global.scss +++ b/src/assets/global.scss @@ -19,19 +19,6 @@ height: unset; } - .sidebar-pane { - background-color: unset; - border-inline-end: unset; - } - - - [data-has-sidebar]:not([data-has-sidebar=""]) header { - border-bottom: 1px solid transparent; - background-color: transparent; - -webkit-backdrop-filter: blur(16px); - backdrop-filter: blur(16px); - } - @keyframes wobble { 33% { transform: translateX(-50px); diff --git a/src/components/Base.astro b/src/components/Base.astro index 8cb16a7..12d0827 100644 --- a/src/components/Base.astro +++ b/src/components/Base.astro @@ -1,13 +1,13 @@ --- -import Header from '@astrojs/starlight/components/Header.astro' import { twMerge } from 'tailwind-merge' import Footer from './Footer.astro' +import Header from './Header.astro' --- -
+
diff --git a/src/components/CustomPageFrame.astro b/src/components/CustomPageFrame.astro index bab2c06..d3973e3 100644 --- a/src/components/CustomPageFrame.astro +++ b/src/components/CustomPageFrame.astro @@ -1,8 +1,9 @@ --- -import Header from '@astrojs/starlight/components/Header.astro' -import PageFrame from '@astrojs/starlight/components/PageFrame.astro' import type { Props } from '@astrojs/starlight/props' +import { useTranslations } from 'node_modules/@astrojs/starlight/utils/translations' +import Header from './Header.astro' +import MobileMenuToggle from '@astrojs/starlight/components/MobileMenuToggle.astro' import DownloadsPage from './DownloadsPage.astro' import Footer from './Footer.astro' import Home from './Home.astro' @@ -12,6 +13,8 @@ import Sidebar from './Sidebar.astro' const isHomepage = Astro.props.slug === '' const isDownloads = Astro.props.slug === 'downloads' +const { hasSidebar, locale } = Astro.props +const t = useTranslations(locale) // If we are, render a custom component // If not, render the default page frame --- @@ -23,23 +26,90 @@ const isDownloads = Astro.props.slug === 'downloads' ) : ( <> - -
- - - +
+
+
+
+ {hasSidebar && ( + + )} +
+ +
+