web/src/components/Hero.astro

151 lines · 3184 bytes

  1---
  2import FontAwesome from "@components/form/FontAwesome.svelte"
  3---
  4
  5<div class="hero">
  6  <h1>Awesome Privacy</h1>
  7  <p class="intro">
  8    Your guide to finding privacy-respecting alternatives to popular software and services.
  9  </p>
 10  <div class="github-link-wrap">
 11    <a href="https://github.com/lissy93/awesome-privacy">
 12      <FontAwesome iconName="github" />
 13      View on GitHub
 14    </a>
 15  </div>
 16</div>
 17
 18<nav class="top-right">
 19  <ul>
 20    <li>
 21      <a href="/">Home</a>
 22    </li>
 23    <li>
 24      <a href="/search">Search</a>
 25    </li>
 26    <li>
 27      <a href="/browse">Browse</a>
 28    </li>
 29    <li>
 30      <a href="/about">About</a>
 31    </li>
 32    <li>
 33      <a href="https://github.com/lissy93/awesome-privacy">Source</a>
 34    </li>
 35    <li>
 36      <a href="https://as93.net">More Apps</a>
 37    </li>
 38  </ul>
 39</nav>
 40
 41
 42<style lang="scss">
 43
 44	.hero {
 45    color: var(--accent-fg);
 46    border-radius: var(--curve-sm);
 47    padding: 2rem 4rem;
 48    display: flex;
 49    flex-direction: column;
 50    gap: 2rem;
 51    @media(max-width: 768px) {
 52      padding: 2rem 1rem;
 53    }
 54	}
 55	svg {
 56		position: absolute;
 57		top: -32px;
 58		left: 50%;
 59		transform: translatex(-50%);
 60		width: 220px;
 61		height: auto;
 62		opacity: 0.6;
 63    display: none;
 64	}
 65	h1 {
 66    margin: 0;
 67		font-size: 5rem;
 68		font-weight: 700;
 69		line-height: 1;
 70		text-align: center;
 71    font-family: 'Libre Franklin', sans-serif;
 72    color: var(--accent-3);
 73    -webkit-text-fill-color: var(--accent-3);
 74    -webkit-text-stroke-width: 2px;
 75    -webkit-text-stroke-color: var(--foreground);
 76    text-shadow: 3px 3px 0 var(--foreground);
 77    @media(max-width: 768px) {
 78      font-size: 4rem;
 79    }
 80	}
 81  .intro {
 82    text-align: center;
 83    font-size: 1.6rem;
 84    padding: 0.5rem 1rem;
 85    color: var(--accent-fg);
 86    background: var(--accent-3);
 87    border: 2px solid var(--foreground);
 88    border-radius: var(--curve-sm);
 89    box-shadow: 6px 6px 0 var(--foreground);
 90    font-family: "Lekton", sans-serif;
 91    font-weight: 700;
 92    max-width: 735px;
 93    margin: 0 auto;
 94  }
 95  .github-link-wrap {
 96    font-family: "Lekton", sans-serif;
 97    max-width: 735px;
 98    text-align: center;
 99    margin: 0 auto;
100    border: 1px solid var(--foreground);
101    box-shadow: 3px 3px 0 var(--foreground);
102    background: var(--accent);
103    border-radius: 18px;
104    padding: 0.5rem 1rem;
105    a {
106      text-decoration: none;
107      color: var(--accent-fg);;
108      font-size: 1.2rem;
109      font-family: "Lekton", sans-serif;
110      font-weight: bold;
111      display: flex;
112      align-items: center;
113      :global(svg) {
114        width: 1.5rem;
115        height: 1.5rem;
116        color: var(--accent-fg);
117        margin-right: 0.5rem;
118      }
119    }
120  }
121
122  .top-right {
123    position: absolute;
124    top: 0;
125    right: 1rem;
126    opacity: 0.8;
127    display: none;
128    &:hover {
129      opacity: 1;
130    }
131    ul {
132      list-style: none;
133      display: flex;
134      padding: 0;
135      gap: 0.5rem;
136      li {
137        &:not(:last-child) {
138          border-right: 1px solid var(--accent);
139          padding-right: 0.5rem;
140        }
141      }
142      li a {
143        text-decoration: none;
144        &:hover {
145          text-decoration: underline;
146        }
147      }
148    }
149  }
150	
151</style>