|
1 | 1 | <!DOCTYPE html>
|
2 | 2 | <html lang="en">
|
3 | 3 | <head>
|
4 |
| -<link rel="manifest" href="/manifest.json" /> |
| 4 | + <link rel="manifest" href="/manifest.json" /> |
5 | 5 | <meta charset="UTF-8" />
|
6 |
| - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
7 |
| - <title>London Underground | Trackle™</title> |
8 |
| - <meta name="theme-color" content="#000f9f" /> <!-- Default theme color for light mode --> |
9 | 6 | <link
|
10 |
| - rel="icon" |
11 |
| - type="image/x-icon" |
12 |
| - href="/logo.png" |
| 7 | + href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&display=swap" |
| 8 | + rel="stylesheet" |
13 | 9 | />
|
| 10 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 11 | + <title>London Underground | Trackle™</title> |
| 12 | + <meta name="theme-color" content="#ee7c0e" /> |
| 13 | + <link rel="icon" type="image/x-icon" href="/logo.png" /> |
14 | 14 |
|
15 | 15 | <style>
|
16 | 16 | iframe {
|
|
28 | 28 | </style>
|
29 | 29 | <script>
|
30 | 30 | function updateThemeColor() {
|
31 |
| - const metaThemeColor = document.querySelector("meta[name='theme-color']"); |
32 |
| - const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches; |
| 31 | + const metaThemeColor = document.querySelector( |
| 32 | + "meta[name='theme-color']" |
| 33 | + ); |
| 34 | + const isDarkMode = window.matchMedia( |
| 35 | + "(prefers-color-scheme: dark)" |
| 36 | + ).matches; |
33 | 37 |
|
34 | 38 | // Update the content based on the current theme
|
35 | 39 | if (isDarkMode) {
|
36 |
| - metaThemeColor.setAttribute("content", "#00004D"); // Dark blue for dark theme |
| 40 | + metaThemeColor.setAttribute("content", "#BD4B00"); // Dark purple for dark theme |
37 | 41 | } else {
|
38 |
| - metaThemeColor.setAttribute("content", "#000f9f"); // Light blue for light theme |
| 42 | + metaThemeColor.setAttribute("content", "#ee7c0e"); // Original purple for light theme |
39 | 43 | }
|
40 | 44 | }
|
41 | 45 |
|
42 | 46 | // Run the function to set the initial theme color
|
43 | 47 | updateThemeColor();
|
44 | 48 |
|
45 | 49 | // Listen for changes in theme preference
|
46 |
| - window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", updateThemeColor); |
| 50 | + window |
| 51 | + .matchMedia("(prefers-color-scheme: dark)") |
| 52 | + .addEventListener("change", updateThemeColor); |
47 | 53 | </script>
|
48 |
| - |
49 | 54 | <link
|
50 | 55 | rel="stylesheet"
|
51 | 56 | href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css"
|
|
68 | 73 | <body>
|
69 | 74 | <div class="game">
|
70 | 75 | <div class="header">
|
71 |
| - <div id="instructions"> |
72 |
| - <h1>Trackle™ - London Underground</h1> |
73 |
| - <h2>How many Underground stations can you guess?</h2> |
74 |
| - </div> |
| 76 | + <a href="/home.html"><button class="backButton">Back</button></a> |
| 77 | + <center><h1>London Underground</h1></center> |
| 78 | + <button class="resetButton" onclick="app.resetGame()">Reset</button> |
75 | 79 | </div>
|
76 | 80 |
|
77 | 81 | <div id="mapContainer">
|
78 | 82 | <div id="map"></div>
|
79 |
| - <div class="formContainer"> |
80 |
| - <div class="form"> |
81 |
| - <input id="guess" type="text" placeholder="Enter a station" /> |
82 |
| - <button class="enterButton" onclick="enterGuess()">Guess</button> |
83 |
| - <button class="resetButton" onclick="app.resetGame()"> |
84 |
| - Reset Game |
85 |
| - </button> |
86 |
| - <button |
87 |
| - class="websiteButton" |
88 |
| - onclick="window.top.location.href='/home.html'" |
89 |
| - > |
90 |
| - Exit Game |
91 |
| - </button> |
92 |
| - </div> |
93 |
| - </div> |
94 |
| - </div> |
95 |
| - </div> |
96 |
| - |
97 |
| - <div class="pageOverlay"> |
98 |
| - <div id="scoreContainer"> |
99 |
| - Your score: |
100 |
| - <strong><span id="score"></span> / <span id="total"></span></strong> |
101 | 83 | </div>
|
102 |
| - <div class="credits"> |
103 |
| - <p> |
104 |
| - ©️ SB Designs 2024: |
105 | 84 |
|
106 |
| - <u> |
107 |
| - <a |
108 |
| - href="https://sbdesigns.pages.dev" |
109 |
| - style="text-decoration: none; color: inherit" |
110 |
| - >Website</a |
111 |
| - > |
112 |
| - </u> |
113 |
| - </p> |
| 85 | + <div class="formContainer"> |
| 86 | + <div class="form"> |
| 87 | + <input id="guess" type="text" placeholder="Enter a station" /> |
| 88 | + </div> |
| 89 | + <br /> |
| 90 | + <div id="scoreContainer"> |
| 91 | + <strong><span id="score"></span> / <span id="total"></span></strong> |
| 92 | + </div> |
| 93 | + <a |
| 94 | + href="https://github.com/SB-Designs/Trackle?tab=readme-ov-file#credits--licence" |
| 95 | + style="text-decoration: none; color: inherit; outline: none" |
| 96 | + >ℹ</a |
| 97 | + > |
114 | 98 | </div>
|
115 | 99 | </div>
|
116 | 100 | </body>
|
|
0 commit comments