web/src/components/Hero.astro
100 lines · 2270 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 and comparing privacy-respecting alternatives to
9 popular software and services.
10 </p>
11 <div class="github-link-wrap">
12 <a
13 href="https://github.com/lissy93/awesome-privacy"
14 target="_blank"
15 rel="noopener noreferrer"
16 >
17 <FontAwesome iconName="github" />
18 View on GitHub
19 </a>
20 </div>
21</div>
22
23<style lang="scss">
24 .hero {
25 color: var(--accent-fg);
26 border-radius: var(--curve-sm);
27 padding: var(--space-lg) var(--space-2xl);
28 display: flex;
29 flex-direction: column;
30 gap: var(--space-lg);
31 @media (max-width: 768px) {
32 padding: var(--space-lg) var(--space-md);
33 }
34 }
35 svg {
36 position: absolute;
37 top: -32px;
38 left: 50%;
39 transform: translatex(-50%);
40 width: 220px;
41 height: auto;
42 opacity: var(--opacity-muted);
43 display: none;
44 }
45 h1 {
46 margin: 0;
47 font-size: var(--text-5xl);
48 font-weight: 700;
49 line-height: 1;
50 text-align: center;
51 font-family: var(--font-heading);
52 color: var(--accent-3);
53 -webkit-text-fill-color: var(--accent-3);
54 -webkit-text-stroke-width: 2px;
55 -webkit-text-stroke-color: var(--box-outline);
56 text-shadow: 3px 3px 0 var(--box-outline);
57 @media (max-width: 768px) {
58 font-size: 4rem;
59 }
60 }
61 .intro {
62 text-align: center;
63 font-size: var(--text-xl);
64 padding: var(--space-sm) var(--space-md);
65 color: var(--accent-3-fg);
66 background: var(--accent-3);
67 border: var(--border-heavy);
68 border-radius: var(--curve-sm);
69 box-shadow: var(--shadow-lg);
70 font-family: var(--font-subtitle);
71 font-weight: 700;
72 max-width: 735px;
73 margin: 0 auto;
74 }
75 .github-link-wrap {
76 font-family: var(--font-subtitle);
77 max-width: 735px;
78 text-align: center;
79 margin: 0 auto;
80 border: var(--border-light);
81 box-shadow: var(--shadow-sm);
82 background: var(--accent);
83 border-radius: var(--curve-pill);
84 padding: var(--space-sm) var(--space-md);
85 a {
86 text-decoration: none;
87 color: var(--accent-fg);
88 font-size: var(--text-md);
89 font-weight: bold;
90 display: flex;
91 align-items: center;
92 :global(svg) {
93 width: 1.5rem;
94 height: 1.5rem;
95 color: var(--accent-fg);
96 margin-right: var(--space-sm);
97 }
98 }
99 }
100</style>