forked from Samridhi002/Aavaran
-
Notifications
You must be signed in to change notification settings - Fork 0
/
community.html
435 lines (373 loc) · 13.5 KB
/
community.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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aavaran Community</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
<style>
:root {
--primary-color: #4CAF50;
--secondary-color: #45a049;
--background-color: #f4f4f4;
--text-color: #333;
--light-text: #fff;
--border-color: #ddd;
--box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--background-color);
margin: 0;
padding: 0;
color: var(--text-color);
line-height: 1.6;
}
header {
background-color: var(--light-text);
color: var(--text-color);
padding: 0 1em;
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
box-shadow: var(--box-shadow);
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
}
.logo {
font-size: 1.5em;
font-weight: bold;
color: var(--primary-color);
}
nav {
display: flex;
align-items: center;
}
nav ul {
list-style-type: none;
padding: 3rem;
margin: 0;
display: flex;
}
nav ul li {
margin-left: 20px;
}
nav ul li a {
text-decoration: none;
color: var(--text-color);
transition: color 0.3s ease;
font-size: 0.9em;
}
nav ul li a:hover {
color: var(--primary-color);
}
.hamburger {
display: none;
font-size: 1.5em;
cursor: pointer;
}
main {
max-width: 800px;
margin: 80px auto 20px;
padding: 20px;
}
.section {
background-color: var(--light-text);
padding: 20px;
margin-bottom: 20px;
border-radius: 8px;
box-shadow: var(--box-shadow);
transition: transform 0.3s ease;
}
.section:hover {
transform: translateY(-5px);
}
h2 {
color: var(--primary-color);
margin-top: 0;
}
#eco-tip {
background-color: #e7f3e8;
border-left: 4px solid var(--primary-color);
padding: 10px;
margin-bottom: 20px;
border-radius: 0 8px 8px 0;
}
.sustainability-challenge {
background-color: #f0f8ff;
border: 1px solid #b0e0e6;
padding: 15px;
margin-bottom: 20px;
border-radius: 8px;
}
.challenge-title {
font-weight: bold;
margin-bottom: 10px;
}
#challenge-idea {
font-style: italic;
}
.resources-list {
list-style-type: none;
padding: 0;
}
.resources-list li {
margin-bottom: 10px;
}
.resources-list a {
color: var(--primary-color);
text-decoration: none;
transition: color 0.3s ease;
}
.resources-list a:hover {
color: var(--secondary-color);
}
button {
background-color: var(--primary-color);
color: var(--light-text);
border: none;
padding: 10px 20px;
cursor: pointer;
border-radius: 4px;
transition: background-color 0.3s ease;
}
button:hover {
background-color: var(--secondary-color);
}
footer {
background-color: var(--primary-color);
color: var(--light-text);
padding: 40px 0;
margin-top: 40px;
}
.footer-content {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
max-width: 1200px;
margin: 0 auto;
}
.footer-section {
margin: 10px;
flex: 1;
min-width: 200px;
}
.footer-section h3 {
margin-bottom: 15px;
font-size: 1.2em;
}
.footer-section ul {
list-style-type: none;
padding: 0;
}
.footer-section ul li {
margin-bottom: 8px;
}
.footer-section ul li a {
color: var(--light-text);
text-decoration: none;
transition: opacity 0.3s ease;
}
.footer-section ul li a:hover {
opacity: 0.8;
}
.social-icons {
display: flex;
gap: 15px;
}
.social-icons a {
color: var(--light-text);
font-size: 1.5em;
transition: opacity 0.3s ease;
}
.social-icons a:hover {
opacity: 0.8;
}
.newsletter input[type="email"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: none;
border-radius: 4px;
}
.newsletter button {
width: 100%;
padding: 10px;
background-color: var(--light-text);
color: var(--primary-color);
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.newsletter button:hover {
background-color: #e0e0e0;
}
.copyright {
text-align: center;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
.hamburger {
display: block;
}
nav ul {
display: none;
position: absolute;
top: 60px;
left: 0;
width: 100%;
background-color: var(--light-text);
box-shadow: var(--box-shadow);
flex-direction: column;
}
nav ul.show {
display: flex;
}
nav ul li {
margin: 10px 20px;
}
main {
margin-top: 80px;
}
.footer-content {
flex-direction: column;
}
.footer-section {
margin-bottom: 30px;
}
}
</style>
</head>
<body>
<header>
<div class="logo">Aavaran</div>
<nav>
<div class="hamburger" onclick="toggleMenu()">☰</div>
<ul id="menu">
<li><a href="index.html">Home</a></li>
<li><a href="product.html">Products</a></li>
<li><a href="alternatives.html">Alternatives</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="community.html">Community</a></li>
<li><a href="register.html">My Account</a></li>
</ul>
</nav>
</header>
<main>
<section id="eco-tip" class="section">
<h2>Eco Tip of the Day</h2>
<p id="tip-content"></p>
</section>
<section id="sustainability-challenge" class="section">
<h2>Weekly Sustainability Challenge</h2>
<div class="sustainability-challenge">
<div class="challenge-title">This Week's Challenge:</div>
<p id="challenge-idea"></p>
<button id="new-challenge">Get New Challenge</button>
</div>
</section>
<section id="community-spotlight" class="section">
<h2>Community Spotlight</h2>
<p>Share your sustainable living journey with us! Use #AavaranCommunity on social media to showcase your eco-friendly practices and inspire others.</p>
<p>Stay tuned for featured community stories and sustainable living tips from our growing network of conscious consumers.</p>
</section>
<section id="resources" class="section">
<h2>Sustainability Resources</h2>
<ul class="resources-list">
<li><a href="https://www.epa.gov/recycle/composting-home" target="_blank">Guide to Composting at Home (EPA)</a></li>
<li><a href="https://www.goodhousekeeping.com/home/cleaning/tips/a24885/make-at-home-cleaners/" target="_blank">DIY Natural Cleaning Products (Good Housekeeping)</a></li>
<li><a href="https://www.goingzerowaste.com/blog/the-ultimate-step-by-step-guide-to-going-zero-waste" target="_blank">How to Start a Zero-Waste Lifestyle (Going Zero Waste)</a></li>
<li><a href="https://www.nature.org/en-us/get-involved/how-to-help/carbon-footprint-calculator/" target="_blank">Understanding Carbon Footprint (The Nature Conservancy)</a></li>
<li><a href="https://www.thegoodtrade.com/features/sustainable-fashion-101" target="_blank">Sustainable Fashion: A Beginner's Guide (The Good Trade)</a></li>
</ul>
</section>
</main>
<footer>
<div class="footer-content">
<div class="footer-section">
<h3>About Aavaran</h3>
<p>Empowering sustainable living through conscious choices.</p>
</div>
<div class="footer-section">
<h3>Quick Links</h3>
<ul>
<li><a href="#">About Us</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="footer-section">
<h3>Follow Us</h3>
<div class="social-icons">
<a href="#"><i class="fab fa-facebook"></i></a>
<a href="#"><i class="fab fa-twitter"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</div>
</div>
<div class="footer-section newsletter">
<h3>Newsletter</h3>
<input type="email" placeholder="Enter your email">
<button>Subscribe</button>
</div>
</div>
<div class="copyright">
<p>© 2024 Aavaran. All rights reserved.</p>
</div>
</footer>
<script>
document.addEventListener("DOMContentLoaded", function() {
const tipContent = document.getElementById('tip-content');
const challengeIdea = document.getElementById('challenge-idea');
const newChallengeButton = document.getElementById('new-challenge');
const ecoTips = [
"Try using a reusable water bottle instead of buying plastic bottles.",
"Opt for cloth bags when shopping to reduce plastic waste.",
"Use energy-efficient LED bulbs to save electricity.",
"Start composting kitchen scraps to reduce waste and create nutrient-rich soil.",
"Choose products with minimal packaging to reduce waste.",
"Unplug electronics when not in use to save energy.",
"Use a bike or public transportation instead of driving when possible.",
"Support local farmers by shopping at farmers markets.",
"Reduce meat consumption to lower your carbon footprint.",
"Use natural light when possible to reduce electricity usage."
];
const sustainabilityChallenges = [
"Go plastic-free for a week. Avoid using any single-use plastics.",
"Reduce your shower time by 2 minutes each day for a week.",
"Eat only plant-based meals for three days this week.",
"Find three items in your home to repurpose instead of throwing away.",
"Use only reusable containers for your meals and snacks this week.",
"Walk, bike, or use public transport for all trips under 2 miles this week.",
"Conduct a home energy audit and implement three energy-saving measures.",
"Start a small herb garden in your kitchen or balcony.",
"Organize a neighborhood clean-up day.",
"Try making your own natural cleaning products this week."
];
function displayRandomTip() {
const randomIndex = Math.floor(Math.random() * ecoTips.length);
tipContent.textContent = ecoTips[randomIndex];
}
function displayRandomChallenge() {
const randomIndex = Math.floor(Math.random() * sustainabilityChallenges.length);
challengeIdea.textContent = sustainabilityChallenges[randomIndex];
}
displayRandomTip();
displayRandomChallenge();
newChallengeButton.addEventListener('click', displayRandomChallenge);
// Change eco tip daily
setInterval(displayRandomTip, 24 * 60 * 60 * 1000);
});
function toggleMenu() {
const menu = document.getElementById('menu');
menu.classList.toggle('show');
}
</script>
</body>
</html>