diff options
author | 2021-05-28 10:06:22 -0600 | |
---|---|---|
committer | 2021-05-28 10:06:22 -0600 | |
commit | a0055bd985a6afe503e2ad2cb4f14b550b480a0a (patch) | |
tree | d3495a14d26df04714e9bef73b2b0a1bfc9c1faa /examples/blog | |
parent | 556b9e48e4451d5aedfa0f5863c83560ffd2ee69 (diff) | |
download | astro-a0055bd985a6afe503e2ad2cb4f14b550b480a0a.tar.gz astro-a0055bd985a6afe503e2ad2cb4f14b550b480a0a.tar.zst astro-a0055bd985a6afe503e2ad2cb4f14b550b480a0a.zip |
Create astro fixes (#267)
* Remove create-astro from workspace
* Improve contrast ratio
* Swap blank template for blog template
* Remove counter components from blog template
* Use `latest` astro version
Diffstat (limited to 'examples/blog')
-rw-r--r-- | examples/blog/src/components/Counter.jsx | 15 | ||||
-rw-r--r-- | examples/blog/src/components/Nav.astro | 19 |
2 files changed, 13 insertions, 21 deletions
diff --git a/examples/blog/src/components/Counter.jsx b/examples/blog/src/components/Counter.jsx deleted file mode 100644 index c9b27e1a7..000000000 --- a/examples/blog/src/components/Counter.jsx +++ /dev/null @@ -1,15 +0,0 @@ -import React, { useState } from 'react'; -// import confetti from 'canvas-confetti'; - -export default function Counter() { - // Declare a new state variable, which we'll call "count" - const [count, setCount] = useState(0); - // console.log(confetti()); - - return ( - <div> - <p>You clicked {count} times</p> - <button onClick={() => setCount(count + 1)}>Click me</button> - </div> - ); -} diff --git a/examples/blog/src/components/Nav.astro b/examples/blog/src/components/Nav.astro index 86919ac4d..5949adb0d 100644 --- a/examples/blog/src/components/Nav.astro +++ b/examples/blog/src/components/Nav.astro @@ -4,9 +4,13 @@ export let title; <style lang="scss"> .header { - display: flex; - align-items: center; - padding: 2rem; + text-align: center; + + @media (min-width: 600px) { + display: flex; + align-items: center; + padding: 2rem; + } } .title { @@ -18,11 +22,14 @@ export let title; } .nav { - display: flex; + text-align: center; + + @media (min-width: 600px) { + display: flex; + } } ul { - display: flex; list-style: none; margin: 0; padding: 0; @@ -44,7 +51,7 @@ a { <nav class="header"> <h1 class="title">Don’s Blog</h1> <ul class="nav"> - <li><a href="/">All Posts</a></li> + <li><a href="/posts">All Posts</a></li> <li><a href="/author/don">Author: Don</a></li> <li><a href="/author/sancho">Author: Sancho</a></li> <li><a href="/about">About</a></li> |