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