From 78855ce8922a5649813a750bc9fa65aa1112f173 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 3 May 2022 17:08:15 -0700 Subject: [PATCH] first polish (#3236) --- examples/basics/src/components/Card.astro | 75 +++++++++ .../src/{components => layouts}/Layout.astro | 1 + examples/basics/src/pages/index.astro | 153 +++--------------- 3 files changed, 102 insertions(+), 127 deletions(-) create mode 100644 examples/basics/src/components/Card.astro rename examples/basics/src/{components => layouts}/Layout.astro (96%) diff --git a/examples/basics/src/components/Card.astro b/examples/basics/src/components/Card.astro new file mode 100644 index 000000000..7b911b395 --- /dev/null +++ b/examples/basics/src/components/Card.astro @@ -0,0 +1,75 @@ +--- +export interface Props { + title: string, + body: string, + href: string, +} +const {href, title, body} = Astro.props; +--- + + \ No newline at end of file diff --git a/examples/basics/src/components/Layout.astro b/examples/basics/src/layouts/Layout.astro similarity index 96% rename from examples/basics/src/components/Layout.astro rename to examples/basics/src/layouts/Layout.astro index cf1c00262..fe43c7e27 100644 --- a/examples/basics/src/components/Layout.astro +++ b/examples/basics/src/layouts/Layout.astro @@ -27,6 +27,7 @@ const { title } = Astro.props as Props; --color-text: hsl(12, 5%, 4%); --color-bg: hsl(10, 21%, 95%); + --color-border: hsl(17, 24%, 90%); } html { diff --git a/examples/basics/src/pages/index.astro b/examples/basics/src/pages/index.astro index 605f8cf2c..ea7401f11 100644 --- a/examples/basics/src/pages/index.astro +++ b/examples/basics/src/pages/index.astro @@ -1,81 +1,35 @@ --- -import Layout from '../components/Layout.astro'; +import Layout from '../layouts/Layout.astro'; +import Card from '../components/Card.astro'; --- -

Welcome to Astro

-

Your first mission: tweak this message to try our hot module reloading. Check the src/pages directory!

+

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