Spaces:
Running
Running
Download index.html from dovydasm/anycoder-7b78287d: direct link, hf CLI and curl.
- Browser
- Download file 30.6 kB
-
https://huggingface.co/spaces/dovydasm/anycoder-7b78287d/resolve/main/index.html
- Command line
-
hf download hf://spaces/dovydasm/anycoder-7b78287d/index.html
-
curl -L -o index.html https://huggingface.co/spaces/dovydasm/anycoder-7b78287d/resolve/main/index.html
30.6 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>NewsPulse - Modern News Dashboard</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary: #2563eb; | |
| --primary-dark: #1d4ed8; | |
| --secondary: #64748b; | |
| --success: #10b981; | |
| --warning: #f59e0b; | |
| --danger: #ef4444; | |
| --dark: #1e293b; | |
| --light: #f8fafc; | |
| --gray: #94a3b8; | |
| --border: #e2e8f0; | |
| --card-bg: #ffffff; | |
| --sidebar-bg: #1e293b; | |
| --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| } | |
| body { | |
| background-color: #f1f5f9; | |
| color: var(--dark); | |
| line-height: 1.6; | |
| } | |
| .container { | |
| display: grid; | |
| grid-template-columns: 280px 1fr; | |
| min-height: 100vh; | |
| } | |
| /* Sidebar Styles */ | |
| .sidebar { | |
| background: var(--sidebar-bg); | |
| color: white; | |
| padding: 1.5rem; | |
| position: sticky; | |
| top: 0; | |
| height: 100vh; | |
| overflow-y: auto; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| margin-bottom: 2rem; | |
| padding-bottom: 1rem; | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.1); | |
| } | |
| .logo i { | |
| font-size: 1.8rem; | |
| margin-right: 0.8rem; | |
| color: var(--primary); | |
| } | |
| .logo h1 { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| } | |
| .nav-links { | |
| list-style: none; | |
| } | |
| .nav-links li { | |
| margin-bottom: 0.5rem; | |
| } | |
| .nav-links a { | |
| display: flex; | |
| align-items: center; | |
| padding: 0.8rem 1rem; | |
| color: var(--gray); | |
| text-decoration: none; | |
| border-radius: 0.5rem; | |
| transition: all 0.3s ease; | |
| } | |
| .nav-links a:hover, .nav-links a.active { | |
| background: rgba(255, 255, 255, 0.1); | |
| color: white; | |
| } | |
| .nav-links i { | |
| margin-right: 0.8rem; | |
| width: 20px; | |
| text-align: center; | |
| } | |
| .category-section { | |
| margin-top: 2rem; | |
| } | |
| .category-section h3 { | |
| font-size: 0.9rem; | |
| text-transform: uppercase; | |
| letter-spacing: 1px; | |
| color: var(--gray); | |
| margin-bottom: 1rem; | |
| } | |
| .category-tags { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 0.5rem; | |
| } | |
| .tag { | |
| background: rgba(255, 255, 255, 0.1); | |
| padding: 0.4rem 0.8rem; | |
| border-radius: 1.5rem; | |
| font-size: 0.8rem; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| } | |
| .tag:hover, .tag.active { | |
| background: var(--primary); | |
| } | |
| /* Main Content Styles */ | |
| .main-content { | |
| padding: 2rem; | |
| overflow-y: auto; | |
| } | |
| .header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-bottom: 2rem; | |
| } | |
| .search-bar { | |
| display: flex; | |
| align-items: center; | |
| background: white; | |
| border-radius: 0.5rem; | |
| padding: 0.5rem 1rem; | |
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); | |
| width: 100%; | |
| max-width: 400px; | |
| } | |
| .search-bar input { | |
| border: none; | |
| outline: none; | |
| padding: 0.5rem; | |
| width: 100%; | |
| font-size: 1rem; | |
| } | |
| .search-bar i { | |
| color: var(--secondary); | |
| } | |
| .user-actions { | |
| display: flex; | |
| align-items: center; | |
| gap: 1.5rem; | |
| } | |
| .notification-icon, .user-profile { | |
| position: relative; | |
| cursor: pointer; | |
| } | |
| .notification-icon i { | |
| font-size: 1.3rem; | |
| color: var(--secondary); | |
| } | |
| .notification-badge { | |
| position: absolute; | |
| top: -5px; | |
| right: -5px; | |
| background: var(--danger); | |
| color: white; | |
| border-radius: 50%; | |
| width: 18px; | |
| height: 18px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 0.7rem; | |
| } | |
| .user-profile img { | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| object-fit: cover; | |
| } | |
| .anycoder-link { | |
| position: absolute; | |
| top: 1rem; | |
| right: 1rem; | |
| font-size: 0.8rem; | |
| color: var(--primary); | |
| text-decoration: none; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.3rem; | |
| } | |
| .anycoder-link:hover { | |
| text-decoration: underline; | |
| } | |
| /* Dashboard Stats */ | |
| .dashboard-stats { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); | |
| gap: 1.5rem; | |
| margin-bottom: 2rem; | |
| } | |
| .stat-card { | |
| background: white; | |
| border-radius: 0.75rem; | |
| padding: 1.5rem; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); | |
| display: flex; | |
| align-items: center; | |
| transition: transform 0.3s ease; | |
| } | |
| .stat-card:hover { | |
| transform: translateY(-5px); | |
| } | |
| .stat-icon { | |
| width: 60px; | |
| height: 60px; | |
| border-radius: 0.5rem; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| margin-right: 1rem; | |
| font-size: 1.5rem; | |
| color: white; | |
| } | |
| .stat-icon.news { | |
| background: var(--primary); | |
| } | |
| .stat-icon.sources { | |
| background: var(--success); | |
| } | |
| .stat-icon.categories { | |
| background: var(--warning); | |
| } | |
| .stat-icon.trending { | |
| background: var(--danger); | |
| } | |
| .stat-info h3 { | |
| font-size: 1.8rem; | |
| margin-bottom: 0.2rem; | |
| } | |
| .stat-info p { | |
| color: var(--secondary); | |
| font-size: 0.9rem; | |
| } | |
| /* News Grid */ | |
| .section-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-bottom: 1.5rem; | |
| } | |
| .section-header h2 { | |
| font-size: 1.5rem; | |
| font-weight: 600; | |
| } | |
| .view-all { | |
| color: var(--primary); | |
| text-decoration: none; | |
| font-weight: 500; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.3rem; | |
| } | |
| .news-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); | |
| gap: 1.5rem; | |
| } | |
| .news-card { | |
| background: white; | |
| border-radius: 0.75rem; | |
| overflow: hidden; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); | |
| transition: transform 0.3s ease, box-shadow 0.3s ease; | |
| } | |
| .news-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); | |
| } | |
| .news-image { | |
| height: 180px; | |
| width: 100%; | |
| object-fit: cover; | |
| } | |
| .news-content { | |
| padding: 1.5rem; | |
| } | |
| .news-category { | |
| display: inline-block; | |
| background: var(--primary); | |
| color: white; | |
| padding: 0.3rem 0.8rem; | |
| border-radius: 1.5rem; | |
| font-size: 0.8rem; | |
| margin-bottom: 0.8rem; | |
| } | |
| .news-title { | |
| font-size: 1.1rem; | |
| font-weight: 600; | |
| margin-bottom: 0.8rem; | |
| line-height: 1.4; | |
| } | |
| .news-excerpt { | |
| color: var(--secondary); | |
| font-size: 0.9rem; | |
| margin-bottom: 1rem; | |
| display: -webkit-box; | |
| -webkit-line-clamp: 2; | |
| -webkit-box-orient: vertical; | |
| overflow: hidden; | |
| } | |
| .news-meta { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| font-size: 0.8rem; | |
| color: var(--gray); | |
| } | |
| .news-source { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.3rem; | |
| } | |
| .trending-news { | |
| margin-top: 3rem; | |
| } | |
| .trending-list { | |
| background: white; | |
| border-radius: 0.75rem; | |
| padding: 1.5rem; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); | |
| } | |
| .trending-item { | |
| display: flex; | |
| align-items: flex-start; | |
| padding: 1rem 0; | |
| border-bottom: 1px solid var(--border); | |
| } | |
| .trending-item:last-child { | |
| border-bottom: none; | |
| } | |
| .trending-number { | |
| background: var(--light); | |
| color: var(--secondary); | |
| width: 30px; | |
| height: 30px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| margin-right: 1rem; | |
| font-weight: 600; | |
| flex-shrink: 0; | |
| } | |
| .trending-item:nth-child(1) .trending-number { | |
| background: var(--danger); | |
| color: white; | |
| } | |
| .trending-item:nth-child(2) .trending-number { | |
| background: var(--warning); | |
| color: white; | |
| } | |
| .trending-item:nth-child(3) .trending-number { | |
| background: var(--success); | |
| color: white; | |
| } | |
| .trending-content h4 { | |
| font-size: 0.95rem; | |
| margin-bottom: 0.3rem; | |
| line-height: 1.4; | |
| } | |
| .trending-content p { | |
| font-size: 0.8rem; | |
| color: var(--secondary); | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 1024px) { | |
| .container { | |
| grid-template-columns: 1fr; | |
| } | |
| .sidebar { | |
| display: none; | |
| } | |
| .mobile-menu-btn { | |
| display: block; | |
| } | |
| } | |
| @media (max-width: 768px) { | |
| .dashboard-stats { | |
| grid-template-columns: 1fr 1fr; | |
| } | |
| .news-grid { | |
| grid-template-columns: 1fr; | |
| } | |
| .main-content { | |
| padding: 1rem; | |
| } | |
| } | |
| @media (max-width: 480px) { | |
| .dashboard-stats { | |
| grid-template-columns: 1fr; | |
| } | |
| .header { | |
| flex-direction: column; | |
| gap: 1rem; | |
| align-items: flex-start; | |
| } | |
| .search-bar { | |
| max-width: 100%; | |
| } | |
| } | |
| /* Mobile Menu */ | |
| .mobile-menu-btn { | |
| display: none; | |
| background: none; | |
| border: none; | |
| font-size: 1.5rem; | |
| color: var(--dark); | |
| cursor: pointer; | |
| } | |
| .mobile-sidebar { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 280px; | |
| height: 100%; | |
| background: var(--sidebar-bg); | |
| z-index: 1000; | |
| transform: translateX(-100%); | |
| transition: transform 0.3s ease; | |
| overflow-y: auto; | |
| } | |
| .mobile-sidebar.active { | |
| transform: translateX(0); | |
| } | |
| .overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: rgba(0, 0, 0, 0.5); | |
| z-index: 999; | |
| display: none; | |
| } | |
| .overlay.active { | |
| display: block; | |
| } | |
| /* Animations */ | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .news-card, .stat-card { | |
| animation: fadeIn 0.5s ease forwards; | |
| } | |
| .news-card:nth-child(2) { animation-delay: 0.1s; } | |
| .news-card:nth-child(3) { animation-delay: 0.2s; } | |
| .news-card:nth-child(4) { animation-delay: 0.3s; } | |
| .news-card:nth-child(5) { animation-delay: 0.4s; } | |
| .news-card:nth-child(6) { animation-delay: 0.5s; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <!-- Sidebar --> | |
| <aside class="sidebar"> | |
| <div class="logo"> | |
| <i class="fas fa-newspaper"></i> | |
| <h1>NewsPulse</h1> | |
| </div> | |
| <ul class="nav-links"> | |
| <li><a href="#" class="active"><i class="fas fa-home"></i> Dashboard</a></li> | |
| <li><a href="#"><i class="fas fa-fire"></i> Trending</a></li> | |
| <li><a href="#"><i class="fas fa-bookmark"></i> Saved</a></li> | |
| <li><a href="#"><i class="fas fa-history"></i> History</a></li> | |
| <li><a href="#"><i class="fas fa-cog"></i> Settings</a></li> | |
| </ul> | |
| <div class="category-section"> | |
| <h3>Categories</h3> | |
| <div class="category-tags"> | |
| <span class="tag active">All</span> | |
| <span class="tag">Politics</span> | |
| <span class="tag">Technology</span> | |
| <span class="tag">Business</span> | |
| <span class="tag">Sports</span> | |
| <span class="tag">Entertainment</span> | |
| <span class="tag">Health</span> | |
| <span class="tag">Science</span> | |
| </div> | |
| </div> | |
| <div class="category-section"> | |
| <h3>Sources</h3> | |
| <div class="category-tags"> | |
| <span class="tag">CNN</span> | |
| <span class="tag">BBC</span> | |
| <span class="tag">Reuters</span> | |
| <span class="tag">AP</span> | |
| <span class="tag">Guardian</span> | |
| <span class="tag">NY Times</span> | |
| </div> | |
| </div> | |
| </aside> | |
| <!-- Main Content --> | |
| <main class="main-content"> | |
| <div class="header"> | |
| <button class="mobile-menu-btn"> | |
| <i class="fas fa-bars"></i> | |
| </button> | |
| <div class="search-bar"> | |
| <i class="fas fa-search"></i> | |
| <input type="text" placeholder="Search for news..."> | |
| </div> | |
| <div class="user-actions"> | |
| <div class="notification-icon"> | |
| <i class="fas fa-bell"></i> | |
| <span class="notification-badge">3</span> | |
| </div> | |
| <div class="user-profile"> | |
| <img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" alt="User Profile"> | |
| </div> | |
| </div> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link"> | |
| <i class="fas fa-code"></i> Built with anycoder | |
| </a> | |
| </div> | |
| <!-- Dashboard Stats --> | |
| <div class="dashboard-stats"> | |
| <div class="stat-card"> | |
| <div class="stat-icon news"> | |
| <i class="fas fa-newspaper"></i> | |
| </div> | |
| <div class="stat-info"> | |
| <h3>1,247</h3> | |
| <p>Today's News</p> | |
| </div> | |
| </div> | |
| <div class="stat-card"> | |
| <div class="stat-icon sources"> | |
| <i class="fas fa-globe"></i> | |
| </div> | |
| <div class="stat-info"> | |
| <h3>42</h3> | |
| <p>News Sources</p> | |
| </div> | |
| </div> | |
| <div class="stat-card"> | |
| <div class="stat-icon categories"> | |
| <i class="fas fa-tags"></i> | |
| </div> | |
| <div class="stat-info"> | |
| <h3>12</h3> | |
| <p>Categories</p> | |
| </div> | |
| </div> | |
| <div class="stat-card"> | |
| <div class="stat-icon trending"> | |
| <i class="fas fa-chart-line"></i> | |
| </div> | |
| <div class="stat-info"> | |
| <h3>24</h3> | |
| <p>Trending Topics</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Top Stories --> | |
| <section class="top-stories"> | |
| <div class="section-header"> | |
| <h2>Top Stories</h2> | |
| <a href="#" class="view-all"> | |
| View All <i class="fas fa-arrow-right"></i> | |
| </a> | |
| </div> | |
| <div class="news-grid"> | |
| <div class="news-card"> | |
| <img src="https://images.unsplash.com/photo-1588681664899-f142ff2dc9b0?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="News Image" class="news-image"> | |
| <div class="news-content"> | |
| <span class="news-category">Technology</span> | |
| <h3 class="news-title">AI Breakthrough Revolutionizes Medical Diagnostics</h3> | |
| <p class="news-excerpt">Researchers have developed a new AI system that can detect early signs of diseases with 98% accuracy.</p> | |
| <div class="news-meta"> | |
| <span class="news-source"><i class="fas fa-newspaper"></i> TechNews</span> | |
| <span>2 hours ago</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="news-card"> | |
| <img src="https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="News Image" class="news-image"> | |
| <div class="news-content"> | |
| <span class="news-category">Politics</span> | |
| <h3 class="news-title">Global Summit Addresses Climate Change Policies</h3> | |
| <p class="news-excerpt">World leaders gather to discuss new climate initiatives and carbon reduction targets.</p> | |
| <div class="news-meta"> | |
| <span class="news-source"><i class="fas fa-newspaper"></i> Global Times</span> | |
| <span>4 hours ago</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="news-card"> | |
| <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="News Image" class="news-image"> | |
| <div class="news-content"> | |
| <span class="news-category">Business</span> | |
| <h3 class="news-title">Stock Markets Reach All-Time High Amid Economic Recovery</h3> | |
| <p class="news-excerpt">Major indices surge as economic indicators show strong post-pandemic recovery signals.</p> | |
| <div class="news-meta"> | |
| <span class="news-source"><i class="fas fa-newspaper"></i> Financial Post</span> | |
| <span>6 hours ago</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="news-card"> | |
| <img src="https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="News Image" class="news-image"> | |
| <div class="news-content"> | |
| <span class="news-category">Sports</span> | |
| <h3 class="news-title">Championship Finals Set New Viewership Records</h3> | |
| <p class="news-excerpt">The annual championship game attracted over 200 million viewers worldwide.</p> | |
| <div class="news-meta"> | |
| <span class="news-source"><i class="fas fa-newspaper"></i> Sports Daily</span> | |
| <span>8 hours ago</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="news-card"> | |
| <img src="https://images.unsplash.com/photo-1559757148-5c350d0d3c98?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="News Image" class="news-image"> | |
| <div class="news-content"> | |
| <span class="news-category">Entertainment</span> | |
| <h3 class="news-title">Award Show Highlights Diversity in Film Industry</h3> | |
| <p class="news-excerpt">This year's ceremony celebrated groundbreaking achievements from underrepresented groups.</p> | |
| <div class="news-meta"> | |
| <span class="news-source"><i class="fas fa-newspaper"></i> Entertainment Weekly</span> | |
| <span>10 hours ago</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="news-card"> | |
| <img src="https://images.unsplash.com/photo-1576091160399-112ba8d25d1f?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="News Image" class="news-image"> | |
| <div class="news-content"> | |
| <span class="news-category">Health</span> | |
| <h3 class="news-title">New Study Reveals Benefits of Mediterranean Diet</h3> | |
| <p class="news-excerpt">Research confirms significant health improvements for participants following the traditional diet.</p> | |
| <div class="news-meta"> | |
| <span class="news-source"><i class="fas fa-newspaper"></i> Health Digest</span> | |
| <span>12 hours ago</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Trending News --> | |
| <section class="trending-news"> | |
| <div class="section-header"> | |
| <h2>Trending Now</h2> | |
| <a href="#" class="view-all"> | |
| View All <i class="fas fa-arrow-right"></i> | |
| </a> | |
| </div> | |
| <div class="trending-list"> | |
| <div class="trending-item"> | |
| <div class="trending-number">1</div> | |
| <div class="trending-content"> | |
| <h4>Space Exploration Milestone: Mission Reaches New Planet</h4> | |
| <p>1.2M engagements • Trending in Science</p> | |
| </div> | |
| </div> | |
| <div class="trending-item"> | |
| <div class="trending-number">2</div> | |
| <div class="trending-content"> | |
| <h4>Tech Giant Announces Revolutionary Quantum Computer</h4> | |
| <p>980K engagements • Trending in Technology</p> | |
| </div> | |
| </div> | |
| <div class="trending-item"> | |
| <div class="trending-number">3</div> | |
| <div class="trending-content"> | |
| <h4>Economic Reform Bill Passes With Bipartisan Support</h4> | |
| <p>850K engagements • Trending in Politics</p> | |
| </div> | |
| </div> | |
| <div class="trending-item"> | |
| <div class="trending-number">4</div> | |
| <div class="trending-content"> | |
| <h4>Global Music Festival Breaks Attendance Records</h4> | |
| <p>720K engagements • Trending in Entertainment</p> | |
| </div> | |
| </div> | |
| <div class="trending-item"> | |
| <div class="trending-number">5</div> | |
| <div class="trending-content"> | |
| <h4>Breakthrough in Renewable Energy Storage Technology</h4> | |
| <p>650K engagements • Trending in Environment</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| </div> | |
| <!-- Mobile Sidebar --> | |
| <div class="mobile-sidebar"> | |
| <div class="sidebar"> | |
| <div class="logo"> | |
| <i class="fas fa-newspaper"></i> | |
| <h1>NewsPulse</h1> | |
| </div> | |
| <ul class="nav-links"> | |
| <li><a href="#" class="active"><i class="fas fa-home"></i> Dashboard</a></li> | |
| <li><a href="#"><i class="fas fa-fire"></i> Trending</a></li> | |
| <li><a href="#"><i class="fas fa-bookmark"></i> Saved</a></li> | |
| <li><a href="#"><i class="fas fa-history"></i> History</a></li> | |
| <li><a href="#"><i class="fas fa-cog"></i> Settings</a></li> | |
| </ul> | |
| <div class="category-section"> | |
| <h3>Categories</h3> | |
| <div class="category-tags"> | |
| <span class="tag active">All</span> | |
| <span class="tag">Politics</span> | |
| <span class="tag">Technology</span> | |
| <span class="tag">Business</span> | |
| <span class="tag">Sports</span> | |
| <span class="tag">Entertainment</span> | |
| <span class="tag">Health</span> | |
| <span class="tag">Science</span> | |
| </div> | |
| </div> | |
| <div class="category-section"> | |
| <h3>Sources</h3> | |
| <div class="category-tags"> | |
| <span class="tag">CNN</span> | |
| <span class="tag">BBC</span> | |
| <span class="tag">Reuters</span> | |
| <span class="tag">AP</span> | |
| <span class="tag">Guardian</span> | |
| <span class="tag">NY Times</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Overlay for mobile menu --> | |
| <div class="overlay"></div> | |
| <script> | |
| // Mobile menu functionality | |
| const mobileMenuBtn = document.querySelector('.mobile-menu-btn'); | |
| const mobileSidebar = document.querySelector('.mobile-sidebar'); | |
| const overlay = document.querySelector('.overlay'); | |
| mobileMenuBtn.addEventListener('click', () => { | |
| mobileSidebar.classList.add('active'); | |
| overlay.classList.add('active'); | |
| }); | |
| overlay.addEventListener('click', () => { | |
| mobileSidebar.classList.remove('active'); | |
| overlay.classList.remove('active'); | |
| }); | |
| // Category tag selection | |
| const tags = document.querySelectorAll('.tag'); | |
| tags.forEach(tag => { | |
| tag.addEventListener('click', () => { | |
| // Remove active class from all tags in the same container | |
| const parent = tag.parentElement; | |
| parent.querySelectorAll('.tag').forEach(t => { | |
| t.classList.remove('active'); | |
| }); | |
| tag.classList.add('active'); | |
| }); | |
| }); | |
| // Simulate loading animation | |
| document.addEventListener('DOMContentLoaded', () => { | |
| // Add some visual feedback for interactions | |
| const newsCards = document.querySelectorAll('.news-card'); | |
| newsCards.forEach(card => { | |
| card.addEventListener('click', () => { | |
| card.style.transform = 'scale(0.98)'; | |
| setTimeout(() => { | |
| card.style.transform = ''; | |
| }, 200); | |
| }); | |
| }); | |
| // Search functionality | |
| const searchInput = document.querySelector('.search-bar input'); | |
| searchInput.addEventListener('keyup', (e) => { | |
| if (e.key === 'Enter') { | |
| alert(`Searching for: ${searchInput.value}`); | |
| } | |
| }); | |
| // Notification icon interaction | |
| const notificationIcon = document.querySelector('.notification-icon'); | |
| notificationIcon.addEventListener('click', () => { | |
| alert('You have 3 new notifications'); | |
| }); | |
| </script> | |
| </body> | |
| </html> |