From a72ab10c623022860691d6a095b74dea70cc6f69 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Wed, 24 Mar 2021 16:01:28 -0700 Subject: [PATCH] Redesign pages, remove layout nesting (#24) * wip * new svelte-style prop declaration is working * got it working! * revert h changes * format * style lang update --- .../snowpack/astro/components/BaseHead.astro | 38 +++ .../astro/components/BaseLayout.astro | 20 ++ .../astro/components/MainLayout.astro | 23 ++ examples/snowpack/astro/components/Nav.astro | 4 +- .../snowpack/astro/components/Subnav.astro | 14 +- examples/snowpack/astro/layouts/base.astro | 62 ----- .../astro/layouts/content-with-cover.astro | 134 ++++++----- examples/snowpack/astro/layouts/content.astro | 64 ++--- examples/snowpack/astro/layouts/main.astro | 21 -- examples/snowpack/astro/layouts/post.astro | 225 +++++++++--------- examples/snowpack/astro/pages/404.astro | 35 +-- examples/snowpack/astro/pages/guides.astro | 137 ++++++----- examples/snowpack/astro/pages/index.astro | 206 ++++++++-------- examples/snowpack/astro/pages/news.astro | 130 +++++----- examples/snowpack/astro/pages/plugins.astro | 114 ++++----- .../proof-of-concept-dynamic/[slug].astro | 42 ++-- src/@types/astro.ts | 4 +- src/codegen/index.ts | 18 +- src/dev.ts | 2 +- src/frontend/render/react.ts | 8 +- src/micromark-encode.ts | 2 +- src/runtime.ts | 8 +- src/transform2.ts | 91 +++---- .../astro-basic/astro/pages/index.astro | 17 +- .../astro/layouts/content.astro | 13 +- .../astro-markdown/astro/pages/index.astro | 17 +- .../react-component/astro/pages/index.astro | 14 +- test/snowpack-integration.test.js | 2 +- 28 files changed, 751 insertions(+), 714 deletions(-) create mode 100644 examples/snowpack/astro/components/BaseHead.astro create mode 100644 examples/snowpack/astro/components/BaseLayout.astro create mode 100644 examples/snowpack/astro/components/MainLayout.astro delete mode 100644 examples/snowpack/astro/layouts/base.astro delete mode 100644 examples/snowpack/astro/layouts/main.astro diff --git a/examples/snowpack/astro/components/BaseHead.astro b/examples/snowpack/astro/components/BaseHead.astro new file mode 100644 index 000000000..b24861ca6 --- /dev/null +++ b/examples/snowpack/astro/components/BaseHead.astro @@ -0,0 +1,38 @@ +--- +import Banner from './Banner.astro'; +import Nav from './Nav.astro'; + +export let title: string; +export let description: string; +export let permalink: string; +--- + + + + + + + + + +{title} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/snowpack/astro/components/BaseLayout.astro b/examples/snowpack/astro/components/BaseLayout.astro new file mode 100644 index 000000000..2e141a83f --- /dev/null +++ b/examples/snowpack/astro/components/BaseLayout.astro @@ -0,0 +1,20 @@ +--- +import Banner from './Banner.astro'; +import Nav from './Nav.astro'; +--- + + +