web/src/layouts/Layout.astro
107 lines · 3143 bytes
1---
2import { ViewTransitions } from 'astro:transitions'
3import NavBar from '@components/scafold/NavBar.astro';
4import Footer from '@components/scafold/Footer.astro';
5
6interface Props {
7 title?: string; // Page title
8 description?: string; // Overide description tag
9 keywords?: string; // Overide keywords tag
10 hideNav?: boolean; // Don't show the navbar (just homepage)
11 author?: string; // Author of the content
12}
13
14const {
15 title='Awesome Privacy | The Ultimate List of Private Apps',
16 description='Your guide to finding privacy-respecting alternatives to popular software and services.',
17 keywords='security, privacy, awesome privacy, data collection, free software, open source, privacy tools, privacy respecting software',
18 hideNav=false,
19 author='Alicia Sykes'
20} = Astro.props;
21
22---
23
24<!doctype html>
25<html lang="en">
26 <head>
27
28 <ViewTransitions />
29
30 <!-- Core info -->
31 <title>{title}</title>
32 <meta name="description" content={description}>
33 <meta name="keywords" content={keywords}>
34 <meta name="author" content={author}>
35
36 <!-- Page info, viewport, Astro credit -->
37 <meta charset="UTF-8" />
38 <meta name="viewport" content="width=device-width, initial-scale=1.0">
39 <meta name="viewport" content="width=device-width" />
40 <meta name="generator" content={Astro.generator} />
41
42 <!-- Icons and colors -->
43 <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
44 <link rel="icon" type="image/png" sizes="64x64" href="/favicon.png">
45 <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
46
47 <!-- Social media meta tags (Open Graphh + Twitter) -->
48 <meta property="og:type" content="website">
49 <meta property="og:url" content="https://awesome-privacy.xyz">
50 <meta property="og:title" content={title}>
51 <meta property="og:description" content={description}>
52 <meta property="og:image" content="/banner.png">
53 <meta name="twitter:card" content="summary_large_image">
54 <meta name="twitter:url" content="https://awesome-privacy.xyz">
55 <meta name="twitter:title" content={title}>
56 <meta name="twitter:description" content={description}>
57 <meta name="twitter:image" content="/banner.png">
58
59 <!-- Non-tracking hit counter -->
60 <script defer is:inline
61 type="text/partytown"
62 data-domain="awesome-privacy.xyz"
63 src="https://no-track.as93.net/js/script.js">
64 </script>
65 </head>
66 <body>
67 {!hideNav && <NavBar /> }
68 <slot />
69 <Footer />
70 </body>
71</html>
72
73<style is:global>
74 @import '../styles/values.css';
75 @import '../styles/typography.css';
76 </style>
77
78
79<style is:global>
80 :root {
81 --accent: 136, 58, 234;
82 --accent-light: 224, 204, 250;
83 --accent-dark: 49, 10, 101;
84 --accent-gradient: linear-gradient(
85 45deg,
86 rgb(var(--accent)),
87 rgb(var(--accent-light)) 30%,
88 white 60%
89 );
90 }
91 html {
92 background: var(--background);
93 background-size: 224px;
94 ::selection {
95 background: var(--accent);
96 color: var(--accent-fg);
97 }
98 scroll-behavior: smooth;
99 }
100 body {
101 margin: 0;
102 min-height: 100vh;
103 background: #feecff;
104 background: -webkit-radial-gradient(circle, #feecff 0%, #e1e4fb 100%);
105 background: radial-gradient(circle, #feecff 0%, #e1e4fb 100%);
106 }
107</style>