From c735556726e75428550a3d28a2cf58e2c8490b7d Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Mon, 21 Jul 2025 21:56:55 +0300 Subject: Initial template --- src/components/widgets/Header.astro | 167 ++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 src/components/widgets/Header.astro (limited to 'src/components/widgets/Header.astro') diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro new file mode 100644 index 0000000..ff4a3aa --- /dev/null +++ b/src/components/widgets/Header.astro @@ -0,0 +1,167 @@ +--- +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'; + +interface Link { + text?: string; + href?: string; + ariaLabel?: string; + icon?: string; +} + +interface MenuLink extends Link { + links?: Array; +} + +export interface Props { + id?: string; + links?: Array; + actions?: Array; + isSticky?: boolean; + isDark?: boolean; + isFullWidth?: boolean; + showToggleTheme?: boolean; + showRssFeed?: boolean; + position?: string; +} + +const { + id = 'header', + links = [], + actions = [], + isSticky = false, + isDark = false, + isFullWidth = false, + showToggleTheme = false, + showRssFeed = false, + position = 'center', +} = Astro.props; + +const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`; +--- + +
+
+
+
+ + + +
+ +
+
+ +
+
+
+ {showToggleTheme && } + { + showRssFeed && ( + + + + ) + } +
+ { + actions?.length ? ( + + {actions.map((btnProps) => ( +
+
+
+
-- cgit v1.2.3