Compare commits

...

12 Commits

Author SHA1 Message Date
Kiyomichi Kosaka d671e64c85 Merge pull request #69 from ok2/codex/refactor-event-box-labels-and-cronon-scale 2025-06-20 08:20:30 +02:00
Kiyomichi Kosaka 6c868f3768 Improve event labels and tooltips 2025-06-20 08:20:13 +02:00
Kiyomichi Kosaka 7a8a463169 Merge pull request #68 from ok2/codex/fix-analog-clock-background-visibility-in-eonstrip-view 2025-06-20 08:11:46 +02:00
Kiyomichi Kosaka 0f7f83c618 Fix fullscreen clock not hiding detail view 2025-06-20 08:11:28 +02:00
Kiyomichi Kosaka bf04c9569a Merge pull request #67 from ok2/codex/improve-timeline-and-event-label-visibility 2025-06-20 08:10:07 +02:00
Kiyomichi Kosaka 483b20e13d Improve detail timeline visibility 2025-06-20 08:09:50 +02:00
Kiyomichi Kosaka 757aa60ec4 Merge pull request #66 from ok2/codex/fix-chronon-numbers-visibility-and-add-timestamp-line 2025-06-20 08:03:04 +02:00
Kiyomichi Kosaka ead5d58d21 Fix detail view timeline 2025-06-20 08:02:40 +02:00
Kiyomichi Kosaka 3a591be7dc Merge pull request #65 from ok2/codex/fix-stuck-animation-issue-in-eonstript-detail-view 2025-06-20 08:00:28 +02:00
Kiyomichi Kosaka 7f706f12cd fix grid animation when navigating from detail 2025-06-20 08:00:10 +02:00
Kiyomichi Kosaka b2d8754c7e Merge pull request #64 from ok2/codex/fix-visibility-of-labels-in-detail-view 2025-06-20 07:55:49 +02:00
Kiyomichi Kosaka 1a61d7b3cc Allow detail labels to overflow 2025-06-20 07:55:34 +02:00
2 changed files with 89 additions and 19 deletions
+41 -1
View File
@@ -701,6 +701,16 @@ function showEonstripDetail(index, startCob) {
timeline.appendChild(block); 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)) { if (Array.isArray(window.SPECIAL_EVENTS)) {
const events = []; const events = [];
const start = startCob; const start = startCob;
@@ -730,7 +740,13 @@ function showEonstripDetail(index, startCob) {
while (occ < end && occ <= endCobEv) { while (occ < end && occ <= endCobEv) {
const relStart = (occ - start) / COBIE_UNITS.eonstrip; const relStart = (occ - start) / COBIE_UNITS.eonstrip;
const relEnd = (occ + duration - start) / COBIE_UNITS.eonstrip; const relEnd = (occ + duration - start) / COBIE_UNITS.eonstrip;
events.push({ label: ev.label, start: relStart, end: relEnd }); events.push({
label: ev.label,
start: relStart,
end: relEnd,
cobStart: occ,
cobEnd: occ + duration
});
occ += interval; occ += interval;
} }
}); });
@@ -772,6 +788,25 @@ function showEonstripDetail(index, startCob) {
} else { } else {
elem.textContent = ev.label; elem.textContent = ev.label;
} }
const tooltip = document.createElement('div');
tooltip.className = 'tooltip';
const opts = {
timeZone: currentTimezone === 'TAI' ? 'UTC' : currentTimezone,
year: 'numeric', month: 'short', day: 'numeric',
hour: '2-digit', minute: '2-digit', second: '2-digit',
hour12: false
};
const startStr = formatCobieTimestamp(ev.cobStart);
const endStr = formatCobieTimestamp(ev.cobEnd);
const startDate = fromCobiets(ev.cobStart).toLocaleString('en-US', opts);
const endDate = fromCobiets(ev.cobEnd).toLocaleString('en-US', opts);
tooltip.innerHTML =
`<strong>${ev.label}</strong><br>` +
`Start: ${startStr}<br>` +
`End: ${endStr}<br>` +
`${startDate} ${endDate}`;
elem.appendChild(tooltip);
timeline.appendChild(elem); timeline.appendChild(elem);
}); });
} }
@@ -840,6 +875,11 @@ function animateSwipe(direction, onDone) {
const grid = document.getElementById('eonstripGrid'); const grid = document.getElementById('eonstripGrid');
if (!grid) { onDone(); return; } if (!grid) { onDone(); return; }
// Ensure a clean starting state when the grid was previously hidden
grid.style.transition = 'none';
grid.style.transform = 'translateX(0)';
void grid.offsetWidth; // force reflow
// slide out // slide out
grid.style.transition = 'transform 0.3s ease'; grid.style.transition = 'transform 0.3s ease';
grid.style.transform = `translateX(${direction > 0 ? '-100%' : '100%'})`; grid.style.transform = `translateX(${direction > 0 ? '-100%' : '100%'})`;
+48 -18
View File
@@ -401,32 +401,54 @@
.detail-timeline { .detail-timeline {
position: relative; position: relative;
height: 400px; height: 400px;
border-left: 2px solid #00ffff; border-left: 3px solid #00ffff;
margin-left: 40px; margin-left: 40px;
overflow: hidden; overflow-x: visible;
overflow-y: hidden;
} }
.timeline-block { .timeline-block {
position: absolute; position: absolute;
left: -40px; left: -40px;
width: calc(100% + 40px); width: calc(100% + 40px);
border-top: 1px dashed rgba(255,255,255,0.2); text-align: right;
color: #aaa; padding-right: 4px;
font-size: 0.8em; border-top: 1px dashed rgba(0,255,255,0.5);
color: #00ffff;
font-size: 0.9em;
font-weight: 600;
padding-top: 2px; padding-top: 2px;
text-shadow: 0 0 4px #00ffff;
pointer-events: none;
z-index: 5;
}
.current-time-line {
position: absolute;
left: -40px;
width: calc(100% + 40px);
border-top: 2px solid #ff00ff;
color: #ff00ff;
font-size: 0.9em;
font-weight: 600;
padding-top: 2px;
text-shadow: 0 0 4px #ff00ff;
pointer-events: none;
z-index: 6;
} }
.event-box, .event-line { .event-box, .event-line {
position: absolute; position: absolute;
left: 0; left: 0;
background: rgba(255,0,255,0.3); background: rgba(255,0,255,0.4);
border: 1px solid rgba(0,255,255,0.5); border: 1px solid rgba(0,255,255,0.7);
border-radius: 4px; border-radius: 4px;
padding: 2px 4px; padding: 2px 4px;
color: #fff; color: #fff;
font-size: 0.7em; font-size: 0.75em;
overflow: hidden; overflow: visible;
white-space: nowrap; white-space: nowrap;
z-index: 3;
} }
.event-line { .event-line {
@@ -443,17 +465,25 @@
.event-line .event-label, .event-line .event-label,
.event-box.small-event .event-label { .event-box.small-event .event-label {
position: absolute; position: absolute;
left: 100%; bottom: 100%;
top: 50%; left: 50%;
transform: translateY(-50%); transform: translate(-50%, -2px);
margin-left: 4px; margin-bottom: 2px;
background: rgba(255,0,255,0.3); background: rgba(255,0,255,0.5);
border: 1px solid rgba(0,255,255,0.5); border: 1px solid rgba(0,255,255,0.8);
border-radius: 4px; border-radius: 4px;
padding: 2px 4px; padding: 2px 6px;
white-space: nowrap; white-space: nowrap;
color: #fff; color: #fff;
font-size: 0.7em; font-size: 0.75em;
font-weight: 600;
text-shadow: 0 0 4px #ff00ff;
z-index: 4;
}
.event-box:hover .tooltip,
.event-line:hover .tooltip {
opacity: 1;
} }
/* Layout combining current time and analog clock */ /* Layout combining current time and analog clock */
@@ -628,7 +658,7 @@ body.fullscreen-clock .calendar-view,
body.fullscreen-clock .detail-view, body.fullscreen-clock .detail-view,
body.fullscreen-clock .time-details, body.fullscreen-clock .time-details,
body.fullscreen-clock .explanations { body.fullscreen-clock .explanations {
display: none; display: none !important;
} }
body.fullscreen-clock .time-display { body.fullscreen-clock .time-display {