Commit 14dc68b6c7
14dc68b6c7f7b1b0129a370768411439053cdd24
parent: 0889d4487a
Unsigned
Alicia Sykes <alicia@omg.lol> · 2024-02-17 16:44 UTC
Made lots of components
Layout: unified · split
web/src/components/Hero.astro
+22 −1
| @@ -45,13 +45,15 @@ |
| 45 | 45 | <p class="intro"> |
| 46 | 46 | Your guide to finding privacy-respecting alternatives to popular software and services. |
| 47 | 47 | </p> |
| 48 | <div class="github-link-wrap"> |
| 49 | <a href="https://github.com/lissy93/awesome-privacy">View or Edit on GitHub</a> |
| 50 | </div> |
| 48 | 51 | </div> |
| 49 | 52 | |
| 50 | 53 | |
| 51 | 54 | <style lang="scss"> |
| 52 | 55 | |
| 53 | 56 | .hero { |
| 54 | | background: var(--accent-fg); |
| 55 | 57 | color: var(--accent-fg); |
| 56 | 58 | border-radius: var(--curve-sm); |
| 57 | 59 | padding: 2rem 4rem; |
| @@ -89,11 +91,30 @@ |
| 89 | 91 | color: var(--accent-fg); |
| 90 | 92 | background: var(--accent-3); |
| 91 | 93 | border: 2px solid var(--foreground); |
| 94 | border-radius: var(--curve-sm); |
| 92 | 95 | box-shadow: 6px 6px 0 var(--foreground); |
| 93 | 96 | font-family: "Lekton", sans-serif; |
| 94 | 97 | font-weight: 700; |
| 95 | 98 | max-width: 735px; |
| 96 | 99 | margin: 0 auto; |
| 97 | 100 | } |
| 101 | .github-link-wrap { |
| 102 | font-family: "Lekton", sans-serif; |
| 103 | max-width: 735px; |
| 104 | text-align: center; |
| 105 | margin: 0 auto; |
| 106 | border: 1px solid var(--foreground); |
| 107 | box-shadow: 3px 3px 0 var(--foreground); |
| 108 | background: var(--accent); |
| 109 | border-radius: 18px; |
| 110 | padding: 0.5rem 1rem; |
| 111 | a { |
| 112 | text-decoration: none; |
| 113 | color: var(--accent-fg);; |
| 114 | font-size: 1.2rem; |
| 115 | font-family: "Lekton", sans-serif; |
| 116 | font-weight: bold; |
| 117 | } |
| 118 | } |
| 98 | 119 | |
| 99 | 120 | </style> |
web/src/components/Search.astro
added
+69
| @@ -0,0 +1,69 @@ |
| 1 | --- |
| 2 | --- |
| 3 | |
| 4 | <div class="search-wrap"> |
| 5 | <label>What are you looking for?</label> |
| 6 | <div class="input-wrap"> |
| 7 | <input class="search-input" type="text" placeholder="E.g. Password manager, browser, firewall" /> |
| 8 | <button>🔎</button> |
| 9 | </div> |
| 10 | |
| 11 | </div> |
| 12 | |
| 13 | <style lang="scss"> |
| 14 | .search-wrap { |
| 15 | |
| 16 | display: flex; |
| 17 | flex-direction: column; |
| 18 | width: 80%; |
| 19 | margin: 1rem auto; |
| 20 | |
| 21 | label { |
| 22 | color: var(--foreground); |
| 23 | } |
| 24 | |
| 25 | .input-wrap { |
| 26 | display: flex; |
| 27 | // gap: 1rem; |
| 28 | } |
| 29 | |
| 30 | button { |
| 31 | padding: 0.2rem; |
| 32 | font-size: 2rem; |
| 33 | transform: translateX(-3rem); |
| 34 | border-radius: 0 8px 8px 0; |
| 35 | background: none; |
| 36 | border: none; |
| 37 | |
| 38 | // background: var(--accent-fg); |
| 39 | // color: var(--accent-3); |
| 40 | // border: 2px solid var(--foreground); |
| 41 | // box-shadow: 6px 6px 0 var(--foreground); |
| 42 | // font-family: "Lekton", sans-serif; |
| 43 | // transition: all 0.2s ease-in-out; |
| 44 | } |
| 45 | |
| 46 | input { |
| 47 | |
| 48 | width: 100%; |
| 49 | |
| 50 | padding: 0.2rem; |
| 51 | border-radius: 8px; |
| 52 | |
| 53 | background: var(--accent-fg); |
| 54 | color: var(--accent-3); |
| 55 | border: 2px solid var(--foreground); |
| 56 | box-shadow: 6px 6px 0 var(--foreground); |
| 57 | font-family: "Rubik", sans-serif; |
| 58 | font-size: 1.6rem; |
| 59 | transition: all 0.2s ease-in-out; |
| 60 | |
| 61 | &:focus { |
| 62 | outline: none; |
| 63 | border: 2px solid var(--accent-3); |
| 64 | box-shadow: 6px 6px 0 var(--accent-3); |
| 65 | color: var(--accent); |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | </style> |
web/src/components/form/Button.astro
added
+32
| @@ -0,0 +1,32 @@ |
| 1 | --- |
| 2 | |
| 3 | const { text, url, icon } = Astro.props; |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | <div class="button"> |
| 8 | <a href={url}>{text}<slot /></a> |
| 9 | </div> |
| 10 | |
| 11 | <style lang="scss"> |
| 12 | .button { |
| 13 | font-family: "Lekton", sans-serif; |
| 14 | text-align: center; |
| 15 | border: 1px solid var(--foreground); |
| 16 | box-shadow: 3px 3px 0 var(--foreground); |
| 17 | background: var(--accent); |
| 18 | border-radius: 18px; |
| 19 | padding: 0.5rem 1rem; |
| 20 | transition: all 0.2s ease-in-out; |
| 21 | &:hover { |
| 22 | box-shadow: 4px 4px 0 var(--foreground); |
| 23 | } |
| 24 | a { |
| 25 | text-decoration: none; |
| 26 | color: var(--accent-fg);; |
| 27 | font-size: 1.2rem; |
| 28 | font-family: "Lekton", sans-serif; |
| 29 | font-weight: bold; |
| 30 | } |
| 31 | } |
| 32 | </style> |
web/src/components/scafold/Footer.astro
added
+23
| @@ -0,0 +1,23 @@ |
| 1 | |
| 2 | <footer> |
| 3 | <a href="/about">Awesome Privacy</a> is licensed |
| 4 | under <a href="https://github.com/Lissy93/awesome-privacy/blob/main/LICENSE">MIT</a> |
| 5 | © <a href="https://aliciasykes.com">Alicia Sykes</a> 2024 | |
| 6 | Source code available on <a href="https://github.com/Lissy93/awesome-privacy">GitHub</a> |
| 7 | </footer> |
| 8 | |
| 9 | <style lang="scss"> |
| 10 | footer { |
| 11 | font-family: "Lekton", sans-serif; |
| 12 | font-weight: bold; |
| 13 | text-align: center; |
| 14 | padding: 0.5rem 0; |
| 15 | margin: 0 auto; |
| 16 | a { |
| 17 | font-family: "Lekton", sans-serif; |
| 18 | color: var(--accent); |
| 19 | } |
| 20 | |
| 21 | |
| 22 | } |
| 23 | </style> |
web/src/components/scafold/MainCard.astro
added
+17
| @@ -0,0 +1,17 @@ |
| 1 | |
| 2 | |
| 3 | <main> |
| 4 | <slot /> |
| 5 | </main> |
| 6 | |
| 7 | <style lang="scss"> |
| 8 | main { |
| 9 | margin: 2rem auto; |
| 10 | padding: 1rem; |
| 11 | width: 1000px; |
| 12 | max-width: calc(100% - 2rem); |
| 13 | border: 2px solid var(--foreground); |
| 14 | box-shadow: 6px 6px 0 var(--foreground); |
| 15 | background: var(--accent-fg); |
| 16 | } |
| 17 | </style> |
web/src/components/scafold/NavBar.astro
added
+69
| @@ -0,0 +1,69 @@ |
| 1 | --- |
| 2 | --- |
| 3 | |
| 4 | <div class="nav"> |
| 5 | <a href="/"><h1>Awesome Privacy</h1></a> |
| 6 | <nav> |
| 7 | <a href="#">Categories</a> |
| 8 | <a href="#">Contributing</a> |
| 9 | <a href="https://digital-defense.io">Security Checklist</a> |
| 10 | <a href="https://github.com/lissy93/awesome-privacy">GitHub</a> |
| 11 | </nav> |
| 12 | </div> |
| 13 | |
| 14 | <style lang="scss"> |
| 15 | .nav { |
| 16 | background: var(--accent-fg); |
| 17 | display: flex; |
| 18 | justify-content: space-between; |
| 19 | align-items: center; |
| 20 | gap: 1rem; |
| 21 | border-bottom: 2px solid var(--foreground); |
| 22 | |
| 23 | a { |
| 24 | text-decoration: none; |
| 25 | h1 { |
| 26 | margin: 0; |
| 27 | font-size: 2.4rem; |
| 28 | padding: 0 1rem; |
| 29 | color: var(--foreground); |
| 30 | font-family: "Lekton", sans-serif; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | nav { |
| 35 | display: flex; |
| 36 | align-items: center; |
| 37 | height: 3rem; |
| 38 | a { |
| 39 | padding: 1rem; |
| 40 | font-size: 1.2rem; |
| 41 | font-family: "Lekton", sans-serif; |
| 42 | font-weight: bold; |
| 43 | color: var(--foreground); |
| 44 | border-left: 2px solid var(--foreground); |
| 45 | transition: background 0.3s, transform 0.3s, box-shadow 0.3s; |
| 46 | transition-timing-function: ease-in-out; |
| 47 | &:hover { |
| 48 | background: var(--accent-3); |
| 49 | color: var(--accent-fg); |
| 50 | border-bottom: 2px solid var(--foreground); |
| 51 | &:nth-child(4n+1) { |
| 52 | background-color: var(--accent); |
| 53 | } |
| 54 | &:nth-child(4n+2) { |
| 55 | background-color: var(--accent-2); |
| 56 | color: var(--foreground); |
| 57 | } |
| 58 | &:nth-child(4n+3) { |
| 59 | background-color: var(--accent-3); |
| 60 | } |
| 61 | &:nth-child(4n+4) { |
| 62 | background-color: var(--accent-4); |
| 63 | color: var(--foreground); |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | </style> |