-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunpage.html
More file actions
250 lines (239 loc) · 11.5 KB
/
Copy pathfunpage.html
File metadata and controls
250 lines (239 loc) · 11.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hotel Word Puzzle - Booklify Fun Page</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<style>
.word-tile {
display: inline-block;
padding: 15px 20px;
margin: 5px;
background: linear-gradient(135deg, #4a86e8, #3d6fd6);
color: white;
border-radius: 8px;
cursor: pointer;
font-size: 1.1rem;
font-weight: bold;
transition: all 0.3s;
user-select: none;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.word-tile:hover {
transform: translateY(-3px);
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.word-tile.selected {
background: linear-gradient(135deg, #28a745, #20c997);
transform: scale(1.1);
}
.word-tile.used {
opacity: 0.3;
cursor: not-allowed;
}
.sentence-area {
min-height: 100px;
padding: 20px;
background: #f8f9fa;
border: 3px dashed #4a86e8;
border-radius: 10px;
margin: 20px 0;
}
.sentence-word {
display: inline-block;
padding: 10px 15px;
margin: 5px;
background: #4a86e8;
color: white;
border-radius: 5px;
font-size: 1.1rem;
position: relative;
}
.sentence-word .remove-btn {
position: absolute;
top: -8px;
right: -8px;
background: #dc3545;
color: white;
border: none;
border-radius: 50%;
width: 24px;
height: 24px;
font-size: 12px;
cursor: pointer;
line-height: 1;
}
.score-display {
font-size: 2rem;
font-weight: bold;
color: #4a86e8;
}
.game-card {
transition: all 0.3s;
}
.game-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm sticky-top">
<div class="container-fluid">
<a class="navbar-brand d-flex align-items-center" href="index.html">
<img src="images/booklify.png" alt="Booklify Logo" class="me-2" style="height: 48px; width: auto;">
<span class="fw-bold text-primary">Booklify</span>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="hotels.html">Hotels</a>
</li>
<li class="nav-item">
<a class="nav-link btn btn-outline-primary ms-2" href="booking.html">My Booking</a>
</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" href="questionnaire.html">Feedback</a>
</li>
<li class="nav-item">
<a class="nav-link" href="calculate.html">Calculator</a>
</li>
<li class="nav-item">
<a class="nav-link active fw-semibold" href="funpage.html">Fun Page</a>
</li>
</ul>
</div>
</div>
</nav>
<main>
<div class="container my-5">
<div class="row justify-content-center">
<div class="col-lg-10">
<div class="text-center mb-5">
<h1 class="display-4 fw-bold text-primary mb-3">
<i class="bi bi-puzzle me-3"></i>Hotel Word Puzzle Game
</h1>
<p class="lead text-muted">Rearrange the words to form correct sentences about hotel booking! Click words to add them to your sentence.</p>
</div>
<div class="row mb-4">
<div class="col-md-4">
<div class="card text-center game-card">
<div class="card-body">
<h6 class="text-muted">Score</h6>
<div class="score-display" id="score">0</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card text-center game-card">
<div class="card-body">
<h6 class="text-muted">Level</h6>
<div class="score-display" id="level">1</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card text-center game-card">
<div class="card-body">
<h6 class="text-muted">Sentences Completed</h6>
<div class="score-display" id="completed">0</div>
</div>
</div>
</div>
</div>
<div class="card shadow-lg mb-4">
<div class="card-header bg-primary text-white">
<h5 class="mb-0"><i class="bi bi-lightbulb me-2"></i>Build This Sentence:</h5>
</div>
<div class="card-body">
<div class="alert alert-info" id="targetSentence">
</div>
</div>
</div>
<div class="card shadow-lg mb-4">
<div class="card-header bg-success text-white">
<h5 class="mb-0"><i class="bi bi-pencil-square me-2"></i>Your Sentence:</h5>
</div>
<div class="card-body">
<div class="sentence-area" id="sentenceArea">
<p class="text-muted text-center">Click words below to build your sentence...</p>
</div>
<div class="text-center mt-3">
<button class="btn btn-danger me-2" onclick="clearSentence()">
<i class="bi bi-x-circle me-2"></i>Clear Sentence
</button>
<button class="btn btn-success" onclick="checkSentence()">
<i class="bi bi-check-circle me-2"></i>Check Answer
</button>
</div>
</div>
</div>
<div class="card shadow-lg">
<div class="card-header bg-info text-white">
<h5 class="mb-0"><i class="bi bi-grid-3x3-gap me-2"></i>Available Words:</h5>
</div>
<div class="card-body">
<div id="wordsContainer">
</div>
</div>
</div>
<div class="modal fade" id="instructionsModal" tabindex="-1" aria-labelledby="instructionsModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header bg-primary text-white">
<h5 class="modal-title" id="instructionsModalLabel">How to Play</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<ol>
<li>Read the target sentence shown at the top</li>
<li>Click words from the available words section to add them to your sentence</li>
<li>Words will appear in the "Your Sentence" area in the order you click them</li>
<li>Click the "X" button on a word to remove it from your sentence</li>
<li>Click "Check Answer" when you think your sentence is correct</li>
<li>Earn points for correct sentences and advance to the next level!</li>
</ol>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Got it!</button>
</div>
</div>
</div>
</div>
<div class="text-center mt-4">
<button class="btn btn-outline-info" data-bs-toggle="modal" data-bs-target="#instructionsModal">
<i class="bi bi-question-circle me-2"></i>How to Play
</button>
<button class="btn btn-outline-primary ms-2" onclick="startNewGame()">
<i class="bi bi-arrow-clockwise me-2"></i>New Game
</button>
</div>
</div>
</div>
</div>
</main>
<footer class="bg-dark text-white text-center py-4 mt-5">
<div class="container">
<p class="mb-1">© 2025 booklify.com. All rights reserved.</p>
<p class="mb-1">Department of Computer Science, Sultan Qaboos University</p>
<p class="mb-0">COMP3700 - Introduction to Web Computing - Fall 2025</p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="js/funpage.js"></script>
</body>
</html>