diff options
Diffstat (limited to 'examples/starter/src/components')
-rw-r--r-- | examples/starter/src/components/Logo.astro | 9 | ||||
-rw-r--r-- | examples/starter/src/components/Tour.astro | 84 |
2 files changed, 9 insertions, 84 deletions
diff --git a/examples/starter/src/components/Logo.astro b/examples/starter/src/components/Logo.astro new file mode 100644 index 000000000..02c68c7f0 --- /dev/null +++ b/examples/starter/src/components/Logo.astro @@ -0,0 +1,9 @@ +--- +// Export a "Props" interface to . +export interface Props { + height?: number, + width?: number, +} +const {height = 80, width = 60 } = Astro.props; +--- +<img height={height} width={width} src="/logo.svg" alt="Astro logo"> diff --git a/examples/starter/src/components/Tour.astro b/examples/starter/src/components/Tour.astro deleted file mode 100644 index 9a9ebe17f..000000000 --- a/examples/starter/src/components/Tour.astro +++ /dev/null @@ -1,84 +0,0 @@ ---- -import { Markdown } from 'astro/components'; ---- - -<article> - <div class="banner"> - <p><strong>🧑🚀 Seasoned astronaut?</strong> Delete this file. Have fun!</p> - </div> - - <section> - <Markdown> - ## 🚀 Project Structure - - Inside of your Astro project, you'll see the following folders and files: - - ``` - / - ├── public/ - │ └── favicon.ico - ├── src/ - │ ├── components/ - │ │ └── Tour.astro - │ └── pages/ - │ └── index.astro - └── package.json - ``` - - Astro looks for `.astro` or `.md` files in the `src/pages/` directory. - Each page is exposed as a route based on its file name. - - There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. - - Any static assets, like images, can be placed in the `public/` directory. - </Markdown> - </section> - - <section> - <h2>👀 Want to learn more?</h2> - <p>Feel free to check <a href="https://github.com/withastro/astro">our documentation</a> or jump into our <a href="https://astro.build/chat">Discord server</a>.</p> - </section> -</article> - -<style> - article { - padding-top: 2em; - line-height: 1.5; - } - section { - margin-top: 2em; - display: flex; - flex-direction: column; - gap: 1em; - max-width: 70ch; - } - - .banner { - text-align: center; - font-size: 1.2rem; - background: var(--color-light); - padding: 1em 1.5em; - padding-left: 0.75em; - border-radius: 4px; - } - - pre, - code { - font-family: var(--font-mono); - background: var(--color-light); - border-radius: 4px; - } - - pre { - padding: 1em 1.5em; - } - - .tree { - line-height: 1.2; - } - - code:not(.tree) { - padding: 0.125em; - margin: 0 -0.125em; - } -</style> |