diff --git a/events.js b/events.js new file mode 100644 index 0000000..340427e --- /dev/null +++ b/events.js @@ -0,0 +1,14 @@ +// Configuration of periodic events in CoBiE time +// Each event repeats every cosmocycle. +// "cobie" is the timestamp within the cosmocycle when the event occurs. +// "tag" is a short label that will be displayed on the calendar. + +window.SPECIAL_EVENTS = [ + { cobie: '49f4.9332', label: 'Afina', megasequence: 'Mythran Epoch', eonstrip: 'Ventaso' }, + { cobie: '11e5.f552', label: 'Oleks', megasequence: 'Umbral Echo', eonstrip: 'Ignisar' }, + { cobie: '4d07.a2b2', label: 'Vincent', megasequence: 'Azurean Tide', eonstrip: 'Floraen' }, + { cobie: '3edc.d430', label: 'Hochzeitstag', megasequence: 'Lustran Bounty', eonstrip: 'Electros' }, + { cobie: '330d.d4ae', label: 'Zusammentag', megasequence: 'Azurean Tide', eonstrip: 'Chronar' }, + { cobie: '11de.0c52', label: 'Anna', megasequence: 'Lustran Bounty', eonstrip: 'Radiantae' }, + { cobie: '467f.ae61', label: 'Iris', megasequence: 'Argent Veil', eonstrip: 'Etherion' } +]; diff --git a/index.html b/index.html index 0f04736..be1dffb 100644 --- a/index.html +++ b/index.html @@ -136,6 +136,7 @@ + diff --git a/script.js b/script.js index 0021edb..f0ce757 100644 --- a/script.js +++ b/script.js @@ -810,6 +810,22 @@ function updateCalendar() {
${startDate.toLocaleDateString('en-US', dateOpts)}
`; + + if (Array.isArray(window.SPECIAL_EVENTS)) { + const offsetStart = ((cellCob % COBIE_UNITS.cosmocycle) + COBIE_UNITS.cosmocycle) % COBIE_UNITS.cosmocycle; + const offsetEnd = offsetStart + COBIE_UNITS.eonstrip; + window.SPECIAL_EVENTS.forEach(ev => { + const evCob = parseCobiets(ev.cobie); + if (evCob === null) return; + const evOffset = ((evCob % COBIE_UNITS.cosmocycle) + COBIE_UNITS.cosmocycle) % COBIE_UNITS.cosmocycle; + if (evOffset >= offsetStart && evOffset < offsetEnd) { + const tag = document.createElement('div'); + tag.className = 'event-tag'; + tag.textContent = ev.label; + card.appendChild(tag); + } + }); + } const tooltip = document.createElement('div'); tooltip.className = 'tooltip'; tooltip.innerHTML = showEonstripDetails(i, cellCob, dateOpts); diff --git a/style.css b/style.css index abc62fb..e650381 100644 --- a/style.css +++ b/style.css @@ -256,6 +256,19 @@ line-height: 1.4; } + .event-tag { + display: inline-block; + margin-top: 4px; + padding: 2px 6px; + font-size: 0.75em; + font-weight: 600; + color: #fff; + background: linear-gradient(135deg, rgba(0,255,255,0.25), rgba(255,0,255,0.25)); + border: 1px solid rgba(255,255,255,0.2); + border-radius: 4px; + text-shadow: 0 0 6px rgba(0,255,255,0.7); + } + .time-details { background: rgba(255, 255, 255, 0.05); border-radius: 10px;