-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathLayout.astro
More file actions
75 lines (71 loc) · 2.17 KB
/
Layout.astro
File metadata and controls
75 lines (71 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
import Nav from "../components/Nav.astro";
import "./global.css";
interface Props {
title: string;
preview?: string;
description?: string;
}
const {
title,
description = "Ms Boba's experimental website. Open for business while construction is ongoing.",
preview = "/og-image.png",
} = Astro.props;
const user = Astro.locals.user;
---
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://use.typekit.net/wkx0aeo.css" />
<meta charset="UTF-8" />
<meta property="og:site_name" content="Essential Randomness" />
<meta property="og:title" content={title} />
<meta name="description" content={description} />
<meta property="og:description" content={description} />
<meta property="og:image" content={preview} />
<meta name="twitter:image" content={preview} />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:title" content={title} />
<meta property="twitter:site" content="@EssentialRandom" />
<meta property="twitter:description" content={description} />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<link
rel="icon"
type="image/png"
href="/favicon/favicon-16x16.png"
sizes="16x16"
/>
<link
rel="icon"
type="image/png"
href="/favicon/favicon-32x32.png"
sizes="32x32"
/>
<link rel="apple-touch-icon" href="/favicon/apple-touch-icon.png" />
<title>{title}</title>
<slot name="head" />
<script
defer
data-domain="essentialrandomness.com"
src="https://plausible.io/js/script.js"></script>
</head>
<body>
{
Astro.locals.user ? (
<div>Hello {Astro.locals.user.username}</div>
) : (
<form method="post" action="/api/login">
<label for="username">Username</label>
<input id="username" name="username" />
<label for="password">Password</label>
<input id="password" name="password" />
<button>Continue</button>
</form>
)
}
</body>
<Nav />
<slot />
</html>