-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
514 lines (458 loc) · 27.4 KB
/
index.html
File metadata and controls
514 lines (458 loc) · 27.4 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
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
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
---
---
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Greentea OS — The Future of Open-Source Desktops</title>
<!-- SEO Meta Tags -->
{% seo title=false %}
<meta name="description" content="Greentea OS: A cutting-edge, open-source desktop operating system designed for modern hardware and seamless app compatibility. Explore the future of computing.">
<meta name="keywords" content="Greentea OS, open-source OS, desktop alternative, free operating system, modern OS, Windows alternative, new OS">
<meta property="og:title" content="Greentea OS - The Future of Open-Source Desktops">
<meta property="og:description" content="Discover Greentea OS, a powerful and user-friendly open-source operating system. Join our vibrant community and shape the future of desktop computing.">
<meta property="og:image" content="https://greenteaos.github.io/assets/android-chrome-512x512.png">
<meta property="og:url" content="https://greenteaos.github.io/">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Greentea OS - The Future of Open-Source Desktops">
<meta name="twitter:description" content="Discover Greentea OS, a powerful and user-friendly open-source operating system. Join our vibrant community and shape the future of desktop computing.">
<meta name="twitter:image" content="https://greenteaos.github.io/assets/android-chrome-512x512.png">
<meta name="google-site-verification" content="r9QR0nzVoCSoh04LhsLau403jbzC4weuqk0ypB1LD1g" />
<!-- Preload Critical Resources -->
<link rel="preload" href="https://greenteaos.github.io/assets/images/shot.jpg" as="image">
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" as="style">
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Google Fonts: Inter -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<!-- Phosphor Icons -->
<script src="https://unpkg.com/@phosphor-icons/web"></script>
<!-- Favicon -->
<link rel="icon" type="image/png" href="https://greenteaos.github.io/assets/android-chrome-512x512.png">
<style>
:root {
--bg-color: #050505;
--card-bg: #111111;
--border-color: #27272a;
--primary-text: #f4f4f5;
--secondary-text: #d1d5db;
--accent-green: #22c55e;
--accent-green-glow: rgba(34, 197, 94, 0.3);
--accent-blue: #3b82f6;
--discord-color: #5865F2;
--patreon-color: #FF424D; /* Patreon color */
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--bg-color);
color: var(--primary-text);
scroll-behavior: smooth;
}
/* Enhanced Aurora Background */
.animated-aurora {
position: absolute;
inset: 0;
background:
radial-gradient(ellipse at 70% 20%, hsla(145, 76%, 40%, 0.4) 0%, transparent 40%),
radial-gradient(ellipse at 30% 30%, hsla(210, 80%, 45%, 0.4) 0%, transparent 40%),
radial-gradient(ellipse at 80% 80%, hsla(280, 70%, 50%, 0.4) 0%, transparent 40%);
background-size: 300% 300%;
animation: aurora-animation 30s ease infinite;
pointer-events: none; /* Allow clicks to pass through */
}
@keyframes aurora-animation {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
/* Canvas for particle effects */
#particle-canvas {
position: absolute;
inset: 0;
z-index: 0; /* Behind other content but above aurora */
}
/* Hero image responsiveness and positioning */
.hero-float-container {
position: absolute;
bottom: 0;
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 5vh;
z-index: 1; /* Ensure it's above aurora/particles */
}
.hero-float {
width: 90%;
max-width: 900px;
animation: float 6s ease-in-out infinite;
transform: translateY(10%);
}
@media (min-width: 1024px) {
.hero-float {
max-width: 1100px; /* Larger max-width for desktops */
transform: translateY(20%);
}
}
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-10px); }
100% { transform: translateY(0px); }
}
/* Fade-in animations */
.fade-in-section {
opacity: 0;
transform: translateY(30px);
transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.fade-in-section.in-view {
opacity: 1;
transform: translateY(0);
}
/* Card glow effect */
.card-glow {
position: relative;
transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
xbackground-color: var(--card-bg);
border: 1px solid var(--border-color);
overflow: hidden; /* For pseudo-element glow */
}
#about {
background-image: url(bgg.jpg);
background-size: cover;
}
.card-glow:hover {
transform: translateY(-8px) scale(1.02); /* Slight scale on hover */
box-shadow: 0 0 40px 5px rgba(0,0,0,0.6);
border-color: var(--accent-green);
}
/* Add a subtle pseudo-element glow on hover */
.card-glow::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle at right, var(--accent-green-glow) 0%, transparent 70%);
opacity: 0.8;
transition: opacity 0.3s ease, background 0.3s ease-in-out;
pointer-events: none;
z-index: 0;
}
.card-glow:hover::before {
opacity: 0.8;
}
/* Pulse glow for buttons */
.pulse-glow {
animation: pulse-glow-animation 2s infinite;
}
@keyframes pulse-glow-animation {
0% { box-shadow: 0 0 15px 0px rgba(88, 101, 242, 0.4); }
50% { box-shadow: 0 0 30px 5px rgba(88, 101, 242, 0.6); }
100% { box-shadow: 0 0 15px 0px rgba(88, 101, 242, 0.4); }
}
/* Patreon button specific glow */
.patreon-glow {
animation: patreon-pulse-glow-animation 2s infinite;
}
@keyframes patreon-pulse-glow-animation {
0% { box-shadow: 0 0 15px 0px rgba(255, 66, 77, 0.4); }
50% { box-shadow: 0 0 30px 5px rgba(255, 66, 77, 0.6); }
100% { box-shadow: 0 0 15px 0px rgba(255, 66, 77, 0.4); }
}
/* Mobile menu smooth transition */
#mobile-menu {
transition: transform 0.3s ease, opacity 0.3s ease;
transform: translateY(-100%);
opacity: 0;
}
#mobile-menu.is-open {
transform: translateY(0);
opacity: 1;
}
/* Micro-interactions for buttons and links */
a, button {
transition: transform 0.2s ease, background-color 0.2s ease;
}
a:hover, button:hover {
transform: scale(1.05);
}
/* Focus styles for accessibility */
a:focus, button:focus {
outline: 2px solid var(--accent-green);
outline-offset: 2px;
}
/* Specific styles for the screenshot in About section */
.about-screenshot-container {
transition: transform 0.3s ease;
animation: float 6s ease-in-out infinite; /* Apply float animation */
}
</style>
</head>
<body class="overflow-x-hidden">
<!-- Header -->
<header class="fixed top-0 left-0 right-0 z-50 bg-gradient-to-b from-black/80 via-black/50 to-transparent backdrop-blur-lg">
<div class="container mx-auto px-6 py-4 flex justify-between items-center">
<a href="#" class="flex items-center space-x-3">
<img src="https://avatars.githubusercontent.com/u/19654552?s=200&v=4" alt="Greentea OS Project Logo" class="h-8" loading="lazy" onerror="this.src='https://placehold.co/512x512/050505/e5e7eb?text=Logo';">
<span class="text-xl font-bold text-white">Greentea OS</span>
</a>
<nav class="hidden md:flex items-center space-x-6">
<a href="https://www.youtube.com/@greenteaos.hexalang" target="_blank" rel="noopener noreferrer" class="text-gray-300 hover:text-white transition-colors flex items-center gap-2" role="link"><i class="ph-fill ph-youtube-logo"></i>YouTube</a>
<a href="https://discord.com/invite/UGZq8GB" target="_blank" rel="noopener noreferrer" class="text-gray-300 hover:text-white transition-colors flex items-center gap-2" role="link"><i class="ph-fill ph-discord-logo"></i>Discord</a>
<a href="https://github.com/greenteaos" target="_blank" rel="noopener noreferrer" class="text-gray-300 hover:text-white transition-colors flex items-center gap-2" role="link"><i class="ph-fill ph-github-logo"></i>GitHub</a>
</nav>
<a href="https://github.com/GreenteaOS/Greentea/releases" class="hidden md:block bg-green-600 hover:bg-green-500 text-white font-semibold px-5 py-2 rounded-lg transition-all duration-300 transform hover:scale-105 shadow-lg shadow-green-500/20 hover:shadow-green-500/40" role="button">
Try Now
</a>
<button id="mobile-menu-button" class="md:hidden text-white" aria-expanded="false" aria-controls="mobile-menu" aria-label="Toggle mobile menu">
<i class="ph ph-list text-2xl"></i>
</button>
</div>
<!-- Mobile Menu -->
<div id="mobile-menu" class="hidden md:hidden px-6 pt-2 pb-4 bg-black/50 backdrop-blur-lg">
<a href="https://www.youtube.com/@greenteaos.hexalang" target="_blank" rel="noopener noreferrer" class="block py-2 text-gray-300 hover:text-white" role="link">YouTube</a>
<a href="https://discord.com/invite/UGZq8GB" target="_blank" rel="noopener noreferrer" class="block py-2 text-gray-300 hover:text-white" role="link">Discord</a>
<a href="https://github.com/greenteaos" target="_blank" rel="noopener noreferrer" class="block py-2 text-gray-300 hover:text-white" role="link">GitHub</a>
<a href="#community" class="block mt-2 bg-green-600 hover:bg-green-500 text-white font-semibold text-center py-2 rounded-lg" role="button">Join Community</a>
</div>
</header>
<!-- Main Content -->
<main>
<!-- Hero Section -->
<section class="relative h-screen min-h-[600px] w-full flex flex-col justify-center items-center text-center overflow-hidden">
<div class="absolute inset-0 animated-aurora"></div>
<canvas id="particle-canvas" class="absolute inset-0 z-0"></canvas>
<div class="absolute inset-0 bg-black/60 z-5"></div>
<div class="relative z-10 px-6 mt-[-10vh]">
<div class="fade-in-section">
<span class="inline-block bg-yellow-900/50 text-yellow-300 border border-yellow-700 rounded-full px-4 py-1 text-sm font-semibold mb-6">
Note: This project is in active development and not ready for daily use
</span>
<!-- Hero Title Structure -->
<div class="flex flex-col items-center justify-center mb-6">
<img src="https://avatars.githubusercontent.com/u/19654552?s=200&v=4" alt="Greentea OS Logo" class="h-36 w-auto mb-4">
<h1 class="text-5xl md:text-6xl lg:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-white to-green-400 tracking-tighter leading-tight">
Greentea OS
</h1>
<p class="text-3xl md:text-4xl lg:text-5xl font-extrabold text-gray-300 tracking-tighter mt-2">
Open-Source Freedom for Your Desktop
</p>
</div>
<p class="max-w-3xl mx-auto text-lg text-gray-300 mb-10">
Pioneering a new path for desktop alternatives. Our project aims to provide a familiar UI, run existing apps, and make you a happy computer user.
</p>
<a href="#community" class="bg-green-600 hover:bg-green-500 text-white font-semibold px-6 py-3 rounded-lg transition-all duration-300 transform hover:scale-105 shadow-lg shadow-green-500/20 hover:shadow-green-500/40 pulse-glow" role="button">
Join the Community
</a>
</div>
</div>
</section>
<!-- About Section -->
<section id="about" class="py-16 sm:py-24 bg-black">
<div class="container mx-auto px-6 text-center">
<div class="fade-in-section">
<h2 class="text-3xl md:text-4xl font-bold text-white mb-6">About <span class="text-[var(--accent-green)]">Greentea OS</span></h2>
<p class="max-w-3xl mx-auto text-lg text-gray-300 leading-relaxed">
A warm and cozy, open-source operating system compatible with existing apps, games and drivers. The main idea is to efficiently create a compatible environment for existing software and provide the best user experience on a personal computer.
</p>
<div class="mt-10 mx-auto max-w-4xl about-screenshot-container">
<picture>
<source srcset="https://greenteaos.github.io/assets/images/shot.jpg" type="image/webp">
<img src="https://greenteaos.github.io/assets/images/shot.jpg"
loading="lazy"
onerror="this.onerror=null;this.src='https://placehold.co/1920x1080/050505/e5e7eb?text=Greentea+OS+Desktop';"
alt="Greentea OS desktop screenshot showcasing core UI elements and a dark theme"
class="rounded-2xl aspect-video object-cover w-full shadow-2xl shadow-black/50">
</picture>
</div>
<div class="mt-12 grid grid-cols-1 md:grid-cols-2 gap-6 text-left">
<div class="card-glow p-6 rounded-2xl">
<h3 class="text-xl font-bold text-white mb-4">Roadmap</h3>
<ul class="space-y-2 text-[var(--secondary-text)]">
<li class="flex items-center gap-2"><i class="ph-fill ph-check-circle text-green-500 text-xl"></i>Alpha release with core UI</li>
<li class="flex items-center gap-2"><i class="ph ph-circle text-gray-500 text-xl"></i>App compatibility beta</li>
<li class="flex items-center gap-2"><i class="ph ph-circle text-gray-500 text-xl"></i>Broad hardware support</li>
</ul>
</div>
<div class="card-glow p-6 rounded-2xl">
<h3 class="text-xl font-bold text-white mb-4">Key Features</h3>
<ul class="space-y-2 text-[var(--secondary-text)]">
<li class="flex items-center gap-2"><i class="ph-bold ph-gear-six text-blue-400 text-xl"></i>Customizable desktop environment</li>
<li class="flex items-center gap-2"><i class="ph-bold ph-gauge text-red-400 text-xl"></i>Performance without compromises</li>
<li class="flex items-center gap-2"><i class="ph-bold ph-leaf text-green-400 text-xl"></i>Lightweight and user-oriented</li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- Goals Section -->
<section id="goals" class="py-16 sm:py-24">
<div class="container mx-auto px-6">
<div class="text-center mb-16 fade-in-section">
<h2 class="text-3xl md:text-4xl font-bold text-white">Our Core Principles</h2>
<p class="text-[var(--secondary-text)] mt-4 max-w-2xl mx-auto text-lg">
Building a new OS from scratch with a clear vision for the future of computing.
</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="fade-in-section card-glow p-8 rounded-2xl"><h3 class="flex items-center gap-3 text-xl font-bold text-white mb-4"><i class="ph-bold ph-stack text-green-400 text-3xl"></i>Existing software</h3><ul class="space-y-2 text-[var(--secondary-text)]"><li>Apps you love and enjoy</li><li>Running unmodified apps</li><li>Long-term compatibility</li></ul></div>
<div class="fade-in-section card-glow p-8 rounded-2xl" style="transition-delay: 100ms;"><h3 class="flex items-center gap-3 text-xl font-bold text-white mb-4"><i class="ph-bold ph-cpu text-blue-400 text-3xl"></i>Modern hardware</h3><ul class="space-y-2 text-[var(--secondary-text)]"><li>64-bit x86 AMD & Intel CPU</li><li>Multicore and GPU-driven</li><li>USB 3.0/2.0, SATA, NVMe</li></ul></div>
<div class="fade-in-section card-glow p-8 rounded-2xl" style="transition-delay: 200ms;"><h3 class="flex items-center gap-3 text-xl font-bold text-white mb-4"><i class="ph-bold ph-shield-check text-yellow-400 text-3xl"></i>Safe by design</h3><ul class="space-y-2 text-[var(--secondary-text)]"><li>Only safe programming languages</li><li>Process isolation</li><li>Sandboxing</li></ul></div>
<div class="fade-in-section card-glow p-8 rounded-2xl" style="transition-delay: 300ms;"><h3 class="flex items-center gap-3 text-xl font-bold text-white mb-4"><i class="ph-bold ph-code text-purple-400 text-3xl"></i>Modern code</h3><ul class="space-y-2 text-[var(--secondary-text)]"><li>New code from scratch</li><li>State-of-the-art approaches</li><li>Innovative kernel design</li></ul></div>
<div class="fade-in-section card-glow p-8 rounded-2xl" style="transition-delay: 400ms;"><h3 class="flex items-center gap-3 text-xl font-bold text-white mb-4"><i class="ph-bold ph-gauge text-red-400 text-3xl"></i>Maximum performance</h3><ul class="space-y-2 text-[var(--secondary-text)]"><li>Instant single-step updates</li><li>Low memory usage</li><li>Performance-oriented features</li></ul></div>
<div class="fade-in-section card-glow p-8 rounded-2xl" style="transition-delay: 500ms;"><h3 class="flex items-center gap-3 text-xl font-bold text-white mb-4"><i class="ph-bold ph-users-three text-orange-400 text-3xl"></i>Shared vision</h3><ul class="space-y-2 text-[var(--secondary-text)]"><li>Fully open-source codebase</li><li>Community feedback shapes our path</li><li>Built by volunteers, for everyone</li></ul></div>
</div>
</div>
</section>
<!-- Community/CTA Section -->
<section id="community" class="py-16 sm:py-24 bg-black">
<div class="container mx-auto px-6 text-center">
<div class="fade-in-section">
<img src="https://raw.githubusercontent.com/GreenteaOS/.github/kawaii/profile/logo_white_leaves.png" alt="Greentea OS Logo Icon" class="h-20 mx-auto mb-6" loading="lazy" onerror="this.src='https://placehold.co/512x512/050505/e5e7eb?text=Logo';">
<h2 class="text-3xl md:text-4xl font-bold text-white">Join our Development Journey</h2>
<p class="text-[var(--secondary-text)] mt-4 max-w-2xl mx-auto mb-10 text-lg">
Show your awareness and support Greentea OS. Your feedback, contributions, and ideas are vital. Join our Discord to shape the future of this new OS.
</p>
<div class="flex flex-col sm:flex-row gap-6 justify-center">
<a href="https://discord.com/invite/UGZq8GB" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center gap-3 bg-[var(--discord-color)] hover:opacity-90 text-white font-bold py-4 px-8 rounded-lg text-lg transition-all duration-300 transform hover:scale-105 pulse-glow" role="button">
<i class="ph-fill ph-discord-logo text-2xl"></i>
<span>Join Discord Server</span>
</a>
<!-- New Patreon Button with glow -->
<a href="https://www.patreon.com/PeyTy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center justify-center gap-3 bg-[var(--patreon-color)] hover:opacity-90 text-white font-bold py-4 px-8 rounded-lg text-lg transition-all duration-300 transform hover:scale-105 patreon-glow" role="button">
<i class="ph-fill ph-patreon-logo text-2xl"></i>
<span>Become a Patron</span>
</a>
</div>
<div class="mt-10 flex flex-col sm:flex-row justify-center gap-8 text-[var(--secondary-text)] text-lg">
<div><strong>1,000+</strong> Commits</div>
<div><strong>10,000+</strong> Code Lines</div>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="bg-black border-t border-gray-900/50">
<div class="container mx-auto px-6 py-8 text-center text-gray-500 text-sm">
<p>© 2025 Greentea OS Project. All Rights Reserved. An open-source community effort.</p>
<p class="mt-2">Free desktop OS alternative. Open source desktop operating system. Alternatively Green tea OS or GreenTeaOS.</p>
</div>
</footer>
<script defer>
// --- General Website Functionality ---
// Mobile Menu Toggle
const mobileMenuButton = document.getElementById('mobile-menu-button');
const mobileMenu = document.getElementById('mobile-menu');
const header = document.querySelector('header');
mobileMenuButton.addEventListener('click', () => {
const isExpanded = mobileMenuButton.getAttribute('aria-expanded') === 'true';
mobileMenuButton.setAttribute('aria-expanded', !isExpanded);
mobileMenu.classList.toggle('hidden');
mobileMenu.classList.toggle('is-open');
});
// Close mobile menu when a link is clicked
mobileMenu.addEventListener('click', (event) => {
if (event.target.tagName === 'A') {
mobileMenu.classList.add('hidden');
mobileMenu.classList.remove('is-open');
}
});
// Smooth scroll with offset for fixed header
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', (e) => {
e.preventDefault();
const targetId = anchor.getAttribute('href');
if (targetId === '#') {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
return;
}
const target = document.querySelector(targetId);
if (target) {
const headerHeight = header ? header.offsetHeight : 80;
window.scrollTo({
top: target.offsetTop - headerHeight,
behavior: 'smooth'
});
}
});
});
// Scroll-triggered animations with IntersectionObserver
const sections = document.querySelectorAll('.fade-in-section');
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
const delay = entry.target.style.transitionDelay ? parseInt(entry.target.style.transitionDelay) : 0;
setTimeout(() => {
entry.target.classList.add('in-view');
}, delay);
observer.unobserve(entry.target);
}
});
}, {
root: null,
rootMargin: '0px',
threshold: 0.1
});
sections.forEach(section => {
observer.observe(section);
});
// --- Particle Background Effect ---
const canvas = document.getElementById('particle-canvas');
const ctx = canvas.getContext('2d');
let particles = [];
const particleCount = 100; // Increased particle count
const particleColors = ['#A8E6CF', '#DCEDC8', '#FFD3B5', '#FFAAA5', '#FF8C94', '#99EE99']; // Multi-colors
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
createParticles(); // Recreate particles on resize to avoid stretching
}
function createParticles() {
particles = [];
for (let i = 0; i < particleCount; i++) {
particles.push({
x: Math.random() * canvas.width,
y: Math.random() * canvas.height,
radius: Math.random() * 2 + 1, // Larger particles
vx: Math.random() * 0.8 - 0.4, // Slightly faster movement
vy: Math.random() * 0.8 - 0.4,
alpha: Math.random() * 0.7 + 0.3,
color: particleColors[Math.floor(Math.random() * particleColors.length)] // Random color
});
}
}
function drawParticles() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.globalCompositeOperation = 'lighter'; // For a glowing effect
particles.forEach(p => {
ctx.beginPath();
ctx.arc(p.x, p.y, p.radius, 0, Math.PI * 2, false);
ctx.fillStyle = `rgba(${parseInt(p.color.slice(1, 3), 16)}, ${parseInt(p.color.slice(3, 5), 16)}, ${parseInt(p.color.slice(5, 7), 16)}, ${p.alpha})`;
ctx.fill();
p.x += p.vx;
p.y += p.vy;
// Wrap particles around the screen
if (p.x < -p.radius) p.x = canvas.width + p.radius;
if (p.y < -p.radius) p.y = canvas.height + p.radius;
if (p.x > canvas.width + p.radius) p.x = -p.radius;
if (p.y > canvas.height + p.radius) p.y = -p.radius;
});
requestAnimationFrame(drawParticles);
}
window.addEventListener('load', () => {
resizeCanvas(); // Initial resize and particle creation
drawParticles(); // Start the animation loop
});
window.addEventListener('resize', resizeCanvas);
</script>
</body>
</html>