Add periodic event configuration
This commit is contained in:
@@ -810,6 +810,22 @@ function updateCalendar() {
|
||||
<div class="eonstrip-dates">
|
||||
${startDate.toLocaleDateString('en-US', dateOpts)}
|
||||
</div>`;
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user