diff --git a/script.js b/script.js index 45b8420..64a8418 100644 --- a/script.js +++ b/script.js @@ -701,6 +701,16 @@ function showEonstripDetail(index, startCob) { timeline.appendChild(block); } + let markerCob = manualMode ? manualCobiets : toCobiets(new Date()); + const rel = (markerCob - startCob) / COBIE_UNITS.eonstrip; + if (rel >= 0 && rel <= 1) { + const line = document.createElement('div'); + line.className = 'current-time-line'; + line.style.top = (rel * 100) + '%'; + line.textContent = formatCobieTimestamp(markerCob); + timeline.appendChild(line); + } + if (Array.isArray(window.SPECIAL_EVENTS)) { const events = []; const start = startCob; diff --git a/style.css b/style.css index e36fd9b..91cacd3 100644 --- a/style.css +++ b/style.css @@ -415,6 +415,20 @@ color: #aaa; font-size: 0.8em; padding-top: 2px; + pointer-events: none; + z-index: 1; +} + +.current-time-line { + position: absolute; + left: -40px; + width: calc(100% + 40px); + border-top: 2px solid #ff00ff; + color: #ff00ff; + font-size: 0.8em; + padding-top: 2px; + pointer-events: none; + z-index: 2; } .event-box, .event-line {