-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnews.html
More file actions
73 lines (66 loc) · 2.4 KB
/
news.html
File metadata and controls
73 lines (66 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>News – RSS Reader</title>
<link rel="stylesheet" href="styles.css">
<style>
/* Toolbar */
.toolbar { display:flex; gap:.5rem; align-items:center; margin:.5rem 0 1rem; flex-wrap:wrap; }
.toolbar button { padding:.4rem .8rem; border:1px solid #ccc; border-radius:8px; background:#fff; cursor:pointer; }
.toolbar button:hover { text-decoration: underline; }
.meta { font-size: 0.9rem; color: #555; }
.error { color: #b00020; }
code.inline { background: #eee; padding: 0.05rem 0.3rem; border-radius: 4px; }
/* One section per feed */
.feed-section { margin: 1.25rem 0; }
.feed-section h2 { margin: 0 0 .5rem 0; font-size: 1.25rem; }
/* Row of cards: single horizontal line with scroll */
.articles-row {
display: flex;
gap: 1rem;
overflow-x: auto;
padding-bottom: .25rem; /* room for scrollbar */
scroll-snap-type: x proximity; /* optional nicety */
}
.articles-row .card {
min-width: 240px; /* ensures readable width while scrolling */
scroll-snap-align: start; /* optional nicety */
}
/* Card */
.card {
background: #fff; border-radius: 8px; padding: 1rem; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
display: flex; flex-direction: column; gap: 0.5rem;
min-width: 220px; /* ensures reasonable width when scrolling horizontally */
}
.card h3 { margin: 0; font-size: 1.05rem; }
.thumb {
width: 100%;
max-height: 180px; /* adjust if you want taller images */
object-fit: cover;
border-radius: 8px;
}
</style>
<!-- Bump this number when you edit news.js -->
<script src="news.js?v=8" defer></script>
</head>
<body>
<nav>
<a href="index.html">Home</a>
<a href="weather.html">Weather</a>
<a href="news.html" aria-current="page">News</a>
<a href="transport.html">Transport</a>
</nav>
<main>
<h1>News</h1>
<p>Edit your feeds in <code class="inline">news.js</code> (the <code class="inline">FEEDS</code> array), then redeploy.</p>
<div class="toolbar">
<button id="refreshBtn" type="button">Refresh</button>
<div id="updated" class="meta" aria-live="polite"></div>
</div>
<div id="status" class="meta"></div>
<div id="articles"></div>
</main>
</body>
</html>