From e017fbf529ea7edac78904f0fd5efdea83dd5f69 Mon Sep 17 00:00:00 2001 From: prototypa Date: Fri, 12 Apr 2024 11:23:41 -0400 Subject: [PATCH] Fix issue #418: main navigation is not centred on md --- src/components/widgets/Header.astro | 63 ++++++++++++++++------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro index ec76154..24af52b 100644 --- a/src/components/widgets/Header.astro +++ b/src/components/widgets/Header.astro @@ -1,13 +1,13 @@ --- -import { Icon } from "astro-icon/components"; -import Logo from "~/components/Logo.astro"; -import ToggleTheme from "~/components/common/ToggleTheme.astro"; -import ToggleMenu from "~/components/common/ToggleMenu.astro"; -import Button from "~/components/ui/Button.astro" +import { Icon } from 'astro-icon/components'; +import Logo from '~/components/Logo.astro'; +import ToggleTheme from '~/components/common/ToggleTheme.astro'; +import ToggleMenu from '~/components/common/ToggleMenu.astro'; +import Button from '~/components/ui/Button.astro'; -import { getHomePermalink } from "~/utils/permalinks"; -import { trimSlash, getAsset } from "~/utils/permalinks"; -import type { CallToAction } from "~/types"; +import { getHomePermalink } from '~/utils/permalinks'; +import { trimSlash, getAsset } from '~/utils/permalinks'; +import type { CallToAction } from '~/types'; interface Link { text?: string; @@ -35,7 +35,7 @@ export interface Props { } const { - id = "header", + id = 'header', links = [], actions = [], isSticky = false, @@ -43,30 +43,36 @@ const { isFullWidth = false, showToggleTheme = false, showRssFeed = false, - position = "center", + position = 'center', } = Astro.props; -const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}` +const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`; ---
-
+
@@ -75,27 +81,28 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`
@@ -146,11 +153,11 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}` actions?.length ? ( {actions.map((btnProps) => ( -