From e88b23ea5271369bcd26b0f011cc9146fc258b8c Mon Sep 17 00:00:00 2001 From: Elian ☕️ Date: Tue, 21 Jun 2022 19:07:07 +0200 Subject: add Astro Deno Example (#3645) * add Astro Deno Example * add changeset * update pnpm lock Co-authored-by: Dan Jutan --- examples/deno/src/components/Card.astro | 74 +++++++++++++++++++++++++++++++++ examples/deno/src/layouts/Layout.astro | 56 +++++++++++++++++++++++++ examples/deno/src/pages/index.astro | 73 ++++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100644 examples/deno/src/components/Card.astro create mode 100644 examples/deno/src/layouts/Layout.astro create mode 100644 examples/deno/src/pages/index.astro (limited to 'examples/deno/src') diff --git a/examples/deno/src/components/Card.astro b/examples/deno/src/components/Card.astro new file mode 100644 index 000000000..53b67a9da --- /dev/null +++ b/examples/deno/src/components/Card.astro @@ -0,0 +1,74 @@ +--- +export interface Props { + title: string, + body: string, + href: string, +} +const {href, title, body} = Astro.props; +--- + + diff --git a/examples/deno/src/layouts/Layout.astro b/examples/deno/src/layouts/Layout.astro new file mode 100644 index 000000000..fe43c7e27 --- /dev/null +++ b/examples/deno/src/layouts/Layout.astro @@ -0,0 +1,56 @@ +--- +export interface Props { + title: string; +} + +const { title } = Astro.props as Props; +--- + + + + + + + + {title} + + + + + + + diff --git a/examples/deno/src/pages/index.astro b/examples/deno/src/pages/index.astro new file mode 100644 index 000000000..ea7401f11 --- /dev/null +++ b/examples/deno/src/pages/index.astro @@ -0,0 +1,73 @@ +--- +import Layout from '../layouts/Layout.astro'; +import Card from '../components/Card.astro'; +--- + +
+

Welcome to Astro

+

+ Check out the src/pages directory to get started.
+ Code Challenge: Tweak the "Welcome to Astro" message above. +

+ +
+
+ + -- cgit v1.2.3