Spaces:
Running
Running
ready-to-deploy code
Browse files- index.html +3 -0
- news.html +72 -0
- seasonality.html +3 -2
index.html
CHANGED
|
@@ -25,6 +25,9 @@
|
|
| 25 |
<a href="/seasonality.html" class="px-4 py-2 bg-indigo-600 rounded-lg hover:bg-indigo-700 flex items-center text-white">
|
| 26 |
<i data-feather="calendar" class="mr-2"></i> Seasonality
|
| 27 |
</a>
|
|
|
|
|
|
|
|
|
|
| 28 |
<button id="bullishBtn" class="px-4 py-2 bg-green-600 rounded-lg hover:bg-green-700 flex items-center">
|
| 29 |
<i data-feather="trending-up" class="mr-2"></i> Bullish
|
| 30 |
</button>
|
|
|
|
| 25 |
<a href="/seasonality.html" class="px-4 py-2 bg-indigo-600 rounded-lg hover:bg-indigo-700 flex items-center text-white">
|
| 26 |
<i data-feather="calendar" class="mr-2"></i> Seasonality
|
| 27 |
</a>
|
| 28 |
+
<a href="/news.html" class="px-4 py-2 bg-indigo-600 rounded-lg hover:bg-indigo-700 flex items-center text-white">
|
| 29 |
+
<i data-feather="file-text" class="mr-2"></i> News
|
| 30 |
+
</a>
|
| 31 |
<button id="bullishBtn" class="px-4 py-2 bg-green-600 rounded-lg hover:bg-green-700 flex items-center">
|
| 32 |
<i data-feather="trending-up" class="mr-2"></i> Bullish
|
| 33 |
</button>
|
news.html
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Msonjo Trade - Market News</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"></script>
|
| 8 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 9 |
+
</head>
|
| 10 |
+
<body class="bg-gray-100">
|
| 11 |
+
<div class="container mx-auto px-4 py-8 max-w-6xl">
|
| 12 |
+
<header class="bg-gradient-to-r from-blue-600 to-indigo-700 text-white p-6 rounded-lg shadow-lg mb-8 flex justify-between items-center">
|
| 13 |
+
<div class="flex items-center space-x-4">
|
| 14 |
+
<a href="/index.html">
|
| 15 |
+
<img src="http://static.photos/finance/200x200/42" alt="Msonjo Trade Logo" class="h-12 w-12 rounded-full">
|
| 16 |
+
</a>
|
| 17 |
+
<div>
|
| 18 |
+
<h1 class="text-3xl font-bold">Msonjo Trade</h1>
|
| 19 |
+
<p class="text-blue-100">Market News & Analysis</p>
|
| 20 |
+
</div>
|
| 21 |
+
</div>
|
| 22 |
+
<nav class="flex space-x-4">
|
| 23 |
+
<a href="/index.html" class="text-blue-100 hover:text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition">Dashboard</a>
|
| 24 |
+
<a href="/seasonality.html" class="text-blue-100 hover:text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition">Seasonality</a>
|
| 25 |
+
</nav>
|
| 26 |
+
</header>
|
| 27 |
+
|
| 28 |
+
<div class="bg-white p-6 rounded-lg shadow mb-8">
|
| 29 |
+
<h2 class="text-xl font-semibold mb-4 text-gray-800">Latest Market News</h2>
|
| 30 |
+
<div id="newsContainer" class="space-y-6">
|
| 31 |
+
<!-- News will be loaded via API -->
|
| 32 |
+
</div>
|
| 33 |
+
</div>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<script>
|
| 37 |
+
feather.replace();
|
| 38 |
+
|
| 39 |
+
// Fetch financial news from NewsAPI
|
| 40 |
+
async function loadNews() {
|
| 41 |
+
try {
|
| 42 |
+
const response = await fetch('https://newsapi.org/v2/top-headlines?category=business&apiKey=YOUR_API_KEY');
|
| 43 |
+
const data = await response.json();
|
| 44 |
+
|
| 45 |
+
const newsContainer = document.getElementById('newsContainer');
|
| 46 |
+
|
| 47 |
+
data.articles.slice(0, 5).forEach(article => {
|
| 48 |
+
const newsItem = document.createElement('div');
|
| 49 |
+
newsItem.className = 'border-b pb-4';
|
| 50 |
+
newsItem.innerHTML = `
|
| 51 |
+
<h3 class="text-lg font-semibold mb-2">${article.title}</h3>
|
| 52 |
+
<p class="text-gray-600 mb-2">${article.description || ''}</p>
|
| 53 |
+
<div class="flex justify-between items-center">
|
| 54 |
+
<span class="text-sm text-gray-500">${article.source.name} • ${new Date(article.publishedAt).toLocaleDateString()}</span>
|
| 55 |
+
<a href="${article.url}" target="_blank" class="text-blue-600 hover:text-blue-800 text-sm flex items-center">
|
| 56 |
+
Read more <i data-feather="external-link" class="ml-1 w-4 h-4"></i>
|
| 57 |
+
</a>
|
| 58 |
+
</div>
|
| 59 |
+
`;
|
| 60 |
+
newsContainer.appendChild(newsItem);
|
| 61 |
+
});
|
| 62 |
+
|
| 63 |
+
feather.replace();
|
| 64 |
+
} catch (error) {
|
| 65 |
+
console.error('Error loading news:', error);
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
loadNews();
|
| 70 |
+
</script>
|
| 71 |
+
</body>
|
| 72 |
+
</html>
|
seasonality.html
CHANGED
|
@@ -20,10 +20,11 @@
|
|
| 20 |
<p class="text-blue-100">Seasonal Trends Analysis</p>
|
| 21 |
</div>
|
| 22 |
</div>
|
| 23 |
-
<nav>
|
| 24 |
<a href="/index.html" class="text-blue-100 hover:text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition">Dashboard</a>
|
|
|
|
| 25 |
</nav>
|
| 26 |
-
|
| 27 |
|
| 28 |
<div class="bg-white p-6 rounded-lg shadow mb-8">
|
| 29 |
<h2 class="text-xl font-semibold mb-4 text-gray-800">Macro Seasonality Trends</h2>
|
|
|
|
| 20 |
<p class="text-blue-100">Seasonal Trends Analysis</p>
|
| 21 |
</div>
|
| 22 |
</div>
|
| 23 |
+
<nav class="flex space-x-4">
|
| 24 |
<a href="/index.html" class="text-blue-100 hover:text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition">Dashboard</a>
|
| 25 |
+
<a href="/news.html" class="text-blue-100 hover:text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition">News</a>
|
| 26 |
</nav>
|
| 27 |
+
</header>
|
| 28 |
|
| 29 |
<div class="bg-white p-6 rounded-lg shadow mb-8">
|
| 30 |
<h2 class="text-xl font-semibold mb-4 text-gray-800">Macro Seasonality Trends</h2>
|