-
Notifications
You must be signed in to change notification settings - Fork 1
/
dlr.html
101 lines (95 loc) · 3.11 KB
/
dlr.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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="manifest" href="/manifest.json" />
<meta charset="UTF-8" />
<link
href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&display=swap"
rel="stylesheet"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DLR, Cable Car & Elizabeth Line | Trackle™</title>
<meta name="theme-color" content="#60399e" />
<link rel="icon" type="image/x-icon" href="/logo.png" />
<style>
iframe {
border: none;
width: 100%;
height: 100%;
}
body,
html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
</style>
<script>
function updateThemeColor() {
const metaThemeColor = document.querySelector(
"meta[name='theme-color']"
);
const isDarkMode = window.matchMedia(
"(prefers-color-scheme: dark)"
).matches;
// Update the content based on the current theme
if (isDarkMode) {
metaThemeColor.setAttribute("content", "#4a2775"); // Dark purple for dark theme
} else {
metaThemeColor.setAttribute("content", "#60399e"); // Original purple for light theme
}
}
// Run the function to set the initial theme color
updateThemeColor();
// Listen for changes in theme preference
window
.matchMedia("(prefers-color-scheme: dark)")
.addEventListener("change", updateThemeColor);
</script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""
/>
<script
src="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<link rel="stylesheet" href="/dlr/style.css" />
<script src="/dlr/main.js" type="text/javascript"></script>
<script src="/dlr/places.js" type="text/javascript"></script>
<script src="/dlr/game.js" type="text/javascript"></script>
<script>
window.onload = loadPage;
</script>
</head>
<body>
<div class="game">
<div class="header">
<a href="/home.html"><button class="backButton">Back</button></a>
<center><h1>DLR, Cable Car & Elizabeth Line</h1></center>
<button class="resetButton" onclick="app.resetGame()">Reset</button>
</div>
<div id="mapContainer">
<div id="map"></div>
</div>
<div class="formContainer">
<div class="form">
<input id="guess" type="text" placeholder="Enter a station" />
</div>
<br />
<div id="scoreContainer">
<strong><span id="score"></span> / <span id="total"></span></strong>
</div>
<a
href="https://github.com/SB-Designs/Trackle?tab=readme-ov-file#credits--licence"
style="text-decoration: none; color: inherit; outline: none"
>Credits</a
>
</div>
</div>
</body>
</html>