storm-track / index.html
CosmickVisions's picture
Add 2 files
a2f3c2c verified
Raw
History Blame Contribute Delete
35.8 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>StormTrack - Weather Patterns & Trends</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.weather-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.gradient-bg {
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}
.radar-animation {
animation: pulse 4s infinite;
}
@keyframes pulse {
0% { opacity: 0.8; }
50% { opacity: 1; }
100% { opacity: 0.8; }
}
.storm-icon {
animation: shake 0.5s infinite alternate;
}
@keyframes shake {
from { transform: rotate(-5deg); }
to { transform: rotate(5deg); }
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Navigation -->
<nav class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-bolt storm-icon text-yellow-300 text-2xl"></i>
<a href="#" class="text-2xl font-bold">StormTrack</a>
</div>
<div class="hidden md:flex space-x-6">
<a href="#" class="hover:text-yellow-300">Home</a>
<a href="#" class="hover:text-yellow-300">Storm Patterns</a>
<a href="#" class="hover:text-yellow-300">National Trends</a>
<a href="#" class="hover:text-yellow-300">Alerts</a>
<a href="#" class="hover:text-yellow-300">About</a>
</div>
<div class="flex items-center space-x-4">
<button id="auth-btn" class="bg-yellow-400 hover:bg-yellow-500 text-gray-800 px-4 py-2 rounded-lg font-medium transition">
Sign In
</button>
<button class="md:hidden text-white focus:outline-none">
<i class="fas fa-bars text-xl"></i>
</button>
</div>
</div>
</nav>
<!-- Auth Modal -->
<div id="auth-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
<div class="bg-white rounded-lg shadow-xl w-full max-w-md">
<div class="flex justify-between items-center border-b p-4">
<h3 class="text-xl font-bold text-gray-800">Welcome to StormTrack</h3>
<button id="close-auth" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6">
<div class="flex mb-6 border-b">
<button id="login-tab" class="px-4 py-2 font-medium border-b-2 border-blue-500 text-blue-600">Login</button>
<button id="register-tab" class="px-4 py-2 font-medium text-gray-500">Register</button>
</div>
<!-- Login Form -->
<div id="login-form">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="login-email">Email</label>
<input type="email" id="login-email" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="login-password">Password</label>
<input type="password" id="login-password" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<button class="w-full bg-blue-500 hover:bg-blue-600 text-white py-2 rounded-lg font-medium transition mb-4">
Login
</button>
<div class="text-center text-sm text-gray-600 mb-4">or login with</div>
<div class="flex justify-center space-x-4 mb-4">
<button class="bg-red-500 hover:bg-red-600 text-white p-2 rounded-full">
<i class="fab fa-google"></i>
</button>
<button class="bg-blue-600 hover:bg-blue-700 text-white p-2 rounded-full">
<i class="fab fa-facebook-f"></i>
</button>
<button class="bg-blue-400 hover:bg-blue-500 text-white p-2 rounded-full">
<i class="fab fa-twitter"></i>
</button>
</div>
<div class="text-center text-sm text-gray-600">
<a href="#" class="text-blue-500 hover:underline">Forgot password?</a>
</div>
</div>
<!-- Register Form -->
<div id="register-form" class="hidden">
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="register-name">Full Name</label>
<input type="text" id="register-name" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="register-email">Email</label>
<input type="email" id="register-email" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="register-password">Password</label>
<input type="password" id="register-password" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="register-confirm">Confirm Password</label>
<input type="password" id="register-confirm" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<button class="w-full bg-blue-500 hover:bg-blue-600 text-white py-2 rounded-lg font-medium transition mb-4">
Create Account
</button>
<div class="text-center text-sm text-gray-600">
By registering, you agree to our <a href="#" class="text-blue-500 hover:underline">Terms</a> and <a href="#" class="text-blue-500 hover:underline">Privacy Policy</a>
</div>
</div>
</div>
</div>
</div>
<!-- Hero Section -->
<section class="gradient-bg text-white py-16">
<div class="container mx-auto px-4 flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-8 md:mb-0">
<h1 class="text-4xl md:text-5xl font-bold mb-4">Track Storm Patterns & National Weather Trends</h1>
<p class="text-xl mb-6">Stay informed with the latest meteorological insights, storm tracking, and climate pattern analysis from our expert team.</p>
<div class="flex space-x-4">
<button class="bg-yellow-400 hover:bg-yellow-500 text-gray-800 px-6 py-3 rounded-lg font-medium transition">
Explore Recent Storms
</button>
<button class="border-2 border-white hover:bg-white hover:text-gray-800 px-6 py-3 rounded-lg font-medium transition">
View National Trends
</button>
</div>
</div>
<div class="md:w-1/2 flex justify-center">
<div class="relative w-64 h-64 md:w-80 md:h-80">
<div class="absolute inset-0 bg-blue-400 rounded-full opacity-20 radar-animation"></div>
<div class="absolute inset-4 bg-blue-500 rounded-full opacity-30 radar-animation" style="animation-delay: 0.5s;"></div>
<div class="absolute inset-8 bg-blue-600 rounded-full opacity-40 radar-animation" style="animation-delay: 1s;"></div>
<div class="absolute inset-0 flex items-center justify-center">
<i class="fas fa-cloud-showers-heavy text-6xl text-white"></i>
</div>
</div>
</div>
</div>
</section>
<!-- Main Content -->
<main class="container mx-auto px-4 py-12">
<!-- Featured Articles -->
<section class="mb-16">
<div class="flex justify-between items-center mb-8">
<h2 class="text-3xl font-bold text-gray-800">Featured Storm Patterns</h2>
<a href="#" class="text-blue-500 hover:underline flex items-center">
View all <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- Article 1 -->
<div class="bg-white rounded-xl shadow-md overflow-hidden weather-card transition duration-300">
<div class="relative h-48 bg-blue-100 overflow-hidden">
<img src="https://images.unsplash.com/photo-1536514498073-50e69d39c6cf?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80"
alt="Hurricane pattern" class="w-full h-full object-cover">
<div class="absolute top-2 right-2 bg-red-500 text-white px-2 py-1 rounded text-sm font-medium">
<i class="fas fa-exclamation-triangle mr-1"></i> Severe
</div>
</div>
<div class="p-6">
<div class="flex justify-between items-center mb-2">
<span class="text-sm text-gray-500">June 15, 2023</span>
<button class="text-gray-400 hover:text-red-500">
<i class="far fa-bookmark"></i>
</button>
</div>
<h3 class="text-xl font-bold mb-2">Tracking Hurricane Elara's Path</h3>
<p class="text-gray-600 mb-4">Analysis of the unusual westward shift in Hurricane Elara's trajectory and its implications for coastal regions.</p>
<div class="flex justify-between items-center">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/32.jpg" alt="Author" class="w-8 h-8 rounded-full mr-2">
<span class="text-sm">Dr. Sarah Chen</span>
</div>
<a href="#" class="text-blue-500 hover:underline text-sm">Read More</a>
</div>
</div>
</div>
<!-- Article 2 -->
<div class="bg-white rounded-xl shadow-md overflow-hidden weather-card transition duration-300">
<div class="relative h-48 bg-blue-100 overflow-hidden">
<img src="https://images.unsplash.com/photo-1501426026826-31c667bdf23d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1476&q=80"
alt="Tornado pattern" class="w-full h-full object-cover">
<div class="absolute top-2 right-2 bg-orange-500 text-white px-2 py-1 rounded text-sm font-medium">
<i class="fas fa-wind mr-1"></i> Active
</div>
</div>
<div class="p-6">
<div class="flex justify-between items-center mb-2">
<span class="text-sm text-gray-500">June 10, 2023</span>
<button class="text-gray-400 hover:text-red-500">
<i class="far fa-bookmark"></i>
</button>
</div>
<h3 class="text-xl font-bold mb-2">Tornado Alley: Shifting Patterns</h3>
<p class="text-gray-600 mb-4">Examining the recent eastward expansion of tornado activity and what it means for Midwest communities.</p>
<div class="flex justify-between items-center">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/men/44.jpg" alt="Author" class="w-8 h-8 rounded-full mr-2">
<span class="text-sm">Prof. James Wilson</span>
</div>
<a href="#" class="text-blue-500 hover:underline text-sm">Read More</a>
</div>
</div>
</div>
<!-- Article 3 -->
<div class="bg-white rounded-xl shadow-md overflow-hidden weather-card transition duration-300">
<div class="relative h-48 bg-blue-100 overflow-hidden">
<img src="https://images.unsplash.com/photo-1605721911296-5707358a6e6b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80"
alt="Winter storm" class="w-full h-full object-cover">
<div class="absolute top-2 right-2 bg-blue-500 text-white px-2 py-1 rounded text-sm font-medium">
<i class="fas fa-snowflake mr-1"></i> Winter
</div>
</div>
<div class="p-6">
<div class="flex justify-between items-center mb-2">
<span class="text-sm text-gray-500">May 28, 2023</span>
<button class="text-gray-400 hover:text-red-500">
<i class="far fa-bookmark"></i>
</button>
</div>
<h3 class="text-xl font-bold mb-2">Unprecedented Winter Storms in Spring</h3>
<p class="text-gray-600 mb-4">Analyzing the meteorological factors behind late-season winter storms across the northern states.</p>
<div class="flex justify-between items-center">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Author" class="w-8 h-8 rounded-full mr-2">
<span class="text-sm">Dr. Maria Rodriguez</span>
</div>
<a href="#" class="text-blue-500 hover:underline text-sm">Read More</a>
</div>
</div>
</div>
</div>
</section>
<!-- National Trends Section -->
<section class="mb-16">
<div class="bg-white rounded-xl shadow-md overflow-hidden">
<div class="md:flex">
<div class="md:w-1/2 bg-gray-100 p-8 flex items-center">
<div>
<h2 class="text-3xl font-bold text-gray-800 mb-4">National Weather Trends Dashboard</h2>
<p class="text-gray-600 mb-6">Interactive tools to explore temperature anomalies, precipitation patterns, and extreme weather events across the country.</p>
<div class="flex space-x-4">
<button class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-lg font-medium transition">
Explore Dashboard
</button>
<button class="border-2 border-blue-500 text-blue-500 hover:bg-blue-50 px-6 py-2 rounded-lg font-medium transition">
Download Data
</button>
</div>
</div>
</div>
<div class="md:w-1/2 p-8 bg-gradient-to-br from-blue-50 to-indigo-50">
<h3 class="text-xl font-bold text-gray-800 mb-4">Current National Highlights</h3>
<div class="space-y-4">
<div class="flex items-start">
<div class="bg-blue-100 p-2 rounded-lg mr-4">
<i class="fas fa-temperature-high text-blue-600 text-xl"></i>
</div>
<div>
<h4 class="font-medium text-gray-800">Heat Wave Alert</h4>
<p class="text-sm text-gray-600">Southwest experiencing temperatures 10°F above average</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-green-100 p-2 rounded-lg mr-4">
<i class="fas fa-cloud-rain text-green-600 text-xl"></i>
</div>
<div>
<h4 class="font-medium text-gray-800">Drought Relief</h4>
<p class="text-sm text-gray-600">California sees 125% of average rainfall this season</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-red-100 p-2 rounded-lg mr-4">
<i class="fas fa-wind text-red-600 text-xl"></i>
</div>
<div>
<h4 class="font-medium text-gray-800">Storm Watch</h4>
<p class="text-sm text-gray-600">Increased tropical activity predicted for Gulf Coast</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Weather Tools -->
<section class="mb-16">
<h2 class="text-3xl font-bold text-gray-800 mb-8">Interactive Weather Tools</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
<div class="bg-blue-100 p-3 rounded-lg inline-block mb-4">
<i class="fas fa-map-marked-alt text-blue-600 text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-2">Live Storm Tracker</h3>
<p class="text-gray-600 mb-4">Real-time tracking of active storms with predictive path modeling.</p>
<button class="text-blue-500 hover:underline font-medium">Launch Tracker</button>
</div>
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
<div class="bg-green-100 p-3 rounded-lg inline-block mb-4">
<i class="fas fa-chart-line text-green-600 text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-2">Climate Trend Analyzer</h3>
<p class="text-gray-600 mb-4">Compare historical weather data and identify emerging patterns.</p>
<button class="text-blue-500 hover:underline font-medium">Explore Trends</button>
</div>
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition">
<div class="bg-purple-100 p-3 rounded-lg inline-block mb-4">
<i class="fas fa-bell text-purple-600 text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-2">Custom Alerts</h3>
<p class="text-gray-600 mb-4">Get personalized notifications for weather events in your area.</p>
<button class="text-blue-500 hover:underline font-medium">Set Up Alerts</button>
</div>
</div>
</section>
<!-- Expert Analysis -->
<section>
<div class="flex justify-between items-center mb-8">
<h2 class="text-3xl font-bold text-gray-800">Expert Analysis</h2>
<a href="#" class="text-blue-500 hover:underline flex items-center">
View all <i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
<div class="bg-white rounded-xl shadow-md overflow-hidden">
<div class="md:flex">
<div class="md:w-1/3 bg-gray-900 text-white p-8">
<h3 class="text-2xl font-bold mb-4">Meet Our Meteorologists</h3>
<p class="text-gray-300 mb-6">Our team of certified meteorologists and climate scientists bring you accurate, in-depth analysis of weather patterns.</p>
<button class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-lg font-medium transition">
Learn About Our Team
</button>
</div>
<div class="md:w-2/3 p-8">
<div class="flex items-start mb-6 pb-6 border-b">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Expert" class="w-16 h-16 rounded-full mr-4">
<div>
<h4 class="font-bold text-lg">Dr. Robert Langley</h4>
<p class="text-blue-500 text-sm mb-2">Severe Weather Specialist</p>
<p class="text-gray-600">"The increasing frequency of derechos in the Midwest is directly correlated with rising nighttime temperatures across the region."</p>
</div>
</div>
<div class="flex items-start">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Expert" class="w-16 h-16 rounded-full mr-4">
<div>
<h4 class="font-bold text-lg">Dr. Amina Johnson</h4>
<p class="text-blue-500 text-sm mb-2">Climate Scientist</p>
<p class="text-gray-600">"Our models show a 40% increase in the likelihood of extreme precipitation events in the Northeast over the next decade."</p>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Newsletter -->
<section class="gradient-bg text-white py-12">
<div class="container mx-auto px-4 text-center">
<h2 class="text-3xl font-bold mb-4">Stay Updated on Storm Patterns</h2>
<p class="text-xl mb-8 max-w-2xl mx-auto">Subscribe to our newsletter for weekly storm tracking updates and national weather trend analysis.</p>
<div class="flex flex-col md:flex-row justify-center max-w-xl mx-auto">
<input type="email" placeholder="Your email address" class="px-4 py-3 rounded-lg mb-2 md:mb-0 md:mr-2 w-full text-gray-800 focus:outline-none">
<button class="bg-yellow-400 hover:bg-yellow-500 text-gray-800 px-6 py-3 rounded-lg font-medium transition whitespace-nowrap">
Subscribe Now
</button>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-12">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8">
<div>
<div class="flex items-center space-x-2 mb-4">
<i class="fas fa-bolt storm-icon text-yellow-300 text-2xl"></i>
<span class="text-2xl font-bold">StormTrack</span>
</div>
<p class="text-gray-400">Providing accurate storm tracking and weather pattern analysis since 2010.</p>
</div>
<div>
<h4 class="text-lg font-bold mb-4">Quick Links</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">Home</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Storm Database</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Trends Dashboard</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Weather Alerts</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">Resources</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">Research Papers</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Weather Glossary</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">Safety Tips</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">API Documentation</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">Connect</h4>
<div class="flex space-x-4 mb-4">
<a href="#" class="bg-gray-700 hover:bg-blue-600 w-10 h-10 rounded-full flex items-center justify-center">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#" class="bg-gray-700 hover:bg-blue-400 w-10 h-10 rounded-full flex items-center justify-center">
<i class="fab fa-twitter"></i>
</a>
<a href="#" class="bg-gray-700 hover:bg-red-500 w-10 h-10 rounded-full flex items-center justify-center">
<i class="fab fa-youtube"></i>
</a>
<a href="#" class="bg-gray-700 hover:bg-blue-700 w-10 h-10 rounded-full flex items-center justify-center">
<i class="fab fa-linkedin-in"></i>
</a>
</div>
<p class="text-gray-400">support@stormtrack.org</p>
<p class="text-gray-400">1-800-555-STORMS</p>
</div>
</div>
<div class="pt-8 border-t border-gray-700 text-center text-gray-400">
<p>&copy; 2023 StormTrack. All rights reserved. | <a href="#" class="hover:text-white">Privacy Policy</a> | <a href="#" class="hover:text-white">Terms of Service</a></p>
</div>
</div>
</footer>
<!-- Admin Dashboard Button (visible when logged in) -->
<div id="admin-btn" class="fixed bottom-6 right-6 hidden">
<button class="bg-red-500 hover:bg-red-600 text-white p-4 rounded-full shadow-lg transition">
<i class="fas fa-tachometer-alt text-xl"></i>
</button>
</div>
<!-- Notification Bell -->
<div id="notification-btn" class="fixed bottom-6 left-6 hidden">
<button class="bg-blue-500 hover:bg-blue-600 text-white p-4 rounded-full shadow-lg transition relative">
<i class="fas fa-bell text-xl"></i>
<span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">3</span>
</button>
</div>
<!-- Notification Panel -->
<div id="notification-panel" class="fixed bottom-20 left-6 w-72 bg-white rounded-lg shadow-xl z-40 hidden">
<div class="p-4 border-b flex justify-between items-center">
<h3 class="font-bold">Notifications</h3>
<button class="text-gray-500 hover:text-gray-700">
<i class="fas fa-cog"></i>
</button>
</div>
<div class="max-h-80 overflow-y-auto">
<div class="p-4 border-b hover:bg-gray-50 cursor-pointer">
<div class="flex items-start">
<div class="bg-yellow-100 p-2 rounded-lg mr-3">
<i class="fas fa-exclamation-triangle text-yellow-500"></i>
</div>
<div>
<p class="text-sm font-medium">Severe Thunderstorm Watch issued for your area</p>
<p class="text-xs text-gray-500 mt-1">10 minutes ago</p>
</div>
</div>
</div>
<div class="p-4 border-b hover:bg-gray-50 cursor-pointer">
<div class="flex items-start">
<div class="bg-blue-100 p-2 rounded-lg mr-3">
<i class="fas fa-newspaper text-blue-500"></i>
</div>
<div>
<p class="text-sm font-medium">New article: "Hurricane Season Predictions 2023"</p>
<p class="text-xs text-gray-500 mt-1">2 hours ago</p>
</div>
</div>
</div>
<div class="p-4 hover:bg-gray-50 cursor-pointer">
<div class="flex items-start">
<div class="bg-green-100 p-2 rounded-lg mr-3">
<i class="fas fa-user-plus text-green-500"></i>
</div>
<div>
<p class="text-sm font-medium">Dr. Chen followed your storm tracking list</p>
<p class="text-xs text-gray-500 mt-1">1 day ago</p>
</div>
</div>
</div>
</div>
<div class="p-3 bg-gray-50 text-center">
<a href="#" class="text-blue-500 text-sm font-medium hover:underline">View All Notifications</a>
</div>
</div>
<script>
// Auth Modal Toggle
const authBtn = document.getElementById('auth-btn');
const authModal = document.getElementById('auth-modal');
const closeAuth = document.getElementById('close-auth');
const loginTab = document.getElementById('login-tab');
const registerTab = document.getElementById('register-tab');
const loginForm = document.getElementById('login-form');
const registerForm = document.getElementById('register-form');
authBtn.addEventListener('click', () => {
authModal.classList.remove('hidden');
});
closeAuth.addEventListener('click', () => {
authModal.classList.add('hidden');
});
loginTab.addEventListener('click', () => {
loginTab.classList.add('border-blue-500', 'text-blue-600');
loginTab.classList.remove('text-gray-500');
registerTab.classList.remove('border-blue-500', 'text-blue-600');
registerTab.classList.add('text-gray-500');
loginForm.classList.remove('hidden');
registerForm.classList.add('hidden');
});
registerTab.addEventListener('click', () => {
registerTab.classList.add('border-blue-500', 'text-blue-600');
registerTab.classList.remove('text-gray-500');
loginTab.classList.remove('border-blue-500', 'text-blue-600');
loginTab.classList.add('text-gray-500');
registerForm.classList.remove('hidden');
loginForm.classList.add('hidden');
});
// Simulate login (for demo purposes)
const loginSubmit = loginForm.querySelector('button');
loginSubmit.addEventListener('click', (e) => {
e.preventDefault();
const email = document.getElementById('login-email').value;
const password = document.getElementById('login-password').value;
if(email && password) {
authModal.classList.add('hidden');
authBtn.textContent = 'My Profile';
document.getElementById('admin-btn').classList.remove('hidden');
document.getElementById('notification-btn').classList.remove('hidden');
// Show welcome notification
setTimeout(() => {
alert(`Welcome back! You're now logged in to StormTrack.`);
}, 300);
}
});
// Notification Panel Toggle
const notificationBtn = document.getElementById('notification-btn');
const notificationPanel = document.getElementById('notification-panel');
notificationBtn.addEventListener('click', () => {
notificationPanel.classList.toggle('hidden');
});
// Close notification panel when clicking outside
document.addEventListener('click', (e) => {
if(!notificationBtn.contains(e.target) && !notificationPanel.contains(e.target)) {
notificationPanel.classList.add('hidden');
}
});
// Bookmark functionality
const bookmarkButtons = document.querySelectorAll('.fa-bookmark');
bookmarkButtons.forEach(button => {
button.addEventListener('click', (e) => {
e.target.classList.toggle('far');
e.target.classList.toggle('fas');
e.target.classList.toggle('text-red-500');
const articleTitle = e.target.closest('.weather-card').querySelector('h3').textContent;
if(e.target.classList.contains('fas')) {
alert(`"${articleTitle}" has been added to your bookmarks`);
} else {
alert(`"${articleTitle}" has been removed from your bookmarks`);
}
});
});
// Mobile menu toggle (placeholder - would need more implementation)
const mobileMenuBtn = document.querySelector('.md\\:hidden');
mobileMenuBtn.addEventListener('click', () => {
alert('Mobile menu would open here in a full implementation');
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=CosmickVisions/storm-track" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>