Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
239 lines (205 loc) · 7.38 KB
/
Copy pathindex.html
File metadata and controls
239 lines (205 loc) · 7.38 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
<!DOCTYPE html>
<html lang="en" data-bs-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Climate Wise | Advocacy</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="favicon.png">
<style>
/* Light/Dark Mode Variables */
:root {
--bg-color: #f8f9fa;
--card-bg: #ffffff;
--text-color: #333333;
--header-bg: #2e7d32;
--header-shadow: rgba(0, 0, 0, 0.2);
--leaf-color: rgba(46, 125, 50, 0.2);
}
[data-bs-theme="dark"] {
--bg-color: #121212;
--card-bg: #1e1e1e;
--text-color: #f8f9fa;
--header-bg: #1b4d1f;
--header-shadow: rgba(0, 0, 0, 0.5);
--leaf-color: rgba(76, 175, 80, 0.2);
}
body {
font-family: 'Fredoka', sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
color: var(--text-color);
background-color: var(--bg-color);
transition: 0.3s ease;
overflow-x: hidden; /* Prevents horizontal scroll from leaves */
}
/* Leaf Animation Styles */
#leaf-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: -1; /* Behind everything */
}
.leaf {
position: absolute;
top: -50px;
width: 20px;
height: 20px;
background-color: var(--leaf-color);
border-radius: 2px 15px; /* Leaf shape */
animation: fall linear forwards;
}
@keyframes fall {
0% {
transform: translateY(0) rotate(0deg);
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
transform: translateY(110vh) rotate(360deg);
opacity: 0;
}
}
header {
background: var(--header-bg);
padding: 1rem 0;
box-shadow: 0 4px 12px var(--header-shadow);
position: relative;
z-index: 10;
}
.navbar-container {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1100px;
margin: auto;
padding: 0 20px;
}
.logo img {
height: 60px;
transition: transform 0.3s;
}
.logo img:hover {
transform: scale(1.05);
}
.btn-cited {
background-color: #00d1ff !important;
color: #000 !important;
border: none;
font-weight: 600;
box-shadow: 0 4px 8px rgba(0, 209, 255, 0.4);
transition: 0.3s;
}
.btn-cited:hover {
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
transform: translateY(-2px);
opacity: 0.9;
}
.container-main {
max-width: 900px;
margin: 4rem auto;
padding: 30px;
background: var(--card-bg);
border-radius: 15px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
transition: 0.3s ease;
position: relative;
z-index: 5;
}
h1 {
color: #2e7d32;
font-weight: 600;
text-shadow: 1px 1px 0px rgba(0,0,0,0.05);
}
footer {
text-align: center;
padding: 3rem;
font-size: 0.9rem;
color: #666;
}
.btn:hover {
transform: translateY(-1px);
}
</style>
</head>
<body>
<!-- Container for falling leaves -->
<div id="leaf-container"></div>
<header>
<div class="navbar-container">
<a href="index.html" class="logo">
<img src="logo-placeholder.png" alt="Climate Wise Logo">
</a>
<div class="nav-links d-flex align-items-center">
<a href="about.html" class="btn btn-outline-light rounded-pill px-3 mx-1">About</a>
<a href="resources.html" class="btn btn-outline-light rounded-pill px-3 mx-1">Resources</a>
<a href="games.html" class="btn btn-outline-light rounded-pill px-3 mx-1">Games</a>
<a href="community.html" class="btn btn-warning rounded-pill px-3 mx-1 text-dark">Community</a>
<a href="sources.html" class="btn btn-cited rounded-pill px-3 mx-1">Works Cited</a>
<button class="btn btn-light rounded-pill px-3 mx-1" id="themeToggler">Dark</button>
</div>
</div>
</header>
<div class="container-main text-center">
<h1>Be Green, Be Clean</h1>
<p class="lead mt-3">
Are you <strong>Climate Wise?</strong> Well, most people aren't. Our goal is to inform you on how you can lower your carbon footprint!
</p>
<hr class="my-4">
<p>Click the green button below to get started!</p>
<a href="about.html" class="btn btn-success rounded-pill btn-lg px-5 mt-3">Learn how to get Climate Wise</a>
</div>
<footer>
<p>© 2026 Climate Wise Project</p>
<p>Created by Elijah Funches | METRO ACADEMIC AND CLASSICAL HS</p>
</footer>
<script>
/* Theme Toggle Logic */
const themeBtn = document.getElementById('themeToggler');
const htmlElement = document.documentElement;
themeBtn.addEventListener('click', () => {
if (htmlElement.getAttribute('data-bs-theme') === 'dark') {
htmlElement.setAttribute('data-bs-theme', 'light');
themeBtn.innerHTML = "Dark";
themeBtn.className = "btn btn-light rounded-pill px-3 mx-1";
} else {
htmlElement.setAttribute('data-bs-theme', 'dark');
themeBtn.innerHTML = "Light";
themeBtn.className = "btn btn-outline-light rounded-pill px-3 mx-1";
}
});
/* Leaf Animation Logic */
const leafContainer = document.getElementById('leaf-container');
function createLeaf() {
const leaf = document.createElement('div');
leaf.classList.add('leaf');
// Random horizontal position
leaf.style.left = Math.random() * 100 + 'vw';
// Random size variation
const size = (Math.random() * 10 + 10) + 'px';
leaf.style.width = size;
leaf.style.height = size;
// Random fall duration (5 to 10 seconds)
const duration = Math.random() * 5 + 5;
leaf.style.animationDuration = duration + 's';
leafContainer.appendChild(leaf);
// Remove leaf from DOM after animation finishes
setTimeout(() => {
leaf.remove();
}, duration * 1000);
}
// Generate a new leaf every 400ms
setInterval(createLeaf, 400);
</script>
</body>
</html>