-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnote.html
More file actions
73 lines (65 loc) · 2.98 KB
/
note.html
File metadata and controls
73 lines (65 loc) · 2.98 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
<!DOCTYPE html>
<html lang="en">
<head>
<script>
(function () {
const stored = localStorage.getItem('theme');
const prefers = window.matchMedia('(prefers-color-scheme:dark)').matches;
if (stored === 'dark' || (!stored && prefers)) {
document.documentElement.classList.add('dark-mode');
} else {
document.documentElement.classList.remove('dark-mode');
}
})();
</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Note - Robin's Site</title>
<link rel="stylesheet" href="css/shared.css" />
<link rel="stylesheet" href="css/code.css" />
<link rel="stylesheet" href="css/notes.css" />
<template id="meta-include" data-src="components/meta-tags.html"></template>
<link id="hljs-light" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.7.0/styles/github.min.css">
<link id="hljs-dark" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.7.0/styles/github-dark.min.css" disabled>
<script src="https://cdn.jsdelivr.net/npm/highlight.js@11.7.0/lib/common.js"></script>
<script>
function applyHljsTheme(mode) {
const light = document.getElementById('hljs-light');
const dark = document.getElementById('hljs-dark');
if (mode === 'dark') {
dark.removeAttribute('disabled');
light.setAttribute('disabled', '');
} else {
light.removeAttribute('disabled');
dark.setAttribute('disabled', '');
}
}
window.onThemeChange = applyHljsTheme;
document.addEventListener('DOMContentLoaded', () => {
applyHljsTheme(document.documentElement.classList.contains('dark-mode') ? 'dark' : 'light');
});
</script>
<meta http-equiv="Content-Security-Policy" content="default-src 'self';
script-src 'self' https://cdn.jsdelivr.net;
connect-src 'self';
style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net;
font-src 'self' https://cdn.jsdelivr.net;
img-src 'self' data:;">
</head>
<body>
<header id="header-placeholder"></header>
<a id="back-to-course" class="top-back-link">Back to Course</a>
<main>
<article id="note-content" class="markdown-body"></article>
</main>
<a id="back-to-course" class="back-link">Back to Course</a>
<footer id="footer-placeholder"></footer>
<script src="js/mathjax.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" async></script>
<script type="module" src="js/header-footer.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-yaml@4/dist/js-yaml.min.js"></script>
<script src="notes/js/note.js"></script>
<script defer src="/_vercel/insights/script.js"></script>
</body>
</html>