|
1 | 1 | ---
|
2 | 2 | import BaseLayout from "../layouts/layout.astro";
|
3 |
| -const response = await fetch("../content/ideas.json"); |
4 |
| -const data = await response.json(); |
5 |
| -console.log(data); |
| 3 | +import ideas from "../content/ideas.json"; |
| 4 | +import PageHeader from "../components/pageHeader/pageHeader.jsx"; |
| 5 | +import Card from "../components/card/card.jsx"; |
6 | 6 | ---
|
7 | 7 |
|
8 |
| -<BaseLayout title="Serverless - Ideas">test</BaseLayout> |
| 8 | +<BaseLayout title="Serverless - Ideas"> |
| 9 | + <PageHeader title="Ideas"> |
| 10 | + <h2>Want to play with serverless technology?</h2> |
| 11 | + <p>That's a great way to learn. Here are some ideas.</p> |
| 12 | + </PageHeader> |
| 13 | + |
| 14 | + <div class="grid ideasCardGrid"> |
| 15 | + {ideas.map((idea) => ( |
| 16 | + <Card |
| 17 | + icon={idea.icon} |
| 18 | + title={idea.title} |
| 19 | + key={idea.title} |
| 20 | + topics={idea.topics} |
| 21 | + html={idea.description} |
| 22 | + /> |
| 23 | + ))} |
| 24 | + </div> |
| 25 | +</BaseLayout> |
| 26 | + |
| 27 | +<style lang="scss"> |
| 28 | + .pageHeader { |
| 29 | + background-image: url("https://res.cloudinary.com/css-tricks/image/upload/c_scale,f_auto,q_auto,w_600/v1558188228/moon_vkpnau.png"), |
| 30 | + url("https://res.cloudinary.com/css-tricks/image/upload/f_auto,q_auto,w_1200/v1558188229/cloud5_je1yza.png"), |
| 31 | + url("/img/stars.svg"); |
| 32 | + background-size: 13%, 55%, 90%; |
| 33 | + background-repeat: no-repeat; |
| 34 | + background-position: top 40% right 42%, top right 10%, top center; |
| 35 | + @media (max-width: 420px) { |
| 36 | + background-position: top 40% right 42%, top 34% right 10%, top center; |
| 37 | + } |
| 38 | + } |
| 39 | + |
| 40 | + .ideasCardGrid { |
| 41 | + > div:nth-child(even) { |
| 42 | + background: #37236b; |
| 43 | + |
| 44 | + > div { |
| 45 | + color: #c4b2ec; |
| 46 | + > h3 { |
| 47 | + color: white; |
| 48 | + } |
| 49 | + > div:last-child { |
| 50 | + border-top-color: #311f60; |
| 51 | + background: #311f60; |
| 52 | + > span:first-child { |
| 53 | + color: white; |
| 54 | + } |
| 55 | + span { |
| 56 | + color: #a794d0; |
| 57 | + } |
| 58 | + } |
| 59 | + a { |
| 60 | + color: #deabff; |
| 61 | + font-weight: bold; |
| 62 | + } |
| 63 | + } |
| 64 | + } |
| 65 | + } |
| 66 | +</style> |
0 commit comments