Skip to content

Commit dfaf754

Browse files
author
BytebustersDev
committed
Add news page conventions and update news cards with new releases
1 parent 8468982 commit dfaf754

3 files changed

Lines changed: 261 additions & 3 deletions

File tree

.cursor/rules/news-page.mdc

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
description: Conventions for editing venezia-marea/news.html – news cards, pills, images and release structure
3+
globs: venezia-marea/news.html
4+
alwaysApply: false
5+
---
6+
7+
# News Page Conventions
8+
9+
## When adding a new release
10+
11+
1. Bump `<meta name="news-id" content="YYYY-MM-DD">` to the release date.
12+
2. Update both date tags (`data-lang="it"` and `data-lang="en"`).
13+
3. Insert new cards **at the top** of each language section (IT first, EN second — identical structure).
14+
4. Push old cards below a `<div class="release-divider">` separator.
15+
16+
## Card anatomy
17+
18+
```html
19+
<div class="news-card [news-card-featured]">
20+
<div class="news-card-header">
21+
<div class="pill [pill-fix|pill-improvement]">
22+
<span class="pill-dot"></span>
23+
<span>Label</span>
24+
</div>
25+
<h2>Section title</h2>
26+
</div>
27+
28+
<!-- single-line entry -->
29+
<p>Description text.</p>
30+
31+
<!-- OR multi-item entry -->
32+
<ul class="news-bullet-list">
33+
<li>Item one</li>
34+
<li>Item two</li>
35+
</ul>
36+
37+
<!-- optional screenshot — drop inside the card, after the text/list -->
38+
<div style="margin-top: 16px; border-radius: 16px; overflow: hidden; max-width: 100%;">
39+
<img src="assets/filename.png" alt="Description"
40+
style="width: 100%; height: auto; display: block; object-fit: cover;" />
41+
</div>
42+
</div>
43+
```
44+
45+
## Pill variants
46+
47+
| Class | Colour | Use for |
48+
|---|---|---|
49+
| *(default)* | Blue | New features |
50+
| `pill-fix` | Orange | Bug fixes |
51+
| `pill-improvement` | Purple | Improvements / refactors |
52+
53+
Use `news-card-featured` on the card that has the most items or includes a screenshot.
54+
55+
## Rules
56+
57+
- **No emoji icons** in card headers — no `<span class="section-icon">` elements.
58+
- Card images live in `venezia-marea/assets/` and are referenced as `assets/filename`.
59+
- Always duplicate cards in both IT and EN sections; keep wording consistent.
60+
- Do not add new CSS classes unless strictly necessary; reuse existing variants.
131 KB
Loading

venezia-marea/news.html

Lines changed: 201 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
If they match, the app skips showing the page; otherwise it shows
1212
it and persists the new news-id locally.
1313
-->
14-
<meta name="news-id" content="2026-03-14">
14+
<meta name="news-id" content="2026-05-06">
1515

1616
<title>Novità – Venezia Marea</title>
1717
<link rel="preconnect" href="https://fonts.googleapis.com">
@@ -228,6 +228,97 @@
228228
text-align: left;
229229
}
230230

231+
/* pill variants */
232+
.pill-fix {
233+
background: rgba(234, 88, 12, 0.09);
234+
color: #c2410c;
235+
}
236+
.pill-fix .pill-dot {
237+
background: #f97316;
238+
box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.22);
239+
}
240+
241+
.pill-improvement {
242+
background: rgba(109, 40, 217, 0.09);
243+
color: #6d28d9;
244+
}
245+
.pill-improvement .pill-dot {
246+
background: #8b5cf6;
247+
box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.22);
248+
}
249+
250+
/* featured card (settings) */
251+
.news-card-featured {
252+
background: rgba(255, 255, 255, 0.82);
253+
border-color: rgba(139, 92, 246, 0.18);
254+
box-shadow:
255+
0 8px 32px 0 rgba(109, 40, 217, 0.10),
256+
inset 0 0 0 1px rgba(255, 255, 255, 0.5);
257+
}
258+
259+
.news-card-featured::after {
260+
content: "";
261+
position: absolute;
262+
inset: 0;
263+
border-radius: 28px;
264+
background: linear-gradient(
265+
135deg,
266+
rgba(139, 92, 246, 0.06) 0%,
267+
transparent 60%
268+
);
269+
pointer-events: none;
270+
}
271+
272+
/* bullet list inside card */
273+
.news-bullet-list {
274+
margin: 10px 0 0;
275+
padding: 0;
276+
list-style: none;
277+
display: flex;
278+
flex-direction: column;
279+
gap: 8px;
280+
}
281+
282+
.news-bullet-list li {
283+
display: flex;
284+
align-items: flex-start;
285+
gap: 9px;
286+
font-size: 0.93em;
287+
color: var(--muted);
288+
line-height: 1.45;
289+
}
290+
291+
.news-bullet-list li::before {
292+
content: "";
293+
flex-shrink: 0;
294+
width: 6px;
295+
height: 6px;
296+
border-radius: 50%;
297+
background: #8b5cf6;
298+
margin-top: 6px;
299+
}
300+
301+
/* divider between release groups */
302+
.release-divider {
303+
display: flex;
304+
align-items: center;
305+
gap: 12px;
306+
margin: 24px 0 8px;
307+
color: #aaa;
308+
font-size: 0.78em;
309+
font-weight: 600;
310+
letter-spacing: 0.06em;
311+
text-transform: uppercase;
312+
}
313+
314+
.release-divider::before,
315+
.release-divider::after {
316+
content: "";
317+
flex: 1;
318+
height: 1px;
319+
background: rgba(0,0,0,0.08);
320+
}
321+
231322
/* language sections */
232323
[data-lang] { display: none; }
233324
[data-lang].visible { display: block; }
@@ -243,8 +334,8 @@ <h1>NEWS</h1>
243334
<p data-lang="en">Latest news from Venezia Marea</p>
244335
</div>
245336
<div class="date-lang-row">
246-
<span class="news-date-tag" data-lang="it">14 marzo 2026</span>
247-
<span class="news-date-tag" data-lang="en">March 14, 2026</span>
337+
<span class="news-date-tag" data-lang="it">6 maggio 2026</span>
338+
<span class="news-date-tag" data-lang="en">May 6, 2026</span>
248339
<div class="lang-switcher">
249340
<button id="btn-it" onclick="setLang('it')">IT</button>
250341
<button id="btn-en" onclick="setLang('en')">EN</button>
@@ -258,6 +349,58 @@ <h1>NEWS</h1>
258349
<div data-lang="it">
259350

