Hey developers! π
As we approach 2026, I wanted to create something special - a New Year celebration website that not only looks stunning but also showcases the incredible technological breakthroughs of 2025. In this post, I'll walk you through how I built a premium web experience using vanilla HTML, CSS, and JavaScript with modern design principles.
π Live Demo & Source Code
- Live Site: View Demo
- GitHub Repo: github.com/Srijan-XI/wishto2026
- Author: @srijan-xi
π Table of Contents
- Project Overview
- Tech Stack
- Key Features
- Design Philosophy
- Technical Implementation
- Challenges & Solutions
- Performance Optimization
- Lessons Learned
- What's Next
π― Project Overview {#project-overview}
The project consists of two main pages:
1. Main Celebration Page (index.html)
A comprehensive New Year 2026 celebration featuring:
- Live countdown timer to 2026
- Interactive wishes system
- Resolution tracker with progress bars
- 2025 memories gallery
- Inspirational quotes carousel
- Year timeline
- Contact form with validation
- Particle effects and fireworks
2. 2025 Tech Updates Page (2025.html)
A dedicated showcase of 2025's technological innovations:
- AI & Machine Learning breakthroughs
- Quantum Computing milestones
- 5G/6G connectivity advances
- VR/AR & Metaverse evolution
- Green technology & sustainability
- Space tech, biotech, and more
π οΈ Tech Stack {#tech-stack}
I deliberately chose a vanilla approach to demonstrate that you don't always need frameworks to build amazing experiences:
Frontend:
βββ HTML5 (Semantic)
βββ CSS3 (Modern features)
β βββ CSS Grid & Flexbox
β βββ CSS Custom Properties
β βββ Glassmorphism effects
β βββ CSS Animations
β βββ Media Queries
βββ JavaScript (ES6+)
β βββ Modules
β βββ Async/Await
β βββ IntersectionObserver API
β βββ LocalStorage
βββ Google Fonts (Outfit, Playfair Display)
No frameworks. No build tools. Just pure web technologies. π¨
β¨ Key Features {#key-features}
π¨ Design Features
1. Glassmorphism Design System
The entire site uses a cohesive glassmorphism design:
.glass-card {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px) saturate(180%);
-webkit-backdrop-filter: blur(10px) saturate(180%);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 20px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
This creates that premium "frosted glass" effect that's popular in modern design.
2. Vibrant Gradient System
I created a color system based on vibrant gradients:
:root {
--gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
--gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
--gradient-gold: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}
3. Particle System
A custom particle animation system with adaptive performance:
// Adaptive particle count based on device
const particleCount = window.innerWidth < 768 ? 25 : 50;
function createParticles() {
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.className = 'particle';
// Random properties for natural movement
particle.style.left = Math.random() * 100 + '%';
particle.style.animationDuration = (Math.random() * 10 + 10) + 's';
particle.style.animationDelay = Math.random() * 5 + 's';
particlesContainer.appendChild(particle);
}
}
4. Canvas-Based Fireworks
Built a physics-based fireworks system using HTML5 Canvas:
function drawFirework(firework) {
ctx.beginPath();
ctx.arc(firework.x, firework.y, firework.radius, 0, Math.PI * 2);
ctx.fillStyle = firework.color;
ctx.fill();
// Apply gravity and air resistance
firework.vy += 0.2; // gravity
firework.vx *= 0.99; // air resistance
firework.vy *= 0.99;
firework.x += firework.vx;
firework.y += firework.vy;
}
π» Interactive Features
1. Resolution Tracker
Users can track their 2026 resolutions with visual progress:
function updateResolution(category) {
const progressBar = category.querySelector('.progress-bar');
let currentProgress = parseInt(progressBar.dataset.progress || 0);
currentProgress = Math.min(currentProgress + 10, 100);
progressBar.style.width = currentProgress + '%';
progressBar.dataset.progress = currentProgress;
if (currentProgress === 100) {
triggerConfetti(category);
}
}
2. Wishes System with XSS Protection
User-generated content with security built-in:
function sanitizeInput(input) {
// Remove script tags and dangerous content
let sanitized = input.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
// Remove event handlers
sanitized = sanitized.replace(/on\w+\s*=\s*["'][^"']*["']/gi, '');
// Encode HTML entities
return sanitized
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/'/g, ''');
}
3. Countdown Timer
Live countdown with smooth animations:
function updateCountdown() {
const now = new Date();
const newYear = new Date('2026-01-01T00:00:00');
const difference = newYear - now;
if (difference > 0) {
const days = Math.floor(difference / (1000 * 60 * 60 * 24));
const hours = Math.floor((difference / (1000 * 60 * 60)) % 24);
const minutes = Math.floor((difference / (1000 * 60)) % 60);
const seconds = Math.floor((difference / 1000) % 60);
updateWithAnimation('countdown-days', days);
updateWithAnimation('countdown-hours', hours);
updateWithAnimation('countdown-minutes', minutes);
updateWithAnimation('countdown-seconds', seconds);
}
}
π± Responsive Design
Mobile-first approach with intelligent breakpoints:
/* Mobile First */
.feature-grid {
display: grid;
grid-template-columns: 1fr;
gap: 20px;
}
/* Tablet */
@media (min-width: 768px) {
.feature-grid {
grid-template-columns: repeat(2, 1fr);
gap: 30px;
}
}
/* Desktop */
@media (min-width: 1024px) {
.feature-grid {
grid-template-columns: repeat(3, 1fr);
gap: 40px;
}
}
π¨ Design Philosophy {#design-philosophy}
Principles I Followed:
-
Premium First Impression
- Users should be WOWed immediately
- Rich animations and effects
- High-quality visual aesthetics
-
Progressive Enhancement
- Works without JavaScript
- Enhanced with animations
- Graceful degradation
-
Accessibility-First
- ARIA labels throughout
- Keyboard navigation
- Screen reader support
- Reduced motion support
-
Performance-Conscious
- Adaptive particle counts
- Debounced scroll events
- RequestAnimationFrame for animations
- CSS containment
π§ Technical Implementation {#technical-implementation}
Modular Architecture
I split the JavaScript into focused modules:
js/
βββ utils.js # Utility functions, security
βββ animations.js # Particles, fireworks, confetti
βββ countdown.js # Countdown timer, stats
βββ interactions.js # User interactions, forms
βββ script.js # Module orchestrator
Example: Utils Module
// js/utils.js
export const debounce = (func, wait) => {
let timeout;
return function executedFunction(...args) {
const later = () => {
clearTimeout(timeout);
func(...args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
};
};
export const sanitizeInput = (input) => {
// XSS protection implementation
// ...
};
export const validateEmail = (email) => {
const emailRegex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
return emailRegex.test(email);
};
Example: Main Script
// script.js
import { initAnimations } from './js/animations.js';
import { initCountdown } from './js/countdown.js';
import { initInteractions } from './js/interactions.js';
document.addEventListener('DOMContentLoaded', () => {
initAnimations();
initCountdown();
initInteractions();
});
2025 Tech Updates Page
Created a dedicated page showcasing technological breakthroughs:
<!-- Responsive content grid with image + details -->
<div class="tech-content-grid">
<div class="tech-image-container">
<img src="images/ai_advancement_2025.png"
alt="AI Advancement 2025"
class="tech-feature-img">
<div class="image-overlay"></div>
</div>
<div class="tech-details">
<h3 class="tech-category-title">Major AI Breakthroughs</h3>
<div class="tech-update-list">
<!-- Update items -->
</div>
</div>
</div>
Styling with Grid:
.tech-content-grid {
display: grid;
grid-template-columns: 1fr;
gap: 40px;
align-items: center;
}
@media (min-width: 1024px) {
.tech-content-grid {
grid-template-columns: 1fr 1fr;
gap: 60px;
}
.tech-content-grid.reverse {
direction: rtl;
}
.tech-content-grid.reverse > * {
direction: ltr;
}
}
π§ Challenges & Solutions {#challenges-solutions}
Challenge 1: ES6 Modules with file:// Protocol
Problem: ES6 modules don't work with local file protocol due to CORS.
Solution: Added fallback inline scripts for critical functions:
// Fallback for file:// protocol
<script>
function scrollToSection(sectionId) {
const element = document.getElementById(sectionId);
if (element) {
element.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
}
</script>
Challenge 2: Performance on Mobile
Problem: Heavy animations causing lag on mobile devices.
Solution: Adaptive performance based on device:
const isMobile = window.innerWidth < 768;
const particleCount = isMobile ? 25 : 50;
const fireworksIntensity = isMobile ? 0.5 : 1;
// Detect reduced motion preference
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (prefersReducedMotion) {
// Disable heavy animations
disableParticles();
disableFireworks();
}
Challenge 3: Cross-Browser Compatibility
Problem: Backdrop-filter not working in older browsers.
Solution: Progressive enhancement with fallbacks:
.glass-card {
/* Fallback for older browsers */
background: rgba(255, 255, 255, 0.1);
/* Modern browsers */
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
/* Feature detection */
@supports not (backdrop-filter: blur(10px)) {
.glass-card {
background: rgba(255, 255, 255, 0.15);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
}
Challenge 4: Security with User Input
Problem: XSS vulnerabilities with user wishes and contact form.
Solution: Multi-layer sanitization:
function sanitizeHTML(html) {
const allowedTags = ['b', 'i', 'em', 'strong', 'p', 'br'];
const div = document.createElement('div');
div.innerHTML = html;
// Remove disallowed tags
const allTags = div.querySelectorAll('*');
allTags.forEach(tag => {
if (!allowedTags.includes(tag.tagName.toLowerCase())) {
tag.replaceWith(document.createTextNode(tag.textContent));
}
});
return div.innerHTML;
}
β‘ Performance Optimization {#performance-optimization}
Techniques I Used:
1. Debounced Scroll Events
window.addEventListener('scroll', debounce(() => {
updateBackToTopButton();
updateNavbar();
}, 100));
2. RequestAnimationFrame for Smooth Animations
function animate() {
updateParticles();
updateFireworks();
requestAnimationFrame(animate);
}
requestAnimationFrame(animate);
3. CSS Containment
.particle-container {
contain: layout style paint;
}
.fireworks-canvas {
contain: strict;
}
4. Lazy Image Loading
<img src="placeholder.jpg"
data-src="actual-image.jpg"
loading="lazy"
alt="Description">
5. Preconnect to External Resources
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
Performance Metrics
After optimization:
- First Contentful Paint: < 1.5s
- Time to Interactive: < 3s
- Lighthouse Score: 95+
- Mobile Performance: Optimized for 60fps
π Lessons Learned {#lessons-learned}
1. Vanilla JS is Powerful
You don't need React for everything. Modern vanilla JavaScript with ES6+ modules provides excellent organization and performance.
2. CSS is Amazing
Modern CSS features (Grid, Flexbox, Custom Properties, Backdrop Filter) can create stunning effects without JavaScript.
3. Security First
Never trust user input. Sanitize everything before displaying or storing.
4. Performance Matters
Beautiful animations are worthless if they lag. Always test on actual devices.
5. Accessibility is Not Optional
Screen readers, keyboard navigation, and reduced motion support should be built-in from the start.
6. Documentation Saves Time
Comprehensive docs (README, CHANGELOG, HOW_TO_RUN) help future you and contributors.
π Project Statistics
π Project Structure:
βββ 2 main pages (index.html, 2025.html)
βββ 2 stylesheets (~1,200 lines CSS)
βββ 4 JavaScript modules (~2,000 lines)
βββ 5 AI-generated images (3.8 MB)
βββ 8+ documentation files
βββ 40+ tech updates documented
π» Code Metrics:
βββ HTML: ~1,400 lines
βββ CSS: ~1,200 lines
βββ JavaScript: ~2,000 lines
βββ Documentation: ~2,500 lines
π Content:
βββ 6 resolution categories
βββ 4 inspirational quotes
βββ 5 memory highlights
βββ 10+ technology categories
βββ 40+ tech innovations
π― What's Next {#whats-next}
Future enhancements I'm considering:
-
Backend Integration
- Store wishes in database
- Email notifications for contact form
- Analytics tracking
-
Interactive Timeline
- Animated tech history
- Interactive graphs with Chart.js
-
Social Features
- Share wishes on social media
- Community wishes wall
- Voting system
-
PWA Features
- Offline support
- Install prompt
- Push notifications for countdown
-
Multilingual Support
- i18n implementation
- Language switcher
π‘ Key Takeaways
If you're building a similar project, here are my recommendations:
β
Start with vanilla - Don't reach for frameworks immediately
β
Mobile-first - Design for small screens first
β
Accessibility - Build it in from the beginning
β
Performance - Test on real devices, not just DevTools
β
Security - Sanitize all user inputs
β
Documentation - Write docs as you build
β
Modular code - Split into logical modules
β
Progressive enhancement - Start with HTML, enhance with JS
π Resources
Here are the resources that helped me:
- MDN Web Docs - The ultimate web dev reference
- CSS-Tricks - Amazing CSS guides
- Can I Use - Browser compatibility checker
- Web.dev - Performance optimization guides
- WCAG Guidelines - Accessibility standards
π Conclusion
Building this New Year celebration site was an incredible learning experience. It proved that with modern web standards, you can create stunning, performant, and accessible websites without heavy frameworks.
The combination of clean HTML, powerful CSS, and modular JavaScript resulted in a project that is:
- π¨ Beautiful - Modern glassmorphism and animations
- β‘ Fast - Optimized performance metrics
- βΏ Accessible - WCAG compliant
- π Secure - XSS protection built-in
- π± Responsive - Works on all devices
- π οΈ Maintainable - Clean, modular code
π’ Let's Connect!
I'd love to hear your thoughts and see your New Year projects!
- π Portfolio: srijanxi.netlify.app
- πΌ GitHub: @Srijan-XI
- π§ Email: srijansah11@outlook.com
If you found this helpful, please:
- β Star the GitHub repo
- π¬ Leave a comment with your thoughts
- π Share with fellow developers
- π Build something awesome and tag me!
π Happy New Year 2026! π
May your code be bug-free and your deployments be smooth! π
Built with β€οΈ and β¨ by srijan-xi
Top comments (0)