Merge pull request #56 from ok2/codex/fix-analog-clock-markers-positioning

This commit is contained in:
Kiyomichi Kosaka 2025-06-20 00:06:04 +02:00 committed by GitHub
commit 3a2df03eb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -83,9 +83,10 @@
const outerR = baseRadius - 2; // just inside the border
// Distance from center for the marker digits so they sit just inside big ticks
// Distance from center so marker's outer edge sits just inside the big tick
const markerSize = markers[0] ? markers[0].offsetWidth : 0;
const markerRadius = outerR - lenBig - markerSize * getMarkerOffset(clock.offsetWidth);
const inset = baseRadius * 0.001; // 0.1% of the radius
const markerRadius = outerR - lenBig - inset + markerSize / 2;
markers.forEach((m, i) => {
const angle = (i / 16) * 2 * Math.PI;

View File

@ -445,7 +445,8 @@ body.fullscreen-clock .clock-label {
line-height: calc(var(--clock-size) * 0.13);
/* Use a futuristic font for the clock markers */
font-family: 'Orbitron', 'Trebuchet MS', 'Lucida Sans', Arial, sans-serif;
font-size: calc(var(--clock-size) * 0.08);
/* 1% of the clock radius */
font-size: calc(var(--clock-size) * 0.005);
font-weight: 600;
color: #00ffff;
background: none;