Update and separate the yearly cosmic events.
Set to display the next 4 rather than the next x months
This commit is contained in:
fraxle
2026-07-07 14:04:35 +01:00
parent 0b260affd7
commit 96799e2afa
9 changed files with 1367 additions and 512 deletions
+3 -3
View File
@@ -1770,7 +1770,7 @@ export function UTCIForecast() {
${(() => {
const upcoming = getUpcomingEvents(location, 90);
const upcoming = getUpcomingEvents(location, 3650).slice(0, 4);
const formatPeak = (iso) => {
const d = new Date(iso + 'T00:00Z');
return d.toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric', timeZone: 'UTC' });
@@ -1787,11 +1787,11 @@ export function UTCIForecast() {
<div class="almanac-panel">
<div class="almanac-header">
<span class="almanac-title">🔭 What's Coming</span>
<span class="almanac-subtitle">Cosmic events · next 90 days · ${location.name}</span>
<span class="almanac-subtitle">Cosmic events · next 4 events · ${location.name}</span>
</div>
<div class="almanac-list">
${upcoming.length === 0
? html`<div class="almanac-empty">No major cosmic events in the next 90 days — clear skies ahead.</div>`
? html`<div class="almanac-empty">No major cosmic events on the horizon — clear skies ahead.</div>`
: upcoming.map(ev => html`
<div key=${ev.id} class="almanac-entry">
<div class="almanac-entry-accent" style=${{ background: ev.color === '#fdf8ee' ? '#c8922a' : ev.color }} />