From 9397fe65f9086b47f6b2945e6a3a06464291dd26 Mon Sep 17 00:00:00 2001 From: prototypa Date: Sat, 21 Jan 2023 20:20:20 -0500 Subject: [PATCH] Improve design and extract data --- src/components/widgets/Header.astro | 124 +++++++++++++--------------- 1 file changed, 58 insertions(+), 66 deletions(-) diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro index 6dd9637..fe5b841 100644 --- a/src/components/widgets/Header.astro +++ b/src/components/widgets/Header.astro @@ -4,51 +4,33 @@ import Logo from '~/components/common/Logo.astro'; import ToggleTheme from '~/components/common/ToggleTheme.astro'; import ToggleMenu from '~/components/common/ToggleMenu.astro'; -import { getHomePermalink, getBlogPermalink, getPermalink, getAsset } from '~/utils/permalinks'; +import { getHomePermalink, getAsset } from '~/utils/permalinks'; -const links = [ - { - text: 'Pages', - links: [ - { - text: 'Features', - href: '#', - }, - { - text: 'Pricing', - href: '#', - }, - { - text: 'About us', - href: '#', - }, - { - text: 'Contact', - href: '#', - }, - { - text: 'Terms', - href: getPermalink('/terms'), - }, - { - text: 'Privacy policy', - href: getPermalink('/privacy'), - }, - ], - }, - { - text: 'Resources', - href: getPermalink('useful-resources-to-create-websites', 'post'), - }, - { - text: 'Blog', - href: getBlogPermalink(), - }, -]; +interface Link { + text?: string; + href?: string; + ariaLabel?: string; + icon?: string; +} + +interface ActionLink extends Link { + type?: string; +} + +interface MenuLink extends Link { + links?: Array; +} + +export interface Props { + links: Array; + actions: Array; +} + +const { links = [], actions = [] } = Astro.props; ---