-
Notifications
You must be signed in to change notification settings - Fork 2
/
Comment.html
301 lines (258 loc) · 8.32 KB
/
Comment.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
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Malaysia's Arts and Cultures</title>
<link rel="icon" href="https://ytsng2010.github.io/ASKProject2023/
/favicon.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicon.ico/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon.ico/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon.ico/favicon-16x16.png">
<link rel="manifest" href="favicon.ico/site.webmanifest">
<link rel="shortcut icon" type="image/png" href="favicon.ico" />
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
}
</script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<style>
.sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
}
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
.sidenav a:hover {
color: #f1f1f1;
}
.sidenav .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
}
body {
font-family: "Lato", sans-serif;
margin: 0;
background: linear-gradient(55deg, rgba(180, 233, 255, 1), rgba(255, 160, 122, 0.5), rgba(216, 220, 255, 1));
}
.navbar {
overflow: hidden;
background-color: #333;
position: fixed;
top: 0;
width: 100%;
}
.navbar a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.navbar a:hover {
background: #ddd;
color: black;
}
.main {
padding-top: 50px;
margin-top: 30px;
line-height: 1.15;
}
menu-icon {
display: hidden;
width: 40px;
height: 40px;
<img src="pictures/Logo.PNG" border="0" alt="Logo"></a> center;
}
</style>
<style>
/* Your existing styles */
/* Add the CSS styles for the star rating here */
.rating {
display: inline-block;
unicode-bidi: bidi-override;
direction: rtl;
}
.rating input {
display: none;
}
.rating label {
display: inline-block;
padding: 5px;
font-size: 24px;
color: #ddd;
cursor: pointer;
}
.rating label:hover,
.rating label:hover ~ label {
color: orange;
}
.rating input:checked ~ label {
color: orange;
}
</style>
</head>
<body>
<div id="mySidenav" class="sidenav" style="text-align:center;">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a><h3 style="color:red;">Malaysia's Art and Cultures</h3></a>
<a href="English Index.html"><h3>Home Page</h3></a>
<a href="Games.html">Games</a>
<a href="Performances.html">Performances</a>
<a href="Food.html">Food</a>
<a href="Buildings.html">Buildings</a>
<a href="Clothes.html">Clothes</a>
</div>
<div class="navbar">
<span style="font-size:35px;cursor:pointer;background-color:grey;float:left;" onclick="openNav()">☰</span>
<a href="Introduction of Project Members.html">Introduction of Project Members</a>
<a href="Comment.html">Comment</a>
<a href="Komen.html">Change Language</a>
<script type="text/javascript">
function init() {
var lookfor = document.getElementById("q").value;
var elementsToSearch = document.querySelectorAll("p, h1, h2, h3, h4, h5, li");
elementsToSearch.forEach(function (element) {
var content = element.innerHTML;
var modifiedContent = content.replace(new RegExp(lookfor, 'gi'), function (match) {
return '<span class="highlight">' + match + '</span>';
});
element.innerHTML = modifiedContent;
});
}
</script>
<style type="text/css">
.highlight {
background-color: yellow;
}
</style>
<br><input type="text" id="q" />
<button onclick="init()">Search</button>
</div>
<div class="main" style="font-size:18px;">
<marquee style="background-color:red;font-size:25px;" scrolldelay=35 truespeed="truespeed">WELCOME TO LEARN ABOUT MALAYSIA'S ARTS AND CULTURES!</marquee>
<style>
/* Add some basic styling */
img {
cursor: pointer;
transition: transform 0.3s ease;
}
/* Add a class to scale the image when clicked */
.enlarged {
transform: scale(1.5);
}
</style>
<style>
/* Add the CSS styles here */
.rating {
display: inline-block;
unicode-bidi: bidi-override;
direction: rtl;
}
.rating input {
display: none;
}
.rating label {
display: inline-block;
padding: 5px;
font-size: 24px;
color: #ddd;
cursor: pointer;
}
.rating label:hover,
.rating label:hover ~ label {
color: orange;
}
.rating input:checked ~ label {
color: orange;
}
</style>
</head>
<body>
<!-- Add an image with an ID for easy selection -->
<img id="enlargeImage" src="pictures/favicon.png" alt="Enlargable Image" onclick="enlargeImage()">
<script>
// JavaScript function to handle image enlargement
function enlargeImage() {
// Select the image element
var image = document.getElementById("enlargeImage");
// Toggle the 'enlarged' class to scale the image
image.classList.toggle("enlarged");
}
</script>
</a>
</div>
<form id="commentForm">
<!-- Add the star rating within the comment form -->
<label for="name">Name:</label><br>
<input type="text" id="name" placeholder="Name" required><br><br>
<label for="email">Email:</label><br>
<input type="email" id="email" placeholder="Email" required><br><br>
<label for="message">Message:</label><br>
<textarea id="message" placeholder="Your Comment" required></textarea><br>
<p>Star Rating:</p>
<div class="rating">
<input type="radio" id="star5" name="rating" value="5" />
<label for="star5">★</label>
<input type="radio" id="star4" name="rating" value="4" />
<label for="star4">★</label>
<input type="radio" id="star3" name="rating" value="3" />
<label for="star3">★</label>
<input type="radio" id="star2" name="rating" value="2" />
<label for="star2">★</label>
<input type="radio" id="star1" name="rating" value="1" />
<label for="star1">★</label>
</div>
<div class="g-recaptcha" data-sitekey="YOUR_SITE_KEY"></div><br>
<button type="submit">Submit</button>
</form>
<script>
// Get all the rating inputs
const ratingInputs = document.querySelectorAll('.rating input');
// Add an event listener to each input to track the selected rating
ratingInputs.forEach(input => {
input.addEventListener('change', () => {
console.log('Selected rating:', input.value);
});
});
document.getElementById('commentForm').addEventListener('submit', function (e) {
e.preventDefault();
// Retrieve form data
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const message = document.getElementById('message').value;
// Perform necessary validations
// Send AJAX request to backend to process and send email (using fetch or XMLHttpRequest)
// Show confirmation message
showConfirmation();
});
function showConfirmation() {
// Display a confirmation popup
alert("Thanks for your review!");
}
</script>
</body>
</html>