forked from RomanHauksson/academic-project-astro-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.astro
More file actions
68 lines (57 loc) · 2.29 KB
/
Copy pathindex.astro
File metadata and controls
68 lines (57 loc) · 2.29 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
---
import { Font } from "astro:assets";
import Table from "../components/Table.astro";
import "../styles/global.css";
import "katex/dist/katex-swap.css";
import { Content, frontmatter } from "../paper.mdx";
interface Frontmatter {
title: string;
description?: string;
favicon: string;
thumbnail?: string;
theme?: "device" | "light" | "dark";
}
const {
title,
description,
favicon,
thumbnail,
theme = "device",
} = frontmatter as Frontmatter;
const baseUrl = import.meta.env.BASE_URL;
const prefix = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
---
<!doctype html>
<html class="bg-white dark:bg-zinc-900" lang="en" data-theme={theme}>
<head>
<meta charset="UTF-8" />
{description && <meta name="description" content={description} />}
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<link rel="icon" type="image/svg+xml" href={prefix + favicon} />
<meta property="og:title" content={title} />
{description && <meta property="og:description" content={description} />}
<meta property="og:type" content="website" />
{thumbnail && <meta property="og:image" content={prefix + thumbnail} />}
<Font
cssVariable="--font-noto-sans"
preload={[{ subset: "latin", style: "normal" }]}
/>
<title>{title}</title>
</head>
<body
class="prose prose-lg prose-zinc dark:prose-invert prose-a:text-blue-600 prose-a:hover:text-blue-900 prose-a:dark:text-blue-200 prose-a:dark:hover:text-blue-100 prose-a:underline prose-a:decoration-dashed prose-a:underline-offset-4 prose-a:hover:decoration-solid prose-a:font-normal prose-code:bg-zinc-200 prose-code:dark:bg-zinc-800 prose-code:text-zinc-800 prose-code:dark:text-zinc-200 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:font-medium prose-code:before:content-none prose-code:after:content-none max-w-none pt-16 pb-6 font-(family-name:--font-noto-sans)"
>
<main>
<Content components={{ table: Table }} />
</main>
<footer class="mx-auto max-w-[50rem] px-6 text-center">
<p class="prose-sm text-center">
Built with <a
href="https://research-template.roman.technology"
rel="nofollow">Roman Hauksson-Neill's project page template</a
>
</p>
</footer>
</body>
</html>