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