From a92533eb4c7ec02e8edec07dd454b5c298606c1a Mon Sep 17 00:00:00 2001 From: Cole Peters Date: Thu, 5 Oct 2023 12:57:57 -0500 Subject: [PATCH] WIP new pages, mobile menu updates --- app/docs/nav-data.mjs | 12 - app/elements/docs/header.mjs | 210 ------------------ app/elements/docs/layout.mjs | 4 +- app/elements/docs/nav.mjs | 3 +- app/elements/docs/theme-toggle.mjs | 6 +- app/elements/editorial-header.mjs | 10 + .../header-v2.mjs => enhance-header.mjs} | 101 +++++++-- app/head.mjs | 32 ++- app/pages/index.html | 101 +-------- app/pages/showcase.html | 28 +++ styleguide.json | 3 +- 11 files changed, 165 insertions(+), 345 deletions(-) delete mode 100644 app/elements/docs/header.mjs create mode 100644 app/elements/editorial-header.mjs rename app/elements/{docs/header-v2.mjs => enhance-header.mjs} (57%) create mode 100644 app/pages/showcase.html diff --git a/app/docs/nav-data.mjs b/app/docs/nav-data.mjs index d3e6c415..f9f84289 100644 --- a/app/docs/nav-data.mjs +++ b/app/docs/nav-data.mjs @@ -12,18 +12,6 @@ export const data = [ label: 'Learn', slug: 'learn', items: [ - { - type: TYPE.link, - slug: 'why-enhance', - label: 'Why Enhance?', - description: 'Our core philosophy', - }, - { - type: TYPE.link, - slug: 'showcase', - label: 'Showcase', - description: 'Built with Enhance', - }, { type: TYPE.category, slug: 'get-started', diff --git a/app/elements/docs/header.mjs b/app/elements/docs/header.mjs deleted file mode 100644 index 5503bc80..00000000 --- a/app/elements/docs/header.mjs +++ /dev/null @@ -1,210 +0,0 @@ -import arc from '@architect/functions' - -export default function DocsHeader({ html, state }) { - const { store } = state - const { searchTerm, sidebarData } = store - - // check if today is Nov 30: Blue Beanie Day - const today = new Date() - const isBlueBeanieDay = today.getMonth() === 11 - 1 && today.getDate() === 30 - - const navItems = [] - if (sidebarData?.length > 0) { - sidebarData - .filter((i) => i.type === 'tab') - .forEach((tab) => { - navItems.push( - `
  • - ${tab.label} -
  • ` - ) - }) - } - - return html` - - - - - - - - - - - - - ` -} diff --git a/app/elements/docs/layout.mjs b/app/elements/docs/layout.mjs index 6ccd0536..36c1d45e 100644 --- a/app/elements/docs/layout.mjs +++ b/app/elements/docs/layout.mjs @@ -112,11 +112,11 @@ export default function DocsLayout({ html, state }) { - + diff --git a/app/elements/docs/nav.mjs b/app/elements/docs/nav.mjs index 4021b141..bf5abee8 100644 --- a/app/elements/docs/nav.mjs +++ b/app/elements/docs/nav.mjs @@ -1,6 +1,6 @@ function List(items, classes = []) { return ` -