anycoder-34049e99 / index.html
omkar861856's picture
Upload folder using huggingface_hub
dd5cf56 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Greeting Experience</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary: #667eea;
--secondary: #764ba2;
--accent: #f093fb;
--text: #2d3748;
--bg-light: #f7fafc;
--bg-dark: #1a202c;
--card-bg: rgba(255, 255, 255, 0.9);
--shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
min-height: 100vh;
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
overflow-x: hidden;
position: relative;
transition: all 0.3s ease;
}
body.dark-mode {
--text: #f7fafc;
--bg-light: #2d3748;
--card-bg: rgba(26, 32, 44, 0.9);
background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}
/* Header */
header {
position: fixed;
top: 0;
width: 100%;
padding: 1.5rem 5%;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
transition: all 0.3s ease;
}
body.dark-mode header {
background: rgba(26, 32, 44, 0.3);
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
.logo:hover {
transform: scale(1.05);
transition: transform 0.3s ease;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: white;
text-decoration: none;
transition: all 0.3s ease;
position: relative;
}
.nav-links a::after {
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 0;
height: 2px;
background: var(--accent);
transition: width 0.3s ease;
}
.nav-links a:hover::after {
width: 100%;
}
/* Theme Toggle */
.theme-toggle {
background: rgba(255, 255, 255, 0.2);
border: none;
border-radius: 50%;
width: 50px;
height: 50px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
font-size: 1.5rem;
}
.theme-toggle:hover {
transform: rotate(180deg) scale(1.1);
background: rgba(255, 255, 255, 0.3);
}
/* Main Content */
main {
padding-top: 100px;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
z-index: 10;
}
.hero-section {
text-align: center;
animation: fadeInUp 1s ease;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.greeting {
font-size: clamp(3rem, 10vw, 6rem);
font-weight: 800;
background: linear-gradient(45deg, #fff, var(--accent));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 1rem;
animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
0%, 100% { filter: hue-rotate(0deg); }
50% { filter: hue-rotate(30deg); }
}
.sub-greeting {
font-size: clamp(1.2rem, 3vw, 1.8rem);
color: rgba(255, 255, 255, 0.9);
margin-bottom: 2rem;
opacity: 0;
animation: fadeIn 1s ease 0.5s forwards;
}
@keyframes fadeIn {
to { opacity: 1; }
}
.interactive-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
width: 90%;
max-width: 1200px;
margin: 3rem auto;
padding: 0 2rem;
}
.card {
background: var(--card-bg);
border-radius: 20px;
padding: 2rem;
box-shadow: var(--shadow);
transition: all 0.3s ease;
cursor: pointer;
position: relative;
overflow: hidden;
}
.card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
transform: translateX(-100%);
transition: transform 0.6s ease;
}
.card:hover::before {
transform: translateX(100%);
}
.card:hover {
transform: translateY(-10px) scale(1.02);
box-shadow: 0 30px 40px -10px rgba(0, 0, 0, 0.2);
}
.card-icon {
font-size: 3rem;
margin-bottom: 1rem;
display: block;
}
.card-title {
font-size: 1.5rem;
font-weight: bold;
color: var(--text);
margin-bottom: 0.5rem;
}
.card-description {
color: rgba(45, 55, 72, 0.7);
line-height: 1.6;
}
body.dark-mode .card-description {
color: rgba(247, 250, 252, 0.7);
}
/* Floating Action Button */
.fab {
position: fixed;
bottom: 30px;
right: 30px;
width: 60px;
height: 60px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), var(--primary));
border: none;
color: white;
font-size: 1.5rem;
cursor: pointer;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
z-index: 999;
}
.fab:hover {
transform: scale(1.1) rotate(90deg);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}
/* Modal */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(5px);
z-index: 2000;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.3s ease;
}
.modal.active {
display: flex;
opacity: 1;
}
.modal-content {
background: var(--card-bg);
border-radius: 20px;
padding: 3rem;
max-width: 500px;
width: 90%;
transform: scale(0.8);
transition: transform 0.3s ease;
}
.modal.active .modal-content {
transform: scale(1);
}
.close-modal {
float: right;
font-size: 2rem;
cursor: pointer;
color: var(--text);
transition: transform 0.3s ease;
}
.close-modal:hover {
transform: rotate(90deg);
}
/* Particles */
.particles {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 1;
}
.particle {
position: absolute;
background: rgba(255, 255, 255, 0.5);
border-radius: 50%;
pointer-events: none;
animation: float 20s infinite linear;
}
@keyframes float {
from {
transform: translateY(100vh) rotate(0deg);
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
to {
transform: translateY(-100vh) rotate(360deg);
opacity: 0;
}
}
/* Typing Effect */
.typing-text {
font-size: 1.2rem;
color: rgba(255, 255, 255, 0.9);
margin-top: 2rem;
min-height: 30px;
}
.typing-text::after {
content: '|';
animation: blink 1s infinite;
}
@keyframes blink {
0%, 50% { opacity: 1; }
51%, 100% { opacity: 0; }
}
/* Responsive */
@media (max-width: 768px) {
.nav-links {
display: none;
}
.interactive-cards {
grid-template-columns: 1fr;
padding: 0 1rem;
}
.greeting {
font-size: 3rem;
}
}
/* Loading Animation */
.loader {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50px;
height: 50px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 1s linear infinite;
z-index: 3000;
display: none;
}
@keyframes spin {
to { transform: translate(-50%, -50%) rotate(360deg); }
}
</style>
</head>
<body>
<div class="loader" id="loader"></div>
<header>
<a href="https://huggingface.co/spaces/akhaliq/anycoder" class="logo" target="_blank">
<span>🚀</span>
<span>Built with anycoder</span>
</a>
<nav>
<ul class="nav-links">
<li><a href="#home">Home</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<button class="theme-toggle" id="themeToggle">🌙</button>
</header>
<div class="particles" id="particles"></div>
<main>
<section class="hero-section">
<h1 class="greeting">Hello, World!</h1>
<p class="sub-greeting">Welcome to an interactive experience</p>
<div class="typing-text" id="typingText"></div>
</section>
<section class="interactive-cards">
<div class="card" onclick="handleCardClick('creative')">
<span class="card-icon">🎨</span>
<h3 class="card-title">Creative Design</h3>
<p class="card-description">Modern, responsive layouts with smooth animations and micro-interactions that delight users.</p>
</div>
<div class="card" onclick="handleCardClick('performance')">
<span class="card-icon"></span>
<h3 class="card-title">Lightning Fast</h3>
<p class="card-description">Optimized performance with lazy loading, efficient animations, and minimal resource usage.</p>
</div>
<div class="card" onclick="handleCardClick('responsive')">
<span class="card-icon">📱</span>
<h3 class="card-title">Fully Responsive</h3>
<p class="card-description">Seamlessly adapts to any screen size, from mobile devices to ultra-wide desktop displays.</p>
</div>
<div class="card" onclick="handleCardClick('interactive')">
<span class="card-icon">🎮</span>
<h3 class="card-title">Interactive Elements</h3>
<p class="card-description">Engaging user interfaces with hover effects, transitions, and dynamic content updates.</p>
</div>
<div class="card" onclick="handleCardClick('modern')">
<span class="card-icon"></span>
<h3 class="card-title">Modern Tech</h3>
<p class="card-description">Built with the latest web technologies including CSS Grid, Flexbox, and ES6+ JavaScript.</p>
</div>
<div class="card" onclick="handleCardClick('accessible')">
<span class="card-icon"></span>
<h3 class="card-title">Accessibility First</h3>
<p class="card-description">Designed with semantic HTML and ARIA attributes to ensure usability for everyone.</p>
</div>
</section>
</main>
<button class="fab" onclick="toggleModal()"></button>
<div class="modal" id="modal">
<div class="modal-content">
<span class="close-modal" onclick="toggleModal()">×</span>
<h2 style="color: var(--text); margin-bottom: 1rem;">🎉 Amazing!</h2>
<p style="color: var(--text); line-height: 1.6;">
You've discovered the hidden modal! This application showcases modern web development capabilities including:
</p>
<ul style="color: var(--text); margin: 1rem 0; padding-left: 1.5rem;">
<li>Dark/Light theme toggle</li>
<li>Smooth animations and transitions</li>
<li>Responsive grid layout</li>
<li>Interactive particle effects</li>
<li>Typing animation effect</li>
<li>Modal interactions</li>
</ul>
<p style="color: var(--text); margin-top: 1rem;">
Keep exploring the cards above to see more interactive features!
</p>
</div>
</div>
<script>
// Theme Toggle
const themeToggle = document.getElementById('themeToggle');
const body = document.body;
themeToggle.addEventListener('click', () => {
body.classList.toggle('dark-mode');
themeToggle.textContent = body.classList.contains('dark-mode') ? '☀️' : '🌙';
localStorage.setItem('theme', body.classList.contains('dark-mode') ? 'dark' : 'light');
});
// Load saved theme
if (localStorage.getItem('theme') === 'dark') {
body.classList.add('dark-mode');
themeToggle.textContent = '☀️';
}
// Particle Generation
const particlesContainer = document.getElementById('particles');
function createParticle() {
const particle = document.createElement('div');
particle.className = 'particle';
particle.style.left = Math.random() * 100 + '%';
particle.style.width = Math.random() * 10 + 5 + 'px';
particle.style.height = particle.style.width;
particle.style.animationDuration = Math.random() * 20 + 10 + 's';
particle.style.animationDelay = Math.random() * 5 + 's';
particlesContainer.appendChild(particle);
setTimeout(() => {
particle.remove();
}, 30000);
}
// Create initial particles
for (let i = 0; i < 20; i++) {
setTimeout(() => createParticle(), i * 500);
}
// Continue creating particles
setInterval(createParticle, 2000);
// Typing Effect
const typingTexts = [
"Let's build something amazing together!",
"Click the cards to explore features...",
"Try the theme toggle in the header!",
"Press the ✨ button for a surprise!",
"This is pure HTML, CSS & JavaScript!"
];
let textIndex = 0;
let charIndex = 0;
let isDeleting = false;
const typingElement = document.getElementById('typingText');
function typeText() {
const currentText = typingTexts[textIndex];
if (isDeleting) {
typingElement.textContent = currentText.substring(0, charIndex - 1);
charIndex--;
} else {
typingElement.textContent = currentText.substring(0, charIndex + 1);
charIndex++;
}
if (!isDeleting && charIndex === currentText.length) {
isDeleting = true;
setTimeout(typeText, 2000);
} else if (isDeleting && charIndex === 0) {
isDeleting = false;
textIndex = (textIndex + 1) % typingTexts.length;
setTimeout(typeText, 500);
} else {
setTimeout(typeText, isDeleting ? 50 : 100);
}
}
typeText();
// Modal Functions
function toggleModal() {
const modal = document.getElementById('modal');
modal.classList.toggle('active');
}
// Card Click Handler
function handleCardClick(type) {
const messages = {
creative: "🎨 Creative design is all about thinking outside the box!",
performance: "⚡ Performance matters - every millisecond counts!",
responsive: "📱 Responsive design ensures everyone has a great experience!",
interactive: "🎮 Interactivity makes websites come alive!",
modern: "✨ Modern web technologies are powerful and exciting!",
accessible: "♿ Accessibility is not optional, it's essential!"
};
// Create a toast notification
const toast = document.createElement('div');
toast.style.cssText = `
position: fixed;
bottom: 100px;
left: 50%;
transform: translateX(-50%);
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 1rem 2rem;
border-radius: 50px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
z-index: 3000;
animation: slideUp 0.5s ease;
font-weight: 500;
`;
toast.textContent = messages[type];
document.body.appendChild(toast);
setTimeout(() => {
toast.style.animation = 'slideDown 0.5s ease';
setTimeout(() => toast.remove(), 500);
}, 3000);
}
// Add slide animations
const style = document.createElement('style');
style.textContent = `
@keyframes slideUp {
from {
transform: translateX(-50%) translateY(100px);
opacity: 0;
}
to {
transform: translateX(-50%) translateY(0);
opacity: 1;
}
}
@keyframes slideDown {
from {
transform: translateX(-50%) translateY(0);
opacity: 1;
}
to {
transform: translateX(-50%) translateY(100px);
opacity: 0;
}
}
`;
document.head.appendChild(style);
// Smooth scroll for navigation links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({ behavior: 'smooth' });
}
});
});
// Add scroll animations
window.addEventListener('scroll', () => {
const scrolled = window.pageYOffset;
const parallax = document.querySelector('.hero-section');
if (parallax) {
parallax.style.transform = `translateY(${scrolled * 0.5}px)`;
}
});
// Easter egg: Konami code
let konamiCode = [];
const konamiPattern = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a'];
document.addEventListener('keydown', (e) => {
konamiCode.push(e.key);
konamiCode = konamiCode.slice(-10);
if (konamiCode.join(',') === konamiPattern.join(',')) {
document.body.style.animation = 'rainbow 2s linear infinite';
setTimeout(() => {
document.body.style.animation = '';
}, 5000);
}
});
// Add rainbow animation for easter egg
const rainbowStyle = document.createElement('style');
rainbowStyle.textContent = `
@keyframes rainbow {
0% { filter: hue-rotate(0deg); }
100% { filter: hue-rotate(360deg); }
}
`;
document.head.appendChild(rainbowStyle);
</script>
</body>
</html>