260351
<div class="news-list">
352+
353+
<!-- ── Impostazioni ── -->
354+
<div class="news-card news-card-featured">
355+
<div class="news-card-header">
356+
<div class="pill pill-improvement">
357+
<span class="pill-dot"></span>
358+
<span>Miglioria</span>
359+
</div>
360+
<h2>Impostazioni</h2>
361+
</div>
362+
<ul class="news-bullet-list">
363+
<li>Aggiunto selettore per l'unità di misura della velocità del vento</li>
364+
<li>Aggiunto selettore per impostare la stazione meteo preferita</li>
365+
</ul>
366+
<div style="margin-top: 16px; border-radius: 16px; overflow: hidden; max-width: 100%;">
367+
<img
368+
src="assets/new_settings.png"
369+
alt="Nuove impostazioni dell'app"
370+
style="width: 100%; height: auto; display: block; object-fit: cover;"
371+
/>
372+
</div>
373+
</div>
374+
375+
<!-- ── Notifiche ── -->
376+
<div class="news-card">
377+
<div class="news-card-header">
378+
<div class="pill pill-fix">
379+
<span class="pill-dot"></span>
380+
<span>Fix</span>
381+
</div>
382+
<h2>Notifiche</h2>
383+
</div>
384+
<p>
385+
Fix al pannello notifiche: il selettore della frequenza ora si nasconde
386+
correttamente senza dover ricaricare la pagina.
387+
</p>
388+
</div>
389+
390+
<!-- ── Webcam ── -->
391+
<div class="news-card">
392+
<div class="news-card-header">
393+
<div class="pill pill-fix">
394+
<span class="pill-dot"></span>
395+
<span>Fix</span>
396+
</div>
397+
<h2>Webcam</h2>
398+
</div>
399+
<p>Fix e miglioramenti alla pagina delle webcam.</p>
400+
</div>
401+
402+
<div class="release-divider">Aggiornamenti precedenti</div>
403+
261404
<div class="news-card">
262405
<div class="news-card-header">
263406
<div class="pill">
@@ -346,6 +489,61 @@ <h2>Previsioni marea ancora più precise</h2>
346489
<div data-lang="en">
347490

348491
<div class="news-list">
492+
493+
<!-- ── Settings ── -->
494+
<div class="news-card news-card-featured">
495+
<div class="news-card-header">
496+
<div class="pill pill-improvement">
497+
<span class="pill-dot"></span>
498+
<span>Improvement</span>
499+
</div>
500+
<h2>Settings</h2>
501+
</div>
502+
<ul class="news-bullet-list">
503+
<li>Added a wind speed unit selector</li>
504+
<li>Added a selector to set your preferred weather station</li>
505+
<li>Improved the floating button design</li>
506+
<li>Added a dashboard customisation mockup</li>
507+
<li>Refactored the Settings page with dedicated components</li>
508+
</ul>
509+
<div style="margin-top: 16px; border-radius: 16px; overflow: hidden; max-width: 100%;">
510+
<img
511+
src="assets/new_settings.png"
512+
alt="New app settings"
513+
style="width: 100%; height: auto; display: block; object-fit: cover;"
514+
/>
515+
</div>
516+
</div>
517+
518+
<!-- ── Notifications ── -->
519+
<div class="news-card">
520+
<div class="news-card-header">
521+
<div class="pill pill-fix">
522+
<span class="pill-dot"></span>
523+
<span>Fix</span>
524+
</div>
525+
<h2>Notifications</h2>
526+
</div>
527+
<p>
528+
Fixed the notification panel: the frequency selector now hides correctly
529+
without requiring a page reload.
530+
</p>
531+
</div>
532+
533+
<!-- ── Webcams ── -->
534+
<div class="news-card">
535+
<div class="news-card-header">
536+
<div class="pill pill-fix">
537+
<span class="pill-dot"></span>
538+
<span>Fix</span>
539+
</div>
540+
<h2>Webcams</h2>
541+
</div>
542+
<p>Bug fixes and improvements to the webcam page.</p>
543+
</div>
544+
545+
<div class="release-divider">Previous updates</div>
546+
349547
<div class="news-card">
350548
<div class="news-card-header">
351549
<div class="pill">

0 commit comments

Comments
 (0)