Run details
- Model
- amazon/ergo-1.0
- Route
- OpenRouter API
- Served by
- Reka
- Effort
- model default
- Limits
- 60 min · 131,072 output tokens (model max)
- Date
- 2 Dec 2026
- Time
- 4 min 14 s
- Size
- 26 kB
- Tokens
- 125 in, 23,938 out (13,780 thinking)
- List price
- $0.072 at today's price ($1.00 in / $3.00 out per M)
- Paid
- $0.072
Prompt
Draw a mechanical wristwatch that shows the current local time, with a sweeping seconds hand and a date window. Make it look expensive. It must be one complete, self-contained HTML file: inline all CSS and JavaScript, and make no network requests of any kind (no CDNs, web fonts or remote images). Reply with the file in a single ```html code block.
Source
26 kB 678 lines Raw
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aurelion Automatic — Local Time</title>
<style>
:root {
color-scheme: dark;
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
min-height: 100%;
margin: 0;
}
body {
overflow: hidden;
background:
radial-gradient(ellipse at 50% 35%, #363735 0%, #202225 35%, #101215 67%, #07080a 100%);
font-family: Georgia, "Times New Roman", serif;
}
body::before {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background:
radial-gradient(ellipse at 50% 43%, rgba(232, 196, 137, 0.075), transparent 40%),
linear-gradient(115deg, rgba(255,255,255,0.018), transparent 30%, transparent 70%, rgba(255,255,255,0.012));
}
.scene {
position: relative;
display: grid;
place-items: center;
width: 100%;
height: 100vh;
height: 100svh;
isolation: isolate;
}
.scene::after {
content: "";
position: absolute;
z-index: -1;
left: 50%;
bottom: 2%;
width: min(62vw, 620px);
height: 10vh;
transform: translateX(-50%);
border-radius: 50%;
background: rgba(0, 0, 0, 0.46);
filter: blur(28px);
pointer-events: none;
}
.watch {
display: block;
width: min(96vw, 760px);
height: 97vh;
height: 97svh;
overflow: visible;
filter:
drop-shadow(0 28px 26px rgba(0, 0, 0, 0.52))
drop-shadow(0 5px 7px rgba(0, 0, 0, 0.58));
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
</style>
</head>
<body>
<main class="scene">
<svg id="watch" class="watch" viewBox="140 0 660 1000"
xmlns="http://www.w3.org/2000/svg"
role="img" aria-labelledby="watchTitle watchDescription"
preserveAspectRatio="xMidYMid meet">
<title id="watchTitle">Aurelion automatic mechanical wristwatch</title>
<desc id="watchDescription">
An 18-karat rose-gold-colored watch with a deep blue guilloché dial,
applied hour markers, a date window at three o’clock, and smoothly
sweeping hour, minute, and seconds hands showing the current local time.
</desc>
<defs>
<!-- Precious-metal finishes -->
<linearGradient id="caseGold" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#714027"/>
<stop offset="12%" stop-color="#c18451"/>
<stop offset="27%" stop-color="#f5d8a2"/>
<stop offset="40%" stop-color="#fff0bd"/>
<stop offset="55%" stop-color="#b87543"/>
<stop offset="76%" stop-color="#e7b979"/>
<stop offset="100%" stop-color="#673820"/>
</linearGradient>
<linearGradient id="bezelGold" x1="15%" y1="0%" x2="85%" y2="100%">
<stop offset="0%" stop-color="#fff0bd"/>
<stop offset="18%" stop-color="#b87847"/>
<stop offset="39%" stop-color="#f2cc91"/>
<stop offset="61%" stop-color="#8a4d2e"/>
<stop offset="82%" stop-color="#e8b97b"/>
<stop offset="100%" stop-color="#ffebad"/>
</linearGradient>
<linearGradient id="appliedGold" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#8b512f"/>
<stop offset="30%" stop-color="#f6d99f"/>
<stop offset="48%" stop-color="#fff1bd"/>
<stop offset="70%" stop-color="#c1834e"/>
<stop offset="100%" stop-color="#744024"/>
</linearGradient>
<linearGradient id="handGold" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stop-color="#7c472b"/>
<stop offset="32%" stop-color="#dca766"/>
<stop offset="50%" stop-color="#fff0b5"/>
<stop offset="52%" stop-color="#c18349"/>
<stop offset="100%" stop-color="#6e3b23"/>
</linearGradient>
<linearGradient id="dateGold" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#fff0b6"/>
<stop offset="35%" stop-color="#b77743"/>
<stop offset="70%" stop-color="#f0c587"/>
<stop offset="100%" stop-color="#734027"/>
</linearGradient>
<linearGradient id="dateDisk" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#b9b5a9"/>
<stop offset="17%" stop-color="#f4f0e4"/>
<stop offset="50%" stop-color="#fffdf4"/>
<stop offset="82%" stop-color="#e5dfd1"/>
<stop offset="100%" stop-color="#aaa598"/>
</linearGradient>
<!-- Dial -->
<radialGradient id="dialBlue" cx="34%" cy="25%" r="82%">
<stop offset="0%" stop-color="#214c62"/>
<stop offset="28%" stop-color="#103449"/>
<stop offset="63%" stop-color="#071c2c"/>
<stop offset="100%" stop-color="#020910"/>
</radialGradient>
<radialGradient id="dialDepth" cx="50%" cy="46%" r="60%">
<stop offset="0%" stop-color="#236079" stop-opacity="0.2"/>
<stop offset="65%" stop-color="#061522" stop-opacity="0"/>
<stop offset="100%" stop-color="#000306" stop-opacity="0.55"/>
</radialGradient>
<linearGradient id="dialRim" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#32566a"/>
<stop offset="22%" stop-color="#07131d"/>
<stop offset="70%" stop-color="#020609"/>
<stop offset="100%" stop-color="#284150"/>
</linearGradient>
<radialGradient id="sapphireGlass" cx="29%" cy="19%" r="84%">
<stop offset="0%" stop-color="#ffffff" stop-opacity="0.12"/>
<stop offset="30%" stop-color="#b9e2ef" stop-opacity="0.025"/>
<stop offset="68%" stop-color="#8bb7ca" stop-opacity="0"/>
<stop offset="100%" stop-color="#00050a" stop-opacity="0.34"/>
</radialGradient>
<linearGradient id="glassGlare" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#d8f3ff" stop-opacity="0.15"/>
<stop offset="45%" stop-color="#a4d3e5" stop-opacity="0.035"/>
<stop offset="100%" stop-color="#ffffff" stop-opacity="0"/>
</linearGradient>
<!-- Strap -->
<linearGradient id="strapLeather" x1="318" y1="0" x2="582" y2="0"
gradientUnits="userSpaceOnUse">
<stop offset="0%" stop-color="#030405"/>
<stop offset="9%" stop-color="#111518"/>
<stop offset="30%" stop-color="#282b2d"/>
<stop offset="48%" stop-color="#343333"/>
<stop offset="67%" stop-color="#1c2023"/>
<stop offset="91%" stop-color="#0b0d0f"/>
<stop offset="100%" stop-color="#020304"/>
</linearGradient>
<pattern id="alligator" width="28" height="32" patternUnits="userSpaceOnUse">
<path d="M0 8 L7 3 L14 8 L21 3 L28 8
M0 24 L7 19 L14 24 L21 19 L28 24
M7 3 V19 M21 3 V19
M0 24 V32 M14 24 V32 M28 24 V32"
fill="none" stroke="#020304" stroke-width="1.2" opacity="0.8"/>
<path d="M1 9 L7 5 L13 9 M15 25 L21 21 L27 25
M1 25 L7 21 L13 25 M15 9 L21 5 L27 9"
fill="none" stroke="#66615a" stroke-width="0.55" opacity="0.25"/>
</pattern>
<pattern id="guilloche" width="24" height="12" patternUnits="userSpaceOnUse">
<path d="M0 6 Q6 0 12 6 T24 6"
fill="none" stroke="#a8cbd7" stroke-width="0.6" opacity="0.24"/>
<path d="M0 6 Q6 12 12 6 T24 6"
fill="none" stroke="#00101a" stroke-width="0.7" opacity="0.6"/>
<circle cx="6" cy="3" r="0.45" fill="#d2e7ed" opacity="0.18"/>
<circle cx="18" cy="9" r="0.45" fill="#d2e7ed" opacity="0.18"/>
</pattern>
<filter id="handShadow" x="-70%" y="-40%" width="240%" height="200%">
<feDropShadow dx="0" dy="5" stdDeviation="3.5"
flood-color="#000000" flood-opacity="0.72"/>
</filter>
<filter id="smallShadow" x="-60%" y="-60%" width="220%" height="220%">
<feDropShadow dx="0" dy="2" stdDeviation="1.7"
flood-color="#000000" flood-opacity="0.8"/>
</filter>
<filter id="dateShadow" x="-50%" y="-60%" width="200%" height="230%">
<feDropShadow dx="0" dy="3" stdDeviation="2.5"
flood-color="#000000" flood-opacity="0.85"/>
</filter>
<filter id="caseBlur" x="-40%" y="-40%" width="180%" height="180%">
<feGaussianBlur stdDeviation="15"/>
</filter>
<clipPath id="dialClip">
<circle cx="450" cy="500" r="225"/>
</clipPath>
<path id="topStrap"
d="M318 0 H582 V244 Q582 278 550 296 H350 Q318 278 318 244 Z"/>
<path id="bottomStrap"
d="M318 704 H582 V956 Q582 990 548 1000 H352 Q318 990 318 956 Z"/>
</defs>
<!-- Soft shadow cast onto the surface behind the watch -->
<ellipse cx="478" cy="526" rx="289" ry="353"
fill="#000000" opacity="0.28" filter="url(#caseBlur)"/>
<!-- Upper leather strap -->
<use href="#topStrap" fill="url(#strapLeather)"/>
<use href="#topStrap" fill="url(#alligator)" opacity="0.7"/>
<path d="M334 4 V239 Q334 263 355 276
M566 4 V239 Q566 263 545 276"
fill="none" stroke="#a58a64" stroke-width="2"
stroke-dasharray="3 8" opacity="0.48"/>
<path d="M323 5 V244 M577 5 V244"
stroke="#777068" stroke-width="1" opacity="0.2"/>
<!-- Lower leather strap -->
<use href="#bottomStrap" fill="url(#strapLeather)"/>
<use href="#bottomStrap" fill="url(#alligator)" opacity="0.7"/>
<path d="M334 746 V954 Q334 976 355 986
M566 746 V954 Q566 976 545 986"
fill="none" stroke="#a58a64" stroke-width="2"
stroke-dasharray="3 8" opacity="0.46"/>
<path d="M323 746 V957 M577 746 V957"
stroke="#777068" stroke-width="1" opacity="0.18"/>
<!-- Rose-gold tang buckle -->
<g filter="url(#smallShadow)">
<rect x="298" y="26" width="304" height="86" rx="21"
fill="none" stroke="url(#caseGold)" stroke-width="12"/>
<rect x="304" y="32" width="292" height="74" rx="16"
fill="none" stroke="#ffe8ac" stroke-opacity="0.38" stroke-width="1.5"/>
<rect x="443" y="27" width="14" height="84" rx="5"
fill="url(#bezelGold)"/>
<path d="M450 34 V128" stroke="url(#caseGold)" stroke-width="7"
stroke-linecap="round"/>
<path d="M445 124 L450 137 L455 124 Z" fill="#d9aa6c"/>
</g>
<!-- Strap keeper and adjustment holes -->
<rect x="311" y="809" width="178" height="31" rx="7"
fill="url(#strapLeather)" stroke="#6b4b32" stroke-width="2"/>
<path d="M316 814 H584 M316 835 H584"
stroke="#b09366" stroke-opacity="0.2"/>
<g fill="#010203" stroke="#74593c" stroke-width="1.5">
<ellipse cx="450" cy="872" rx="8" ry="12"/>
<ellipse cx="450" cy="914" rx="8" ry="12"/>
<ellipse cx="450" cy="956" rx="8" ry="12"/>
</g>
<!-- Sculpted lugs -->
<g fill="url(#caseGold)" stroke="#6d3c24" stroke-width="2">
<path d="M326 231 L275 207 Q252 199 247 228 L213 347
Q254 332 291 298 Z"/>
<path d="M574 231 L625 207 Q648 199 653 228 L687 347
Q646 332 609 298 Z"/>
<path d="M326 769 L275 793 Q252 801 247 772 L213 653
Q254 668 291 702 Z"/>
<path d="M574 769 L625 793 Q648 801 653 772 L687 653
Q646 668 609 702 Z"/>
</g>
<g fill="none" stroke="#ffe8ae" stroke-opacity="0.45" stroke-width="2">
<path d="M275 218 L311 239 M625 218 L589 239
M275 782 L311 761 M625 782 L589 761"/>
</g>
<!-- Fluted winding crown -->
<g filter="url(#smallShadow)">
<rect x="716" y="464" width="65" height="72" rx="19"
fill="url(#bezelGold)" stroke="#6b3b24" stroke-width="2"/>
<path d="M735 471 V529 M745 467 V533 M755 467 V533 M765 471 V529"
stroke="#6f3d27" stroke-width="3" opacity="0.72"/>
<path d="M738 473 V527 M748 469 V531 M758 469 V531"
stroke="#ffe8ad" stroke-width="1" opacity="0.5"/>
<ellipse cx="778" cy="500" rx="8" ry="28"
fill="url(#caseGold)" stroke="#744126" stroke-width="1.5"/>
<path d="M778 480 L783 486 L478 514 L778 520 L773 500 Z"
fill="#6f3c25" opacity="0.65"/>
</g>
<!-- Case and polished bezel -->
<circle cx="450" cy="500" r="292"
fill="url(#caseGold)" stroke="#5c321f" stroke-width="3"/>
<circle cx="450" cy="500" r="285"
fill="none" stroke="#4b2b1d" stroke-width="3"
stroke-dasharray="1 5" opacity="0.48"/>
<circle cx="450" cy="500" r="280"
fill="none" stroke="#ffeab0" stroke-width="2" opacity="0.58"/>
<circle cx="450" cy="500" r="271"
fill="url(#bezelGold)" stroke="#774329" stroke-width="2"/>
<circle cx="450" cy="500" r="256"
fill="#101318" stroke="#f7dca5" stroke-opacity="0.55" stroke-width="2"/>
<circle cx="450" cy="500" r="249"
fill="url(#dialRim)" stroke="#6d4029" stroke-width="2"/>
<circle cx="450" cy="500" r="233"
fill="#03070b" stroke="#d7b276" stroke-opacity="0.35"/>
<circle cx="450" cy="500" r="226" fill="url(#dialBlue)"/>
<!-- Sunburst brushing and hand-engine-turned guilloché -->
<g id="sunburst" clip-path="url(#dialClip)"></g>
<circle cx="450" cy="500" r="222"
fill="url(#guilloche)" opacity="0.66"
clip-path="url(#dialClip)"/>
<circle cx="450" cy="500" r="222" fill="url(#dialDepth)"/>
<!-- Chapter rings -->
<circle cx="450" cy="500" r="217"
fill="none" stroke="#d6b378" stroke-width="1" opacity="0.45"/>
<circle cx="450" cy="500" r="194"
fill="none" stroke="#b99560" stroke-width="0.8" opacity="0.36"/>
<circle cx="450" cy="500" r="190"
fill="none" stroke="#00070c" stroke-width="2" opacity="0.55"/>
<g id="minuteTrack"></g>
<g id="hourMarkers"></g>
<!-- Manufactory signature -->
<g text-anchor="middle" fill="#d9b578">
<path d="M450 351 L454 359 L463 360 L456 366 L458 375
L450 370 L442 375 L444 366 L437 360 L446 359 Z"
fill="url(#appliedGold)" stroke="#6d4229" stroke-width="0.7"/>
<text x="450" y="398"
font-family="Georgia, 'Times New Roman', serif"
font-size="22" letter-spacing="5.2">AURELION</text>
<text x="450" y="418"
font-family="Arial, Helvetica, sans-serif"
font-size="7.5" letter-spacing="3.7" opacity="0.78">MANUFACTURE</text>
<text x="450" y="604"
font-family="Arial, Helvetica, sans-serif"
font-size="9" letter-spacing="3.1" opacity="0.88">AUTOMATIC</text>
<text x="450" y="622"
font-family="Arial, Helvetica, sans-serif"
font-size="7.5" letter-spacing="2.25" opacity="0.7">CHRONOMETER</text>
<path d="M418 633 H482" stroke="#c6a268" stroke-width="0.7" opacity="0.45"/>
<text x="450" y="646"
font-family="Arial, Helvetica, sans-serif"
font-size="6.4" letter-spacing="1.55" opacity="0.62">28 RUBIES · 28800 VPH</text>
<text x="450" y="690"
font-family="Arial, Helvetica, sans-serif"
font-size="6.2" letter-spacing="2.3" opacity="0.52">HAND FINISHED</text>
</g>
<!-- Date aperture at three o'clock -->
<g filter="url(#dateShadow)">
<rect x="548" y="472" width="84" height="56" rx="7"
fill="url(#dateGold)" stroke="#6a3d25" stroke-width="1.5"/>
<rect x="553" y="477" width="74" height="46" rx="3.5"
fill="#020405" stroke="#ffe5a6" stroke-opacity="0.45"/>
<rect x="556" y="480" width="68" height="40" rx="2"
fill="url(#dateDisk)"/>
<path d="M557 482 H623 M557 518 H623"
stroke="#6e6b63" stroke-width="0.7" opacity="0.45"/>
<text id="dateValue" x="590" y="501"
text-anchor="middle" dominant-baseline="central"
font-family="Arial, Helvetica, sans-serif"
font-size="28" font-weight="600" fill="#17191a">01</text>
</g>
<!-- Hour hand: faceted dauphine -->
<g id="hourHand" filter="url(#handShadow)">
<path d="M450 531 L437 506 L441 414 L450 379 L459 414 L463 506 Z"
fill="url(#handGold)" stroke="#f7dda4" stroke-width="0.8"/>
<path d="M450 379 L450 514 L437 506 L441 414 Z"
fill="#7c452a" opacity="0.58"/>
<path d="M450 379 L450 514 L463 506 L459 414 Z"
fill="#ffe7a7" opacity="0.25"/>
<path d="M450 388 V503" stroke="#fff2c2" stroke-width="0.7" opacity="0.65"/>
</g>
<!-- Minute hand: longer, slimmer dauphine -->
<g id="minuteHand" filter="url(#handShadow)">
<path d="M450 535 L440 508 L444 357 L450 321 L456 357 L460 508 Z"
fill="url(#handGold)" stroke="#f9e2ac" stroke-width="0.75"/>
<path d="M450 321 L450 518 L440 508 L444 357 Z"
fill="#7b432a" opacity="0.55"/>
<path d="M450 321 L450 518 L460 508 L456 357 Z"
fill="#ffedba" opacity="0.26"/>
<path d="M450 332 V505" stroke="#fff3c5" stroke-width="0.65" opacity="0.7"/>
</g>
<!-- Continuously sweeping seconds hand -->
<g id="secondHand" filter="url(#smallShadow)">
<path d="M450 545 V309" stroke="#d8a55f" stroke-width="2.1"
stroke-linecap="round"/>
<path d="M450 327 V309" stroke="#ffe8ae" stroke-width="0.8"
stroke-linecap="round"/>
<circle cx="450" cy="533" r="9"
fill="none" stroke="#d8a55f" stroke-width="2"/>
<circle cx="450" cy="533" r="4.5" fill="#09131c"/>
</g>
<!-- Polished central pivot and jewel -->
<g filter="url(#smallShadow)">
<circle cx="450" cy="500" r="13"
fill="url(#bezelGold)" stroke="#ffe8ad" stroke-width="0.8"/>
<circle cx="450" cy="500" r="7.5" fill="#32150f"/>
<circle cx="450" cy="500" r="4.7" fill="#8f2430"/>
<circle cx="448.5" cy="498.3" r="1.5" fill="#ffb4b0" opacity="0.8"/>
</g>
<!-- Domed sapphire crystal reflections -->
<g clip-path="url(#dialClip)" pointer-events="none">
<circle cx="450" cy="500" r="225" fill="url(#sapphireGlass)"/>
<path d="M249 462 C292 264 480 181 664 301
C554 266 392 330 282 493 Z"
fill="url(#glassGlare)" opacity="0.52"/>
<path d="M283 594 C375 714 581 727 668 575
C580 654 421 657 300 556 Z"
fill="#83b7ca" opacity="0.025"/>
<path d="M294 353 A194 194 0 0 1 529 291"
fill="none" stroke="#e5f7ff" stroke-width="2" opacity="0.11"/>
</g>
<!-- Final case glints -->
<path d="M215 344 A286 286 0 0 1 577 219"
fill="none" stroke="#fff2c5" stroke-width="3.2"
stroke-linecap="round" opacity="0.56"/>
<path d="M674 692 A286 286 0 0 1 564 766"
fill="none" stroke="#f6c886" stroke-width="2"
stroke-linecap="round" opacity="0.32"/>
<path d="M190 453 A292 292 0 0 1 205 384"
fill="none" stroke="#fff0bd" stroke-width="2"
stroke-linecap="round" opacity="0.35"/>
</svg>
<p id="accessibleTime" class="sr-only" aria-live="off"></p>
</main>
<script>
(() => {
"use strict";
const SVG_NS = "http://www.w3.org/2000/svg";
const CX = 450;
const CY = 500;
const minuteTrack = document.getElementById("minuteTrack");
const hourMarkers = document.getElementById("hourMarkers");
const sunburst = document.getElementById("sunburst");
const hourHand = document.getElementById("hourHand");
const minuteHand = document.getElementById("minuteHand");
const secondHand = document.getElementById("secondHand");
const dateValue = document.getElementById("dateValue");
const accessibleTime = document.getElementById("accessibleTime");
const watch = document.getElementById("watch");
function svgElement(name, attributes) {
const element = document.createElementNS(SVG_NS, name);
for (const [key, value] of Object.entries(attributes)) {
element.setAttribute(key, String(value));
}
return element;
}
function point(radius, angle) {
return {
x: CX + radius * Math.sin(angle),
y: CY - radius * Math.cos(angle)
};
}
// Extremely fine alternating sectors create a metallic sunburst effect.
const sectorCount = 120;
for (let i = 0; i < sectorCount; i++) {
const a1 = (i / sectorCount) * Math.PI * 2;
const a2 = ((i + 1) / sectorCount) * Math.PI * 2;
const p1 = point(225, a1);
const p2 = point(225, a2);
sunburst.appendChild(svgElement("path", {
d: `M${CX} ${CY} L${p1.x} ${p1.y}
A225 225 0 0 1 ${p2.x} ${p2.y} Z`,
fill: i % 2 === 0 ? "#b9e2ee" : "#00080f",
opacity: i % 2 === 0 ? "0.025" : "0.055"
}));
}
// Sixty individual minute divisions, with stronger five-minute markers.
for (let i = 0; i < 60; i++) {
const angle = i * Math.PI / 30;
const major = i % 5 === 0;
const outer = point(212, angle);
const inner = point(major ? 199 : 204, angle);
minuteTrack.appendChild(svgElement("line", {
x1: outer.x,
y1: outer.y,
x2: inner.x,
y2: inner.y,
stroke: major ? "#e1c18a" : "#9db4bd",
"stroke-width": major ? 2 : 0.9,
"stroke-linecap": "round",
opacity: major ? 0.9 : 0.5
}));
}
// Applied, polished hour batons. The three-o'clock index is replaced
// by the date aperture, and twelve is rendered as a Roman numeral.
for (let hour = 1; hour <= 12; hour++) {
if (hour === 3) continue;
const angleDegrees = hour * 30;
const angle = angleDegrees * Math.PI / 180;
const position = point(176, angle);
if (hour === 12) {
const numeral = svgElement("text", {
x: position.x,
y: position.y + 1,
"text-anchor": "middle",
"dominant-baseline": "central",
"font-family": "Georgia, 'Times New Roman', serif",
"font-size": 29,
"font-weight": "bold",
fill: "url(#appliedGold)",
stroke: "#6b4028",
"stroke-width": 0.45,
filter: "url(#smallShadow)"
});
numeral.textContent = "XII";
hourMarkers.appendChild(numeral);
continue;
}
const cardinal = hour % 3 === 0;
const width = cardinal ? 12 : 9;
const height = cardinal ? 34 : 27;
const group = svgElement("g", {
transform: `translate(${position.x} ${position.y}) rotate(${angleDegrees})`,
filter: "url(#smallShadow)"
});
group.appendChild(svgElement("rect", {
x: -width / 2,
y: -height / 2 + 2,
width,
height,
rx: 3,
fill: "#000307",
opacity: 0.7
}));
group.appendChild(svgElement("rect", {
x: -width / 2,
y: -height / 2,
width,
height,
rx: 3,
fill: "url(#appliedGold)",
stroke: "#ffe7ad",
"stroke-width": 0.65,
"stroke-opacity": 0.65
}));
group.appendChild(svgElement("line", {
x1: -width / 2 + 2,
y1: -height / 2 + 4,
x2: -width / 2 + 2,
y2: height / 2 - 4,
stroke: "#fff2c3",
"stroke-width": 1,
opacity: 0.62,
"stroke-linecap": "round"
}));
hourMarkers.appendChild(group);
}
let previousDate = "";
let previousSecond = -1;
function render() {
const now = new Date();
// Milliseconds are retained deliberately: the seconds hand sweeps
// continuously rather than jumping once per second.
const seconds = now.getSeconds() + now.getMilliseconds() / 1000;
const minutes = now.getMinutes() + seconds / 60;
const hours = (now.getHours() % 12) + minutes / 60;
const secondAngle = seconds * 6;
const minuteAngle = minutes * 6;
const hourAngle = hours * 30;
secondHand.setAttribute(
"transform",
`rotate(${secondAngle} ${CX} ${CY})`
);
minuteHand.setAttribute(
"transform",
`rotate(${minuteAngle} ${CX} ${CY})`
);
hourHand.setAttribute(
"transform",
`rotate(${hourAngle} ${CX} ${CY})`
);
const date = String(now.getDate()).padStart(2, "0");
if (date !== previousDate) {
dateValue.textContent = date;
previousDate = date;
}
if (now.getSeconds() !== previousSecond) {
const localTime = now.toLocaleTimeString([], {
hour: "numeric",
minute: "2-digit",
second: "2-digit"
});
const localDate = now.toLocaleDateString([], {
weekday: "long",
year: "numeric",
month: "long",
day: "numeric"
});
accessibleTime.textContent = `Local time: ${localTime}. ${localDate}.`;
watch.setAttribute(
"aria-label",
`Aurelion automatic watch showing ${localTime} on ${localDate}`
);
previousSecond = now.getSeconds();
}
requestAnimationFrame(render);
}
requestAnimationFrame(render);
})();
</script>
</body>
</html>

