Spaces:
Running
Running
Create templates/index.html
Browse files- templates/index.html +100 -0
templates/index.html
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>News Feed Hub</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
font-family: 'Arial', sans-serif;
|
10 |
+
margin: 0;
|
11 |
+
padding: 20px;
|
12 |
+
background-color: #f4f4f9;
|
13 |
+
color: #333;
|
14 |
+
}
|
15 |
+
h1 {
|
16 |
+
text-align: center;
|
17 |
+
color: #2c3e50;
|
18 |
+
}
|
19 |
+
.search-container {
|
20 |
+
text-align: center;
|
21 |
+
margin: 20px 0;
|
22 |
+
}
|
23 |
+
.search-bar {
|
24 |
+
width: 50%;
|
25 |
+
padding: 12px;
|
26 |
+
font-size: 16px;
|
27 |
+
border: 2px solid #3498db;
|
28 |
+
border-radius: 25px;
|
29 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
30 |
+
outline: none;
|
31 |
+
transition: border-color 0.3s;
|
32 |
+
}
|
33 |
+
.search-bar:focus {
|
34 |
+
border-color: #2980b9;
|
35 |
+
}
|
36 |
+
.category-section {
|
37 |
+
margin: 30px 0;
|
38 |
+
}
|
39 |
+
.category-title {
|
40 |
+
background-color: #3498db;
|
41 |
+
color: white;
|
42 |
+
padding: 10px;
|
43 |
+
border-radius: 5px;
|
44 |
+
font-size: 1.4em;
|
45 |
+
}
|
46 |
+
.article {
|
47 |
+
background-color: white;
|
48 |
+
padding: 15px;
|
49 |
+
margin: 10px 0;
|
50 |
+
border-radius: 8px;
|
51 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
52 |
+
transition: transform 0.2s;
|
53 |
+
}
|
54 |
+
.article:hover {
|
55 |
+
transform: translateY(-3px);
|
56 |
+
}
|
57 |
+
.title a {
|
58 |
+
font-size: 1.2em;
|
59 |
+
color: #2c3e50;
|
60 |
+
text-decoration: none;
|
61 |
+
}
|
62 |
+
.title a:hover {
|
63 |
+
color: #3498db;
|
64 |
+
}
|
65 |
+
.summary {
|
66 |
+
color: #555;
|
67 |
+
margin: 5px 0;
|
68 |
+
}
|
69 |
+
.sentiment {
|
70 |
+
font-style: italic;
|
71 |
+
color: #7f8c8d;
|
72 |
+
}
|
73 |
+
.published {
|
74 |
+
font-size: 0.9em;
|
75 |
+
color: #95a5a6;
|
76 |
+
}
|
77 |
+
</style>
|
78 |
+
</head>
|
79 |
+
<body>
|
80 |
+
<h1>News Feed Hub</h1>
|
81 |
+
<div class="search-container">
|
82 |
+
<form method="POST">
|
83 |
+
<input type="text" name="search" class="search-bar" placeholder="Search news semantically...">
|
84 |
+
</form>
|
85 |
+
</div>
|
86 |
+
{% for category, articles in categorized_articles.items() %}
|
87 |
+
<div class="category-section">
|
88 |
+
<div class="category-title">{{ category }}</div>
|
89 |
+
{% for article in articles %}
|
90 |
+
<div class="article">
|
91 |
+
<div class="title"><a href="{{ article.link }}" target="_blank">{{ article.title }}</a></div>
|
92 |
+
<div class="summary">{{ article.summary }}</div>
|
93 |
+
<div class="sentiment">Sentiment: {{ article.sentiment }}</div>
|
94 |
+
<div class="published">Published: {{ article.published }}</div>
|
95 |
+
</div>
|
96 |
+
{% endfor %}
|
97 |
+
</div>
|
98 |
+
{% endfor %}
|
99 |
+
</body>
|
100 |
+
</html>
|