-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (92 loc) · 5.53 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GeoQuiz</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<link rel="stylesheet" href="style.css">
</head>
<body class="bg-light">
<div class="d-flex">
<nav class="sidebar bg-primary text-white d-flex flex-column p-3" style="width: 250px; min-height: 100vh;">
<h2 class="text-center fw-bold text-uppercase" style="letter-spacing: 2px;">GeoQuiz</h2>
<ul class="nav flex-column mt-2">
<li class="nav-item">
<a href="index.html" class="nav-link d-flex align-items-center text-white py-2 px-3 rounded hover-effect">
<i class="bi bi-globe me-2"></i>
Countries
</a>
</li>
<li class="nav-item mt-1">
<a href="capitals.html" class="nav-link d-flex align-items-center text-white py-2 px-3 rounded hover-effect">
<i class="bi bi-building me-2"></i>
Capitals
</a>
</li>
</ul>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col p-4">
<div class="row justify-content-between mb-2" style="margin:unset;">
<div class="input-group row align-items-center" style="width:30rem;">
<input type="text" id="country-input" class="form-control mx-3" placeholder="Type a country name..." autocomplete="off" disabled>
<button id="play-button" class="btn btn-view">Play</button>
<button id="give-up-button" class="btn btn-danger" style="display: none;">Give Up</button>
<button id="play-again-button" class="btn btn-view" style="display: none;">Play Again</button>
</div>
<div class="col-auto text-center" >
<span class="h5 mb-0">Countries Correct</span>
<div class="h4 mb-0 blue"><span id="correct-count">0</span> / <span id="total-count">0</span></div>
</div>
<div class="row justify-content-end align-items-center">
<div class="col-auto text-center">
<span class="h5 mb-0">Time left</span>
<div id="timer" class="h4 mb-0 blue">15:00</div>
</div>
</div>
</div>
<div id="map" class="rounded border w-100" style="height: 75vh;"></div>
<!-- View Options Label and Buttons Row -->
<div class="container mt-3 d-flex align-items-center justify-content-center">
<span class="view-options-label mr-3">Change focus:</span>
<div class="btn-group" role="group" aria-label="Region View Options">
<button class="btn btn-view" onclick="setView('Europe')">Europe</button>
<button class="btn btn-view" onclick="setView('Asia')">Asia</button>
<button class="btn btn-view" onclick="setView('Oceania')">Oceania</button>
<button class="btn btn-view" onclick="setView('America')">America</button>
<button class="btn btn-view" onclick="setView('Africa')">Africa</button>
<button class="btn btn-view" onclick="setView('World')">World</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal Overlay for Background Blur -->
<div class="modal-overlay" style="display: none;"></div>
<!-- Modal for End of Game -->
<div id="game-over-modal" class="modal" style="display: none;">
<div class="modal-content" style="height:100%;border:none;">
<button id="close-modal-button"
style="position: absolute; top: 10px; right: 10px; background: transparent; border: none; font-size: 1.5em; cursor: pointer;">
×
</button>
<h2>Game Over!</h2>
<p>You guessed <span id="correct-count-final" class="h5 blue">0</span> countries correctly out of <span id="total-count-final" class="h5 blue">0</span>.</p>
<h4>Countries You Missed:</h4>
<ul id="missed-countries-list"></ul>
<button id="restart-button" class="bg-primary">Play Again</button>
</div>
</div>
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="js/script.js"></script>
</body>
</html>