-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
111 lines (95 loc) · 3.82 KB
/
index.html
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Algorithms with interactive visualizations made in the Rust programming language."
/>
<meta name="theme-color" content="#161b1d" />
<!-- Trunk -->
<link data-trunk rel="copy-file" href="/robots.txt" />
<link data-trunk rel="copy-file" href="/assets/images/GitHub-Mark-64px.png" />
<link data-trunk rel="copy-file" href="/assets/images/GitHub-Mark-Light-64px.png" />
<link data-trunk rel="copy-file" href="/manifest.json" />
<link data-trunk rel="copy-file" href="/service-worker.js" />
<link data-trunk rel="copy-dir" href="/assets" />
<link data-trunk rel="copy-dir" href="src/sorting/src/sorting_algorithms/" />
<link data-trunk rel="copy-dir" href="src/pathfinding/src/pathfinding_algorithms/" />
<link data-trunk rel="sass" href="src/styles/main.scss" as="style" />
<!-- Fonts -->
<link rel="preload" href="/assets/fonts/RobotoMono-VariableFont_wght.ttf" as="font" type="font/ttf" crossorigin />
<link
rel="preload"
href="/assets/fonts/RobotoMono-Italic-VariableFont_wght.ttf"
as="font"
type="font/ttf"
crossorigin
/>
<!-- Manifest and icons -->
<link rel="manifest" href="/manifest.json" />
<link rel="icon" type="image/ico-icon" href="/assets/images/icons/favicon.ico" />
<link rel="apple-touch-icon" href="/assets/images/icons/icon-192x192.png" />
<script>
// Register ServiceWorker
window.onload = () => {
'use strict';
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/service-worker.js');
}
};
// Now we store the user's preferred color scheme in localStorage.
// Note that this only stores the preferred color scheme so that it can be accessed on the Rust side (web-sys doesn't seem to have window.matchMedia).
// The actual theme can be overwritten by the 'app-color-scheme-mode' stored in localStorage. If it is set to 'auto', the preferred color scheme is used.
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
if (darkModeMediaQuery.matches) {
localStorage.setItem('preferred-color-scheme', '"Dark"');
} else {
localStorage.setItem('preferred-color-scheme', '"Light"');
}
// Subscribe to preferred color scheme changes
darkModeMediaQuery.addEventListener('change', (e) => {
const prefersDark = e.matches;
localStorage.setItem('preferred-color-scheme', prefersDark ? '"Dark"' : '"Light"');
});
</script>
<title>Algorust</title>
<style>
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 100 700;
font-display: optional;
src: url('/assets/fonts/RobotoMono-VariableFont_wght.ttf');
}
@font-face {
font-family: 'Roboto Mono';
font-style: italic;
font-weight: 100 700;
font-display: optional;
src: url('/assets/fonts/RobotoMono-Italic-VariableFont_wght.ttf');
}
html,
body {
margin: 0;
min-height: 100vh;
overflow: overlay;
}
html {
--top-bar-height: 4rem;
}
body {
background-color: var(--bg-color-1);
color: var(--text-color);
box-sizing: border-box;
font-family: 'Roboto Mono', Consolas, monospace;
}
::selection {
background-color: hsla(var(--color-accent-3-hsl), 50%);
color: var(--text-color);
}
</style>
</head>
</html>