-
Notifications
You must be signed in to change notification settings - Fork 0
/
review.html
266 lines (235 loc) · 9.19 KB
/
review.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Leave a Review</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 10px;
padding: 10px;
background-color: #f4f4f4;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
transition: background-color 0.3s, color 0.3s;
}
.dark-mode {
background-color: #333;
color: #f4f4f4;
}
.container {
background-color: #fff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
max-width: 600px;
width: 100%;
transition: background-color 0.3s;
}
.dark-mode .container {
background-color: #444;
}
h2 {
text-align: center;
margin-bottom: 20px;
color: inherit;
}
.review-form {
display: flex;
flex-direction: column;
gap: 15px;
}
input, textarea {
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
background-color: #fff;
color: #333;
transition: background-color 0.3s, color 0.3s, border 0.3s;
}
.dark-mode input, .dark-mode textarea {
background-color: #555;
color: #fff;
border: 1px solid #666;
}
textarea {
min-height: 100px;
}
.upload-area {
display: flex;
gap: 10px;
align-items: center;
}
.upload-area label {
cursor: pointer;
padding: 10px 20px;
background-color: #4CAF50;
color: #fff;
border-radius: 5px;
transition: background-color 0.3s;
}
.upload-area label:hover {
background-color: #45a049;
}
input[type="file"] {
display: none;
}
.submit-button {
background-color: #4CAF50;
color: #fff;
padding: 12px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
.submit-button:hover {
background-color: #45a049;
}
.dark-mode .submit-button {
background-color: #45a049;
}
.reviews {
margin-top: 30px;
}
.review {
border: 1px solid #ddd;
padding: 15px;
border-radius: 5px;
margin-bottom: 15px;
transition: background-color 0.3s, border 0.3s;
}
.dark-mode .review {
background-color: #555;
border: 1px solid #666;
}
.review-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.review-header h4 {
margin: 0;
color: inherit;
}
.review-header .timestamp {
color: #777;
font-size: 14px;
}
.review-content {
margin-top: 10px;
}
.media {
margin-top: 10px;
}
.media img, .media video {
max-width: 100%;
height: auto;
border-radius: 5px;
}
.toggle-dark-mode {
position: absolute;
top: 10px;
right: 10px;
padding: 10px;
background-color: #4CAF50;
color: #fff;
border: none;
border-radius: 50%;
cursor: pointer;
transition: background-color 0.3s;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.toggle-dark-mode:hover {
background-color: #45a049;
}
.toggle-dark-mode svg {
fill: #fff;
width: 20px;
height: 20px;
}
.dark-mode .toggle-dark-mode {
background-color: #45a049;
}
</style>
</head>
<body>
<button class="toggle-dark-mode" onclick="toggleDarkMode()">
<svg id="dark-mode-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M6.76 4.84l-1.41-1.41-1.41 1.41a.996.996 0 101.41 1.41l1.41-1.41zM1 13h3c.55 0 1-.45 1-1s-.45-1-1-1H1c-.55 0-1 .45-1 1s.45 1 1 1zm8 8c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1s-1 .45-1 1v3c0 .55.45 1 1 1zm8.24-1.41l1.41 1.41 1.41-1.41a.996.996 0 10-1.41-1.41l-1.41 1.41zm3.95-6.59h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c.55 0 1-.45 1-1s-.45-1-1-1zM12 2.79c-.39 0-.74.28-.91.67l-1 2.68c-.18.5.12 1.05.62 1.23s1.05-.12 1.23-.62l1-2.68c.18-.5-.12-1.05-.62-1.23a.996.996 0 00-.32-.05zm3.54 7.1c-.26-.31-.69-.33-1-.07a5.48 5.48 0 00-3.49-1.25 5.5 5.5 0 00-5.49 5.49c0 1.31.44 2.52 1.25 3.49-.26.31-.24.74.07 1s.74.24 1-.07a6.987 6.987 0 01-2.24-5.19c0-3.87 3.13-7 7-7 2.05 0 3.94.83 5.19 2.24.31.26.75.24 1-.07.25-.31.23-.74-.07-1z"/>
</svg>
</button>
<div class="container">
<h2>Leave a Review</h2>
<form class="review-form">
<input type="text" placeholder="Your Name" required>
<textarea placeholder="Your Review" required></textarea>
<div class="upload-area">
<label for="upload-image">Upload Image</label>
<input type="file" id="upload-image" accept="image/*">
</div>
<div class="upload-area">
<label for="upload-video">Upload Video</label>
<input type="file" id="upload-video" accept="video/*">
</div>
<div class="upload-area">
<label for="upload-audio">Upload Audio</label>
<input type="file" id="upload-audio" accept="audio/*">
</div>
<button type="submit" class="submit-button">Submit Review</button>
</form>
<div class="reviews">
<h2>Recent Reviews</h2>
<div class="review">
<div class="review-header">
<h4>Priya Tyagi</h4>
<span class="timestamp">2023-12-20</span>
</div>
<div class="review-content">
<p>This is a great product! I highly recommend it.</p>
</div>
<div class="media">
<img src="padimg.jpg" alt="Review Image">
</div>
</div>
<div class="review">
<div class="review-header">
<h4>Naina Sharma</h4>
<span class="timestamp">2023-12-15</span>
</div>
<div class="review-content">
<p>I'm really impressed with the quality of this service.</p>
</div>
<div class="media">
<video controls width="320" height="240">
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</div>
</div>
</div>
<script>
function toggleDarkMode() {
const body = document.body;
const icon = document.getElementById('dark-mode-icon');
body.classList.toggle('dark-mode');
if (body.classList.contains('dark-mode')) {
icon.innerHTML = '<path d="M0 0h24v24H0V0z" fill="none"/><path d="M6.76 4.84l-1.41-1.41-1.41 1.41a.996.996 0 101.41 1.41l1.41-1.41zM1 13h3c.55 0 1-.45 1-1s-.45-1-1-1H1c-.55 0-1 .45-1 1s.45 1 1 1zm8 8c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1s-1 .45-1 1v3c0 .55.45 1 1 1zm8.24-1.41l1.41 1.41 1.41-1.41a.996.996 0 10-1.41-1.41l-1.41 1.41zm3.95-6.59h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c.55 0 1-.45 1-1s-.45-1-1-1zM12 2.79c-.39 0-.74.28-.91.67l-1 2.68c-.18.5.12 1.05.62 1.23s1.05-.12 1.23-.62l1-2.68c.18-.5-.12-1.05-.62-1.23a.996.996 0 00-.32-.05zm3.54 7.1c-.26-.31-.69-.33-1-.07a5.48 5.48 0 00-3.49-1.25 5.5 5.5 0 00-5.49 5.49c0 1.31.44 2.52 1.25 3.49-.26.31-.24.74.07 1s.74.24 1-.07a6.987 6.987 0 01-2.24-5.19c0-3.87 3.13-7 7-7 2.05 0 3.94.83 5.19 2.24.31.26.75.24 1-.07.25-.31.23-.74-.07-1z"/>';
} else {
icon.innerHTML = '<path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 3.19C8.1 3.19 5 6.3 5 10.19c0 1.69.47 3.27 1.36 4.65l-2.89 5.15c-.14.25-.1.57.1.78.16.17.39.23.61.18l4.88-1.17c.47.21.97.34 1.5.34 3.9 0 7-3.1 7-6.89 0-3.89-3.1-7-7-7zm0 12c-2.64 0-4.79-2.14-4.79-4.79s2.14-4.79 4.79-4.79 4.79 2.14 4.79 4.79-2.14 4.79-4.79 4.79z"/>';
}
}
</script>
</body>
</html>