Add 3 files
Browse files- README.md +7 -5
- index.html +652 -19
- prompts.txt +5 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: autonews
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,652 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>TechPulse - Real-time Technology News Aggregator</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
theme: {
|
| 12 |
+
extend: {
|
| 13 |
+
colors: {
|
| 14 |
+
techDark: '#1e293b',
|
| 15 |
+
techBlue: '#3b82f6',
|
| 16 |
+
techGreen: '#10b981',
|
| 17 |
+
techRed: '#ef4444',
|
| 18 |
+
techPurple: '#8b5cf6',
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
</script>
|
| 24 |
+
<style>
|
| 25 |
+
.news-card:hover {
|
| 26 |
+
transform: translateY(-5px);
|
| 27 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
|
| 28 |
+
}
|
| 29 |
+
.tech-gradient-bg {
|
| 30 |
+
background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
|
| 31 |
+
}
|
| 32 |
+
.pulse {
|
| 33 |
+
animation: pulse 2s infinite;
|
| 34 |
+
}
|
| 35 |
+
@keyframes pulse {
|
| 36 |
+
0% { opacity: 1; }
|
| 37 |
+
50% { opacity: 0.5; }
|
| 38 |
+
100% { opacity: 1; }
|
| 39 |
+
}
|
| 40 |
+
.marquee {
|
| 41 |
+
white-space: nowrap;
|
| 42 |
+
overflow: hidden;
|
| 43 |
+
box-sizing: border-box;
|
| 44 |
+
}
|
| 45 |
+
.marquee span {
|
| 46 |
+
display: inline-block;
|
| 47 |
+
padding-left: 100%;
|
| 48 |
+
animation: marquee 20s linear infinite;
|
| 49 |
+
}
|
| 50 |
+
@keyframes marquee {
|
| 51 |
+
0% { transform: translate(0, 0); }
|
| 52 |
+
100% { transform: translate(-100%, 0); }
|
| 53 |
+
}
|
| 54 |
+
</style>
|
| 55 |
+
</head>
|
| 56 |
+
<body class="bg-gray-100 text-gray-900">
|
| 57 |
+
<!-- Header -->
|
| 58 |
+
<header class="tech-gradient-bg text-white shadow-lg">
|
| 59 |
+
<div class="container mx-auto px-4 py-6">
|
| 60 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
| 61 |
+
<div class="flex items-center mb-4 md:mb-0">
|
| 62 |
+
<i class="fas fa-microchip text-3xl text-techPurple mr-3"></i>
|
| 63 |
+
<h1 class="text-2xl font-bold">Tech<span class="text-techBlue">Pulse</span></h1>
|
| 64 |
+
</div>
|
| 65 |
+
<div class="relative w-full md:w-1/3">
|
| 66 |
+
<input type="text" placeholder="Search tech news..."
|
| 67 |
+
class="w-full px-4 py-2 rounded-full bg-gray-800 text-white focus:outline-none focus:ring-2 focus:ring-techBlue">
|
| 68 |
+
<button class="absolute right-3 top-2 text-gray-400 hover:text-white">
|
| 69 |
+
<i class="fas fa-search"></i>
|
| 70 |
+
</button>
|
| 71 |
+
</div>
|
| 72 |
+
<div class="hidden md:flex space-x-4 mt-4 md:mt-0">
|
| 73 |
+
<button class="px-4 py-2 rounded-full bg-techBlue hover:bg-blue-600 transition">Sign In</button>
|
| 74 |
+
<button class="px-4 py-2 rounded-full bg-techPurple hover:bg-purple-600 transition">Register</button>
|
| 75 |
+
</div>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
</header>
|
| 79 |
+
|
| 80 |
+
<!-- Tech Ticker -->
|
| 81 |
+
<div class="bg-gray-800 text-white py-2 px-4 overflow-hidden">
|
| 82 |
+
<div class="marquee">
|
| 83 |
+
<span id="tech-ticker" class="text-sm">
|
| 84 |
+
Loading technology news headlines...
|
| 85 |
+
</span>
|
| 86 |
+
</div>
|
| 87 |
+
</div>
|
| 88 |
+
|
| 89 |
+
<!-- Main Content -->
|
| 90 |
+
<main class="container mx-auto px-4 py-8">
|
| 91 |
+
<div class="flex flex-col lg:flex-row gap-8">
|
| 92 |
+
<!-- Left Column - News Feed -->
|
| 93 |
+
<div class="w-full lg:w-2/3">
|
| 94 |
+
<div class="flex justify-between items-center mb-6">
|
| 95 |
+
<h2 class="text-2xl font-bold text-techDark">Latest Tech News</h2>
|
| 96 |
+
<div class="flex space-x-2">
|
| 97 |
+
<button id="refresh-btn" class="px-3 py-1 bg-techBlue text-white rounded hover:bg-blue-600 transition">
|
| 98 |
+
<i class="fas fa-sync-alt mr-1"></i> Refresh
|
| 99 |
+
</button>
|
| 100 |
+
<select id="news-category" class="px-3 py-1 bg-gray-200 rounded focus:outline-none">
|
| 101 |
+
<option value="all">All Categories</option>
|
| 102 |
+
<option value="technology">Technology</option>
|
| 103 |
+
<option value="energy">Energy</option>
|
| 104 |
+
<option value="communication">Communication Services</option>
|
| 105 |
+
<option value="financial">Financial</option>
|
| 106 |
+
<option value="healthcare">Healthcare</option>
|
| 107 |
+
<option value="industrial">Industrial</option>
|
| 108 |
+
<option value="real_estate">Real Estate</option>
|
| 109 |
+
<option value="utilities">Utilities</option>
|
| 110 |
+
</select>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
|
| 114 |
+
<!-- News Loading Skeleton -->
|
| 115 |
+
<div id="loading-skeleton" class="space-y-6">
|
| 116 |
+
<div class="bg-white rounded-lg shadow-md p-6 animate-pulse">
|
| 117 |
+
<div class="h-4 bg-gray-300 rounded w-3/4 mb-4"></div>
|
| 118 |
+
<div class="h-3 bg-gray-200 rounded w-full mb-2"></div>
|
| 119 |
+
<div class="h-3 bg-gray-200 rounded w-5/6 mb-2"></div>
|
| 120 |
+
<div class="h-3 bg-gray-200 rounded w-4/6 mb-4"></div>
|
| 121 |
+
<div class="h-2 bg-gray-200 rounded w-1/4"></div>
|
| 122 |
+
</div>
|
| 123 |
+
<div class="bg-white rounded-lg shadow-md p-6 animate-pulse">
|
| 124 |
+
<div class="h-4 bg-gray-300 rounded w-3/4 mb-4"></div>
|
| 125 |
+
<div class="h-3 bg-gray-200 rounded w-full mb-2"></div>
|
| 126 |
+
<div class="h-3 bg-gray-200 rounded w-5/6 mb-2"></div>
|
| 127 |
+
<div class="h-3 bg-gray-200 rounded w-4/6 mb-4"></div>
|
| 128 |
+
<div class="h-2 bg-gray-200 rounded w-1/4"></div>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<!-- News Container -->
|
| 133 |
+
<div id="news-container" class="space-y-6 hidden">
|
| 134 |
+
<!-- News cards will be inserted here by JavaScript -->
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
<div class="mt-8 flex justify-center">
|
| 138 |
+
<button id="load-more" class="px-6 py-2 bg-techPurple text-white rounded-full hover:bg-purple-600 transition">
|
| 139 |
+
Load More News
|
| 140 |
+
</button>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
|
| 144 |
+
<!-- Right Column - Trending & Companies -->
|
| 145 |
+
<div class="w-full lg:w-1/3">
|
| 146 |
+
<!-- Trending Topics -->
|
| 147 |
+
<div class="bg-white rounded-lg shadow-md p-6 mb-6">
|
| 148 |
+
<h3 class="text-xl font-bold text-techDark mb-4">Trending Topics</h3>
|
| 149 |
+
<div class="space-y-4" id="trending-topics">
|
| 150 |
+
<div class="flex justify-between items-center animate-pulse">
|
| 151 |
+
<div class="flex items-center">
|
| 152 |
+
<div class="w-8 h-8 bg-gray-300 rounded-full mr-2"></div>
|
| 153 |
+
<div class="h-4 bg-gray-200 rounded w-16"></div>
|
| 154 |
+
</div>
|
| 155 |
+
<div class="text-right">
|
| 156 |
+
<div class="h-4 bg-gray-200 rounded w-12"></div>
|
| 157 |
+
</div>
|
| 158 |
+
</div>
|
| 159 |
+
<div class="flex justify-between items-center animate-pulse">
|
| 160 |
+
<div class="flex items-center">
|
| 161 |
+
<div class="w-8 h-8 bg-gray-300 rounded-full mr-2"></div>
|
| 162 |
+
<div class="h-4 bg-gray-200 rounded w-16"></div>
|
| 163 |
+
</div>
|
| 164 |
+
<div class="text-right">
|
| 165 |
+
<div class="h-4 bg-gray-200 rounded w-12"></div>
|
| 166 |
+
</div>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<!-- Tech Companies -->
|
| 172 |
+
<div class="bg-white rounded-lg shadow-md p-6 mb-6">
|
| 173 |
+
<h3 class="text-xl font-bold text-techDark mb-4">Tech Giants</h3>
|
| 174 |
+
<div class="grid grid-cols-2 gap-4" id="tech-companies">
|
| 175 |
+
<div class="flex items-center p-3 bg-gray-50 rounded-lg animate-pulse">
|
| 176 |
+
<div class="w-10 h-10 bg-gray-300 rounded-full mr-3"></div>
|
| 177 |
+
<div class="h-4 bg-gray-200 rounded w-16"></div>
|
| 178 |
+
</div>
|
| 179 |
+
<div class="flex items-center p-3 bg-gray-50 rounded-lg animate-pulse">
|
| 180 |
+
<div class="w-10 h-10 bg-gray-300 rounded-full mr-3"></div>
|
| 181 |
+
<div class="h-4 bg-gray-200 rounded w-16"></div>
|
| 182 |
+
</div>
|
| 183 |
+
<div class="flex items-center p-3 bg-gray-50 rounded-lg animate-pulse">
|
| 184 |
+
<div class="w-10 h-10 bg-gray-300 rounded-full mr-3"></div>
|
| 185 |
+
<div class="h-4 bg-gray-200 rounded w-16"></div>
|
| 186 |
+
</div>
|
| 187 |
+
<div class="flex items-center p-3 bg-gray-50 rounded-lg animate-pulse">
|
| 188 |
+
<div class="w-10 h-10 bg-gray-300 rounded-full mr-3"></div>
|
| 189 |
+
<div class="h-4 bg-gray-200 rounded w-16"></div>
|
| 190 |
+
</div>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
|
| 194 |
+
<!-- Newsletter -->
|
| 195 |
+
<div class="bg-techPurple text-white rounded-lg shadow-md p-6">
|
| 196 |
+
<h3 class="text-xl font-bold mb-2">Stay Updated</h3>
|
| 197 |
+
<p class="mb-4 opacity-90">Get the latest tech news delivered to your inbox daily.</p>
|
| 198 |
+
<form class="space-y-3">
|
| 199 |
+
<input type="email" placeholder="Your email address"
|
| 200 |
+
class="w-full px-4 py-2 rounded bg-purple-700 text-white placeholder-purple-300 focus:outline-none focus:ring-2 focus:ring-white">
|
| 201 |
+
<button type="submit" class="w-full px-4 py-2 bg-white text-techPurple rounded font-medium hover:bg-gray-100 transition">
|
| 202 |
+
Subscribe
|
| 203 |
+
</button>
|
| 204 |
+
</form>
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
</div>
|
| 208 |
+
</main>
|
| 209 |
+
|
| 210 |
+
<!-- Footer -->
|
| 211 |
+
<footer class="tech-gradient-bg text-white py-8">
|
| 212 |
+
<div class="container mx-auto px-4">
|
| 213 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
| 214 |
+
<div>
|
| 215 |
+
<h4 class="text-lg font-bold mb-4">TechPulse</h4>
|
| 216 |
+
<p class="text-gray-300">Your premier source for real-time technology news and industry insights.</p>
|
| 217 |
+
</div>
|
| 218 |
+
<div>
|
| 219 |
+
<h4 class="text-lg font-bold mb-4">Quick Links</h4>
|
| 220 |
+
<ul class="space-y-2">
|
| 221 |
+
<li><a href="#" class="text-gray-300 hover:text-white transition">Home</a></li>
|
| 222 |
+
<li><a href="#" class="text-gray-300 hover:text-white transition">News</a></li>
|
| 223 |
+
<li><a href="#" class="text-gray-300 hover:text-white transition">Trending</li>
|
| 224 |
+
<li><a href="#" class="text-gray-300 hover:text-white transition">About Us</a></li>
|
| 225 |
+
</ul>
|
| 226 |
+
</div>
|
| 227 |
+
<div>
|
| 228 |
+
<h4 class="text-lg font-bold mb-4">Resources</h4>
|
| 229 |
+
<ul class="space-y-2">
|
| 230 |
+
<li><a href="#" class="text-gray-300 hover:text-white transition">API</a></li>
|
| 231 |
+
<li><a href="#" class="text-gray-300 hover:text-white transition">Developer Tools</a></li>
|
| 232 |
+
<li><a href="#" class="text-gray-300 hover:text-white transition">Research</a></li>
|
| 233 |
+
<li><a href="#" class="text-gray-300 hover:text-white transition">Glossary</a></li>
|
| 234 |
+
</ul>
|
| 235 |
+
</div>
|
| 236 |
+
<div>
|
| 237 |
+
<h4 class="text-lg font-bold mb-4">Connect</h4>
|
| 238 |
+
<div class="flex space-x-4 mb-4">
|
| 239 |
+
<a href="#" class="text-gray-300 hover:text-white transition"><i class="fab fa-twitter text-xl"></i></a>
|
| 240 |
+
<a href="#" class="text-gray-300 hover:text-white transition"><i class="fab fa-linkedin text-xl"></i></a>
|
| 241 |
+
<a href="#" class="text-gray-300 hover:text-white transition"><i class="fab fa-github text-xl"></i></a>
|
| 242 |
+
<a href="#" class="text-gray-300 hover:text-white transition"><i class="fab fa-youtube text-xl"></i></a>
|
| 243 |
+
</div>
|
| 244 |
+
<p class="text-gray-300 text-sm">© 2023 TechPulse. All rights reserved.</p>
|
| 245 |
+
</div>
|
| 246 |
+
</div>
|
| 247 |
+
</div>
|
| 248 |
+
</footer>
|
| 249 |
+
|
| 250 |
+
<script>
|
| 251 |
+
// API Configuration
|
| 252 |
+
const NEWSAPI_API_KEY = 'f764fe522436442d9bdafbae241d7b63';
|
| 253 |
+
const MARKETAUX_API_TOKEN = 'x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq';
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
// API endpoints for each category
|
| 257 |
+
const API_ENDPOINTS = {
|
| 258 |
+
all: [
|
| 259 |
+
'https://api.marketaux.com/v1/news/all?industries=Technology&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN,
|
| 260 |
+
'https://newsapi.org/v2/everything?q=bitcoin&from=2025-04-23&sortBy=publishedAt&apiKey=' + NEWSAPI_API_KEY,
|
| 261 |
+
'https://newsapi.org/v2/everything?q=apple&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=' + NEWSAPI_API_KEY,
|
| 262 |
+
'https://newsapi.org/v2/top-headlines?sources=techcrunch&apiKey=' + NEWSAPI_API_KEY
|
| 263 |
+
],
|
| 264 |
+
technology: [
|
| 265 |
+
'https://newsapi.org/v2/everything?q=technology&from=2025-04-23&sortBy=publishedAt&apiKey=' + NEWSAPI_API_KEY,
|
| 266 |
+
'https://api.marketaux.com/v1/news/all?industries=Technology&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN,
|
| 267 |
+
'https://newsapi.org/v2/everything?q=bitcoin&from=2025-04-23&sortBy=publishedAt&apiKey=' + NEWSAPI_API_KEY,
|
| 268 |
+
'https://newsapi.org/v2/everything?q=apple&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=' + NEWSAPI_API_KEY,
|
| 269 |
+
'https://newsapi.org/v2/top-headlines?sources=techcrunch&apiKey=' + NEWSAPI_API_KEY
|
| 270 |
+
],
|
| 271 |
+
energy: [
|
| 272 |
+
'https://newsapi.org/v2/everything?q=wind+solar&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=' + NEWSAPI_API_KEY,
|
| 273 |
+
'https://api.marketaux.com/v1/news/all?industries=Energy&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN,
|
| 274 |
+
'https://newsapi.org/v2/everything?q=energy&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=' + NEWSAPI_API_KEY,
|
| 275 |
+
'https://newsapi.org/v2/everything?q=solar&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=' + NEWSAPI_API_KEY
|
| 276 |
+
],
|
| 277 |
+
communication: [
|
| 278 |
+
'https://api.marketaux.com/v1/news/all?industries=Communication Services&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN,
|
| 279 |
+
'https://newsapi.org/v2/everything?q=verizonORsprintORt-mobileORmetroOR5gORwireless&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=' + NEWSAPI_API_KEY
|
| 280 |
+
],
|
| 281 |
+
financial: [
|
| 282 |
+
'https://api.marketaux.com/v1/news/all?industries=Financial&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN
|
| 283 |
+
],
|
| 284 |
+
healthcare: [
|
| 285 |
+
'https://api.marketaux.com/v1/news/all?industries=Healthcare&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN
|
| 286 |
+
],
|
| 287 |
+
industrial: [
|
| 288 |
+
'https://api.marketaux.com/v1/news/all?industries=Industrials&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN
|
| 289 |
+
],
|
| 290 |
+
real_estate: [
|
| 291 |
+
'https://api.marketaux.com/v1/news/all?industries=Real Estate&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN
|
| 292 |
+
],
|
| 293 |
+
utilities: [
|
| 294 |
+
'https://api.marketaux.com/v1/news/all?industries=Utilities&filter_entities=true&limit=10&api_token=' + MARKETAUX_API_TOKEN
|
| 295 |
+
]
|
| 296 |
+
};
|
| 297 |
+
|
| 298 |
+
// State management
|
| 299 |
+
let currentNewsPage = 1;
|
| 300 |
+
let selectedCategory = 'all';
|
| 301 |
+
|
| 302 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 303 |
+
// Initial data load
|
| 304 |
+
loadAllData();
|
| 305 |
+
|
| 306 |
+
// Event listeners
|
| 307 |
+
document.getElementById('refresh-btn').addEventListener('click', refreshAllData);
|
| 308 |
+
document.getElementById('load-more').addEventListener('click', loadMoreNews);
|
| 309 |
+
document.getElementById('news-category').addEventListener('change', function(e) {
|
| 310 |
+
selectedCategory = e.target.value;
|
| 311 |
+
refreshNews();
|
| 312 |
+
});
|
| 313 |
+
});
|
| 314 |
+
|
| 315 |
+
async function loadAllData() {
|
| 316 |
+
try {
|
| 317 |
+
await Promise.all([
|
| 318 |
+
fetchNews(),
|
| 319 |
+
fetchTrendingTopics(),
|
| 320 |
+
loadTechCompanies()
|
| 321 |
+
]);
|
| 322 |
+
} catch (error) {
|
| 323 |
+
console.error('Error loading data:', error);
|
| 324 |
+
showError('Failed to load data. Please try again later.');
|
| 325 |
+
}
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
async function refreshAllData() {
|
| 329 |
+
// Show loading states
|
| 330 |
+
document.getElementById('loading-skeleton').classList.remove('hidden');
|
| 331 |
+
document.getElementById('news-container').classList.add('hidden');
|
| 332 |
+
document.getElementById('tech-ticker').textContent = 'Refreshing data...';
|
| 333 |
+
|
| 334 |
+
// Reset news page
|
| 335 |
+
currentNewsPage = 1;
|
| 336 |
+
|
| 337 |
+
try {
|
| 338 |
+
await Promise.all([
|
| 339 |
+
fetchNews(true), // true indicates refresh
|
| 340 |
+
fetchTrendingTopics(),
|
| 341 |
+
loadTechCompanies()
|
| 342 |
+
]);
|
| 343 |
+
} catch (error) {
|
| 344 |
+
console.error('Error refreshing data:', error);
|
| 345 |
+
showError('Failed to refresh data. Please try again later.');
|
| 346 |
+
}
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
async function loadMoreNews() {
|
| 350 |
+
const btn = document.getElementById('load-more');
|
| 351 |
+
const originalText = btn.innerHTML;
|
| 352 |
+
btn.innerHTML = '<i class="fas fa-spinner fa-spin mr-1"></i> Loading...';
|
| 353 |
+
btn.disabled = true;
|
| 354 |
+
|
| 355 |
+
currentNewsPage++;
|
| 356 |
+
|
| 357 |
+
try {
|
| 358 |
+
await fetchNews(false, true); // false = not refresh, true = append
|
| 359 |
+
} catch (error) {
|
| 360 |
+
console.error('Error loading more news:', error);
|
| 361 |
+
showError('Failed to load more news. Please try again later.');
|
| 362 |
+
currentNewsPage--; // Revert page increment on failure
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
btn.innerHTML = originalText;
|
| 366 |
+
btn.disabled = false;
|
| 367 |
+
}
|
| 368 |
+
|
| 369 |
+
async function refreshNews() {
|
| 370 |
+
document.getElementById('loading-skeleton').classList.remove('hidden');
|
| 371 |
+
document.getElementById('news-container').classList.add('hidden');
|
| 372 |
+
document.getElementById('news-container').innerHTML = '';
|
| 373 |
+
|
| 374 |
+
currentNewsPage = 1;
|
| 375 |
+
|
| 376 |
+
try {
|
| 377 |
+
await fetchNews(true);
|
| 378 |
+
} catch (error) {
|
| 379 |
+
console.error('Error refreshing news:', error);
|
| 380 |
+
showError('Failed to refresh news. Please try again later.');
|
| 381 |
+
}
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
// API Fetch Functions
|
| 385 |
+
async function fetchNews(refresh = false, append = false) {
|
| 386 |
+
try {
|
| 387 |
+
const endpoints = API_ENDPOINTS[selectedCategory];
|
| 388 |
+
let allArticles = [];
|
| 389 |
+
|
| 390 |
+
// Fetch from all endpoints for the selected category
|
| 391 |
+
for (const endpoint of endpoints) {
|
| 392 |
+
let url = endpoint;
|
| 393 |
+
|
| 394 |
+
// Add pagination for Marketaux API
|
| 395 |
+
if (url.includes('marketaux.com')) {
|
| 396 |
+
url += `&page=${currentNewsPage}`;
|
| 397 |
+
|
| 398 |
+
// Use current date for published_after
|
| 399 |
+
const now = new Date();
|
| 400 |
+
const oneDayAgo = new Date(now.getTime() - (24 * 60 * 60 * 1000));
|
| 401 |
+
const isoString = oneDayAgo.toISOString().split('.')[0];
|
| 402 |
+
url += `&published_after=${isoString}`;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
const response = await fetch(url);
|
| 406 |
+
const data = await response.json();
|
| 407 |
+
|
| 408 |
+
if (data) {
|
| 409 |
+
// Handle different API response formats
|
| 410 |
+
if (data.data) {
|
| 411 |
+
// Marketaux format
|
| 412 |
+
allArticles = [...allArticles, ...data.data];
|
| 413 |
+
} else if (data.articles) {
|
| 414 |
+
// NewsAPI format
|
| 415 |
+
allArticles = [...allArticles, ...data.articles.map(article => ({
|
| 416 |
+
title: article.title,
|
| 417 |
+
description: article.description,
|
| 418 |
+
url: article.url,
|
| 419 |
+
image_url: article.urlToImage,
|
| 420 |
+
published_at: article.publishedAt,
|
| 421 |
+
source: article.source?.name
|
| 422 |
+
}))];
|
| 423 |
+
}
|
| 424 |
+
}
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
// Shuffle articles for variety
|
| 428 |
+
allArticles = shuffleArray(allArticles);
|
| 429 |
+
|
| 430 |
+
if (allArticles.length > 0) {
|
| 431 |
+
updateNewsUI(allArticles, refresh, append);
|
| 432 |
+
updateTicker(allArticles);
|
| 433 |
+
}
|
| 434 |
+
} catch (error) {
|
| 435 |
+
console.error('Error fetching news:', error);
|
| 436 |
+
throw error;
|
| 437 |
+
}
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
// Helper function to shuffle array
|
| 441 |
+
function shuffleArray(array) {
|
| 442 |
+
const newArray = [...array];
|
| 443 |
+
for (let i = newArray.length - 1; i > 0; i--) {
|
| 444 |
+
const j = Math.floor(Math.random() * (i + 1));
|
| 445 |
+
[newArray[i], newArray[j]] = [newArray[j], newArray[i]];
|
| 446 |
+
}
|
| 447 |
+
return newArray;
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
async function fetchTrendingTopics() {
|
| 451 |
+
try {
|
| 452 |
+
// For demo purposes, we'll use a static list
|
| 453 |
+
// In a real app, you might have an API endpoint for trending topics
|
| 454 |
+
const trendingTopics = [
|
| 455 |
+
{ name: "AI Advancements", mentions: 1245 },
|
| 456 |
+
{ name: "Quantum Computing", mentions: 876 },
|
| 457 |
+
{ name: "5G Rollout", mentions: 754 },
|
| 458 |
+
{ name: "Metaverse", mentions: 689 },
|
| 459 |
+
{ name: "Cybersecurity", mentions: 632 }
|
| 460 |
+
];
|
| 461 |
+
|
| 462 |
+
updateTrendingTopicsUI(trendingTopics);
|
| 463 |
+
} catch (error) {
|
| 464 |
+
console.error('Error fetching trending topics:', error);
|
| 465 |
+
throw error;
|
| 466 |
+
}
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
function loadTechCompanies() {
|
| 470 |
+
// Static list of major tech companies
|
| 471 |
+
const techCompanies = [
|
| 472 |
+
{ name: "Apple", symbol: "AAPL", logo: "https://logo.clearbit.com/apple.com" },
|
| 473 |
+
{ name: "Microsoft", symbol: "MSFT", logo: "https://logo.clearbit.com/microsoft.com" },
|
| 474 |
+
{ name: "Google", symbol: "GOOGL", logo: "https://logo.clearbit.com/google.com" },
|
| 475 |
+
{ name: "Amazon", symbol: "AMZN", logo: "https://logo.clearbit.com/amazon.com" },
|
| 476 |
+
{ name: "Meta", symbol: "META", logo: "https://logo.clearbit.com/meta.com" },
|
| 477 |
+
{ name: "Tesla", symbol: "TSLA", logo: "https://logo.clearbit.com/tesla.com" }
|
| 478 |
+
];
|
| 479 |
+
|
| 480 |
+
updateTechCompaniesUI(techCompanies);
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
// UI Update Functions
|
| 484 |
+
function updateTrendingTopicsUI(topics) {
|
| 485 |
+
const trendingContainer = document.getElementById('trending-topics');
|
| 486 |
+
trendingContainer.innerHTML = '';
|
| 487 |
+
|
| 488 |
+
topics.slice(0, 5).forEach(topic => {
|
| 489 |
+
const topicElement = document.createElement('div');
|
| 490 |
+
topicElement.className = 'flex justify-between items-center';
|
| 491 |
+
|
| 492 |
+
topicElement.innerHTML = `
|
| 493 |
+
<div class="flex items-center">
|
| 494 |
+
<div class="w-8 h-8 rounded-full bg-techPurple text-white flex items-center justify-center mr-2">
|
| 495 |
+
<i class="fas fa-hashtag text-sm"></i>
|
| 496 |
+
</div>
|
| 497 |
+
<span>${topic.name}</span>
|
| 498 |
+
</div>
|
| 499 |
+
<div class="text-right">
|
| 500 |
+
<span class="text-sm text-gray-500">${topic.mentions.toLocaleString()} mentions</span>
|
| 501 |
+
</div>
|
| 502 |
+
`;
|
| 503 |
+
|
| 504 |
+
trendingContainer.appendChild(topicElement);
|
| 505 |
+
});
|
| 506 |
+
}
|
| 507 |
+
|
| 508 |
+
function updateTechCompaniesUI(companies) {
|
| 509 |
+
const companiesContainer = document.getElementById('tech-companies');
|
| 510 |
+
companiesContainer.innerHTML = '';
|
| 511 |
+
|
| 512 |
+
companies.forEach(company => {
|
| 513 |
+
const companyElement = document.createElement('div');
|
| 514 |
+
companyElement.className = 'flex items-center p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition cursor-pointer';
|
| 515 |
+
|
| 516 |
+
companyElement.innerHTML = `
|
| 517 |
+
<img src="${company.logo}" alt="${company.name}" class="w-10 h-10 rounded-full mr-3" onerror="this.src='https://via.placeholder.com/40?text=${company.symbol}'">
|
| 518 |
+
<div>
|
| 519 |
+
<div class="font-medium">${company.name}</div>
|
| 520 |
+
<div class="text-xs text-gray-500">${company.symbol}</div>
|
| 521 |
+
</div>
|
| 522 |
+
`;
|
| 523 |
+
|
| 524 |
+
companiesContainer.appendChild(companyElement);
|
| 525 |
+
});
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
function updateNewsUI(articles, refresh, append) {
|
| 529 |
+
const newsContainer = document.getElementById('news-container');
|
| 530 |
+
|
| 531 |
+
// Clear container if refreshing
|
| 532 |
+
if (refresh) {
|
| 533 |
+
newsContainer.innerHTML = '';
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
// Hide loading skeleton
|
| 537 |
+
document.getElementById('loading-skeleton').classList.add('hidden');
|
| 538 |
+
|
| 539 |
+
// Show news container if it's hidden
|
| 540 |
+
if (!append) {
|
| 541 |
+
newsContainer.classList.remove('hidden');
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
// Add articles to container
|
| 545 |
+
articles.forEach(article => {
|
| 546 |
+
const newsCard = document.createElement('div');
|
| 547 |
+
newsCard.className = 'news-card bg-white rounded-lg shadow-md p-6 transition duration-300';
|
| 548 |
+
|
| 549 |
+
// Simple sentiment analysis based on title keywords
|
| 550 |
+
let sentimentColor = 'text-gray-500';
|
| 551 |
+
let sentimentIcon = 'fa-newspaper';
|
| 552 |
+
const title = article.title ? article.title.toLowerCase() : '';
|
| 553 |
+
|
| 554 |
+
if (title.includes('breakthrough') || title.includes('innovative') || title.includes('success') ||
|
| 555 |
+
title.includes('growth') || title.includes('launch') || title.includes('record')) {
|
| 556 |
+
sentimentColor = 'text-techGreen';
|
| 557 |
+
sentimentIcon = 'fa-arrow-up';
|
| 558 |
+
} else if (title.includes('hack') || title.includes('breach') || title.includes('layoff') ||
|
| 559 |
+
title.includes('decline') || title.includes('warning') || title.includes('issue') ||
|
| 560 |
+
title.includes('problem') || title.includes('failure')) {
|
| 561 |
+
sentimentColor = 'text-techRed';
|
| 562 |
+
sentimentIcon = 'fa-arrow-down';
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
// Format date
|
| 566 |
+
const date = article.published_at ? new Date(article.published_at) : new Date();
|
| 567 |
+
const formattedDate = date.toLocaleDateString('en-US', {
|
| 568 |
+
year: 'numeric',
|
| 569 |
+
month: 'short',
|
| 570 |
+
day: 'numeric'
|
| 571 |
+
});
|
| 572 |
+
|
| 573 |
+
// Get source name
|
| 574 |
+
const sourceName = article.source || 'Unknown Source';
|
| 575 |
+
|
| 576 |
+
// Create card HTML
|
| 577 |
+
newsCard.innerHTML = `
|
| 578 |
+
<div class="flex flex-col md:flex-row gap-4">
|
| 579 |
+
<div class="md:w-1/4">
|
| 580 |
+
<img src="${article.image_url || 'https://via.placeholder.com/300x200?text=No+Image'}"
|
| 581 |
+
alt="${article.title || 'News image'}"
|
| 582 |
+
class="w-full h-40 object-cover rounded-lg">
|
| 583 |
+
</div>
|
| 584 |
+
<div class="md:w-3/4">
|
| 585 |
+
<div class="flex justify-between items-start mb-2">
|
| 586 |
+
<h3 class="text-xl font-bold text-techDark">${article.title || 'No title available'}</h3>
|
| 587 |
+
<i class="fas ${sentimentIcon} ${sentimentColor} text-lg"></i>
|
| 588 |
+
</div>
|
| 589 |
+
<p class="text-gray-600 mb-4">${article.description || 'No description available.'}</p>
|
| 590 |
+
<div class="flex justify-between items-center text-sm text-gray-500">
|
| 591 |
+
<span>${sourceName} • ${formattedDate}</span>
|
| 592 |
+
<a href="${article.url || '#'}" target="_blank" rel="noopener noreferrer"
|
| 593 |
+
class="text-techBlue hover:underline">
|
| 594 |
+
Read More <i class="fas fa-arrow-right ml-1"></i>
|
| 595 |
+
</a>
|
| 596 |
+
</div>
|
| 597 |
+
</div>
|
| 598 |
+
</div>
|
| 599 |
+
`;
|
| 600 |
+
|
| 601 |
+
newsContainer.appendChild(newsCard);
|
| 602 |
+
});
|
| 603 |
+
|
| 604 |
+
// Hide load more button if no more articles
|
| 605 |
+
if (articles.length < 10) {
|
| 606 |
+
document.getElementById('load-more').classList.add('hidden');
|
| 607 |
+
} else {
|
| 608 |
+
document.getElementById('load-more').classList.remove('hidden');
|
| 609 |
+
}
|
| 610 |
+
}
|
| 611 |
+
|
| 612 |
+
function updateTicker(articles) {
|
| 613 |
+
let tickerHTML = '';
|
| 614 |
+
|
| 615 |
+
if (articles && articles.length > 0) {
|
| 616 |
+
articles.slice(0, 8).forEach(article => {
|
| 617 |
+
// Truncate title if too long
|
| 618 |
+
const shortTitle = article.title && article.title.length > 50 ?
|
| 619 |
+
article.title.substring(0, 47) + '...' : article.title || 'Tech news';
|
| 620 |
+
|
| 621 |
+
tickerHTML += `
|
| 622 |
+
<span class="font-medium">${shortTitle}</span>
|
| 623 |
+
<span class="mx-3 text-gray-400">|</span>
|
| 624 |
+
`;
|
| 625 |
+
});
|
| 626 |
+
}
|
| 627 |
+
|
| 628 |
+
document.getElementById('tech-ticker').innerHTML = tickerHTML || 'Technology news headlines loaded';
|
| 629 |
+
}
|
| 630 |
+
|
| 631 |
+
function showError(message) {
|
| 632 |
+
// Hide loading states
|
| 633 |
+
document.getElementById('loading-skeleton').classList.add('hidden');
|
| 634 |
+
|
| 635 |
+
// Show error message
|
| 636 |
+
const errorElement = document.createElement('div');
|
| 637 |
+
errorElement.className = 'bg-techRed text-white p-4 rounded-lg mb-6';
|
| 638 |
+
errorElement.innerHTML = `
|
| 639 |
+
<div class="flex items-center">
|
| 640 |
+
<i class="fas fa-exclamation-circle mr-2"></i>
|
| 641 |
+
<span>${message}</span>
|
| 642 |
+
</div>
|
| 643 |
+
`;
|
| 644 |
+
|
| 645 |
+
const newsContainer = document.getElementById('news-container');
|
| 646 |
+
newsContainer.innerHTML = '';
|
| 647 |
+
newsContainer.appendChild(errorElement);
|
| 648 |
+
newsContainer.classList.remove('hidden');
|
| 649 |
+
}
|
| 650 |
+
</script>
|
| 651 |
+
<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=flitrx/autonews" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 652 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
make a website that automatically aggregates the material that it will post, which is anything related to crypto currencies. this site must be fully functional and automated with current stories scraped/acquired from the internet. do not use any code that is going to only emulate or simulate a working site with some predefined stories coded into it, this must fuctionally get its own stories and articles, no "just-for-demonstration" coding.
|
| 2 |
+
what the hell are you doing? i specifically asked you not to code in fake/sample/simulated articles or any data that isnt aggrigated or scraped. this site has to use APIs from other sources to get its current prices for the currencies and to get current articles and stories for its News. Do not use any simulated articles or anything that isnt gotten through API, All information on this site must be current!
|
| 3 |
+
make this into a Tech news automated news aggrigator instead of Crypto news. use https://api.marketaux.com/v1/news/all?industries=Technology&filter_entities=true&limit=10&published_after=2025-05-22T08:54&api_token=x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq for the api.
|
| 4 |
+
in the Categories drop down menu, the categories should be: 1 - Energy, with API: https://api.marketaux.com/v1/news/all?industries=Energy&filter_entities=true&limit=10&published_after=2025-05-22T09:04&api_token=x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq. 2 - Communication Services with API: https://api.marketaux.com/v1/news/all?industries=Communication Services&filter_entities=true&limit=10&published_after=2025-05-22T09:07&api_token=x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq. 3 - Financial with API: https://api.marketaux.com/v1/news/all?industries=Financial&filter_entities=true&limit=10&published_after=2025-05-22T09:08&api_token=x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq. 4 - Healthcare with API: https://api.marketaux.com/v1/news/all?industries=Healthcare&filter_entities=true&limit=10&published_after=2025-05-22T09:09&api_token=x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq. 5 - Industrial with API: https://api.marketaux.com/v1/news/all?industries=Industrials&filter_entities=true&limit=10&published_after=2025-05-22T09:10&api_token=x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq. 6 - Real Estate with API: https://api.marketaux.com/v1/news/all?industries=Real Estate&filter_entities=true&limit=10&published_after=2025-05-22T09:11&api_token=x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq. 7 - Utilities with API: https://api.marketaux.com/v1/news/all?industries=Utilities&filter_entities=true&limit=10&published_after=2025-05-22T09:12&api_token=x7do5W51vWCggI5OC0qDPYYPRRRBdpsZuydOkfPq.
|
| 5 |
+
add these additional APIs to their respective categories: Technology API: https://newsapi.org/v2/everything?q=bitcoin&from=2025-04-23&sortBy=publishedAt&apiKey=f764fe522436442d9bdafbae241d7b63, https://newsapi.org/v2/everything?q=apple&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=f764fe522436442d9bdafbae241d7b63, https://newsapi.org/v2/top-headlines?sources=techcrunch&apiKey=f764fe522436442d9bdafbae241d7b63. Energy API - https://newsapi.org/v2/everything?q=energy&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=f764fe522436442d9bdafbae241d7b63, https://newsapi.org/v2/everything?q=solar&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=f764fe522436442d9bdafbae241d7b63, https://newsapi.org/v2/everything?q=wind+solar&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=f764fe522436442d9bdafbae241d7b63. Communication Services API: https://newsapi.org/v2/everything?q=verizonORsprintORt-mobileORmetroOR5gORwireless&from=2025-05-22&to=2025-05-22&sortBy=popularity&apiKey=f764fe522436442d9bdafbae241d7b63
|