-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunStuff.html
More file actions
272 lines (265 loc) · 15.5 KB
/
FunStuff.html
File metadata and controls
272 lines (265 loc) · 15.5 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Personal Website</title>
<link rel="stylesheet" href="Styles\reset.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<!--My cutsom css-->
<link rel="stylesheet" href="Styles\style.css">
</head>
<body class="text-bg-dark p-3">
<header class="title-section">
<div>
<br>
<div class="container-fluid p-0">
<header class="header-bg d-flex align-items-center justify-content-center">
<h1 class="text-white fw-bold">Fun Stuff</h1>
</header>
</div>
<nav class="navbar navbar-expand-sm" style="background-color: #43472387;">
<div class="container-fluid">
<!-- Brand (optional) -->
<!-- <a class="navbar-brand" href="#">Brand</a> -->
<!-- Toggler button for small screens -->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent"
aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Navbar links -->
<div class="collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav me-auto mb-2 mb-sm-0">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<!-- Dropdown for Projects -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="projectsMenu" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
Projects
</a>
<ul class="dropdown-menu" aria-labelledby="projectsMenu">
<li><a class="dropdown-item" href="Soft_Projects.html">Software Projects</a></li>
<li><a class="dropdown-item" href="Manu_Projects.html">Manufacturing Engineering Projects</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="About.html">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Contact.html">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="FunStuff.html">Fun Stuff</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</header>
<!-- Fun Stuff Navigation Section (Dark Theme) -->
<section class="container my-4 mb-5" id="funstuff-nav">
<div class="card p-4 mb-4">
<h2 class="text-center mb-4">Explore the Games Below</h2>
<div class="row g-3">
<div class="col-12 col-sm-6 col-lg-3 d-flex">
<a href="#dobForm" class="btn btn-gradient-blue w-100 py-3">🎂 Birthday Countdown</a>
</div>
<div class="col-12 col-sm-6 col-lg-3 d-flex">
<a href="#weather-section" class="btn btn-gradient-green w-100 py-3">🌤️ Real-Time Weather</a>
</div>
<div class="col-12 col-sm-6 col-lg-3 d-flex">
<a href="#number-guessing-game" class="btn btn-gradient-red w-100 py-3">🎲 Number Guessing Game</a>
</div>
<div class="col-12 col-sm-6 col-lg-3 d-flex">
<a href="#memory-game" class="btn btn-gradient-blue w-100 py-3">🧠 Memory Matching Game</a>
</div>
</div>
</div>
</section>
</div>
</header>
<hr>
<br>
<h2 class="text-center mt-5"> Find out in when your birthday is!</h2>
<div class="container mt-5 mb-5 d-flex justify-content-center">
<div class="row">
<!-- Left Column: DOB Form -->
<div class="col-md-6">
<form id="dobForm" class="mb-3" style="max-width: 300px;">
<p>Please Enter your Date of Birth</p>
<!-- Date of Birth Input -->
<div class="form-floating mb-3" style="max-width: 300px;">
<input
type="date"
class="form-control"
id="birthdate"
placeholder="YYYY-MM-DD"
>
<label for="birthdate">Date of Birth</label>
</div>
<button type="submit" id="submitbtn" class="btn btn-secondary mt-3">Submit</button>
<p id="result" class="mt-3"></p>
</form>
</div>
<!-- Right Column: Countdown Button -->
<div class="col-md-6 d-flex flex-column justify-content-center align-items-start">
<p>Birthday Countdown</p>
<div class="p-3 border rounded mb-3" style="background-color: white; color: black;">
<p>Click the button below to check how many days are left until your next birthday.</p>
</div>
<button id="countdownBtn" class="btn btn-outline-primary" disabled>Check Days Left</button>
<p id="countdownResultInMonths" class="mt-3"></p>
<p id="countdownResultInDays"></p>
</div>
</div>
</div>
<hr>
<h1 id="Age" class="d-flex justify-content-center"></h1>
<div class="container my-5" id="weather-section">
<div class="card p-4 shadow-sm weather-card">
<h3 class="mb-4 text-center">🌤️ Weather Forecast</h3>
<form id="weatherForm" class="mb-4">
<div class="row g-3 mb-3">
<div class="col-12 col-md-6">
<label for="weatherCityInput" class="form-label fw-semibold weather-label">City</label>
<input type="text" class="form-control weather-input" id="weatherCityInput" placeholder="Enter city name..." required>
</div>
<div class="col-12 col-md-6">
<label for="weatherDaysSelect" class="form-label fw-semibold weather-label">Forecast Days</label>
<select id="weatherDaysSelect" class="form-select weather-input">
<option value="1" selected>1 Day</option>
<option value="2">2 Days</option>
<option value="3">3 Days</option>
<option value="4">4 Days</option>
<option value="5">5 Days</option>
<option value="6">6 Days</option>
<option value="7">7 Days</option>
<option value="8">8 Days</option>
<option value="9">9 Days</option>
<option value="10">10 Days</option>
<option value="11">11 Days</option>
<option value="12">12 Days</option>
<option value="13">13 Days</option>
<option value="14">14 Days</option>
</select>
</div>
</div>
<button type="submit" class="btn btn-gradient-green w-100 py-2">Get Forecast</button>
</form>
<div id="weatherResult" class="alert alert-info" style="display:none;"></div>
<div id="weatherForecast" class="weather-forecast" style="display:none;"></div>
</div>
</div>
<hr>
<!-- Number Guessing Game Section -->
<section id="number-guessing-game" class="d-flex justify-content-center align-items-center mt-5" style="min-height: 70vh;">
<div class="card guessing-game-card shadow-lg p-4">
<h2 class="text-center mb-4" style="color: #1a2537; font-weight: 700; letter-spacing: 1px; font-size: 2.1rem;">Number Guessing Game</h2>
<div class="row g-3 mb-2">
<div class="col-12 col-md-6">
<label for="intervalSelect" class="form-label fw-semibold guessing-game-label">Interval</label>
<select id="intervalSelect" class="form-select guessing-game-select">
<option value="50">1 - 50</option>
<option value="100">1 - 100</option>
<option value="200">1 - 200</option>
<option value="500">1 - 500</option>
</select>
</div>
<div class="col-12 col-md-6">
<label for="difficultySelect" class="form-label fw-semibold guessing-game-label">Difficulty</label>
<select id="difficultySelect" class="form-select guessing-game-select">
<option value="easy">Easy (20 tries)</option>
<option value="medium">Medium (10 tries)</option>
<option value="hard">Hard (5 tries)</option>
</select>
</div>
</div>
<div class="mb-3">
<label for="guessInput" class="form-label fw-semibold guessing-game-label">Your Guess</label>
<input type="number" id="guessInput" class="form-control guessing-game-input" placeholder="Type a number..." min="1" max="50" step="1" disabled>
</div>
<div class="d-flex justify-content-center gap-2 mb-3">
<button id="startGameBtn" class="btn btn-gradient-green guessing-game-btn">Start</button>
<button id="guessBtn" class="btn btn-gradient-blue guessing-game-btn" disabled>Guess</button>
<button id="restartBtn" class="btn btn-gradient-red guessing-game-btn" style="display:none;">Restart</button>
</div>
<div id="gameMessage" class="alert text-center" style="display:none; font-size:1.1rem;"></div>
<div id="gameMessage" class="alert text-center guessing-game-message" style="display:none;"></div>
<div id="triesLeft" class="text-center fw-bold mt-2 mb-2" style="color:#1a2537; font-size:1.1rem;"></div>
<div id="triesLeft" class="text-center fw-bold mt-2 mb-2 guessing-game-tries"></div>
<div id="guessHistorySection" style="display:none;">
<h5 class="mt-3 mb-2 text-center guessing-game-history-title">Your Guesses</h5>
<ul id="guessHistory" class="list-group list-group-flush mb-2"></ul>
</div>
</div>
<style>
.btn-gradient-green {
background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
color: #fff;
border: none;
border-radius: 8px;
transition: box-shadow 0.2s;
}
.btn-gradient-green:hover {
box-shadow: 0 2px 8px rgba(67,233,123,0.18);
}
.btn-gradient-blue {
background: linear-gradient(90deg, #396afc 0%, #2948ff 100%);
color: #fff;
border: none;
border-radius: 8px;
transition: box-shadow 0.2s;
}
.btn-gradient-blue:hover {
box-shadow: 0 2px 8px rgba(41,72,255,0.18);
}
.btn-gradient-red {
background: linear-gradient(90deg, #ff5858 0%, #f09819 100%);
color: #fff;
border: none;
border-radius: 8px;
transition: box-shadow 0.2s;
}
.btn-gradient-red:hover {
box-shadow: 0 2px 8px rgba(255,88,88,0.18);
}
</style>
</section>
<hr class="my-4">
<!-- Memory Matching Game Section -->
<section id="memory-game" class="container my-5">
<div class="card p-4 shadow-sm memory-game-card">
<div class="d-flex justify-content-between align-items-center mb-3">
<h3 class="mb-0">🧠 Memory Matching Game</h3>
<div>
<button id="memoryRestartBtn" class="btn btn-outline-light btn-sm me-2">Restart</button>
<button id="memoryStartBtn" class="btn btn-gradient-green btn-sm">Start</button>
</div>
</div>
<div class="d-flex justify-content-between align-items-center mb-2">
<div>Moves: <span id="memoryMoves">0</span></div>
<div>Time: <span id="memoryTimer">00:00</span></div>
<div>Best: <span id="memoryBest">--</span></div>
</div>
<div id="memoryGrid" class="memory-grid mt-3"></div>
<div id="memoryMessage" class="alert mt-3" style="display:none;"></div>
</div>
</section>
</main>
<footer class="site-footer text-center text-white">
<div class="container py-4">
<p>© 2025 Hassan ElGhayaty. All rights reserved.</p>
<p>
<a href="main.html" class="text-white">Home</a> |
<a href="About.html" class="text-white">About</a> |
<a href="Contact.html" class="text-white">Contact</a>
</p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"></script>
<script src="script.js"></script>
</body>
</html>