diff --git a/src/App.css b/src/App.css
index f460279..a665b39 100644
--- a/src/App.css
+++ b/src/App.css
@@ -182,3 +182,24 @@
border-right-color: var(--border);
}
}
+
+.berlin-clock {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+}
+
+.seconds-lamp-container {
+ margin-bottom: 4px;
+ display: flex;
+ justify-content: center;
+}
+
+.lamp-row {
+ display: flex;
+ justify-content: center;
+ width: 100%;
+ max-width: 330px;
+ margin: 0 auto;
+}
diff --git a/src/App.tsx b/src/App.tsx
index 13bdaac..c693162 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -3,7 +3,15 @@ import "./App.css";
function App() {
return (
-
+
+
Berlin Clock
+
+ The Berlin Clock (also known as the Mengenlehreuhr) uses lamps to represent the time.
+ The top lamp blinks every second. The next row of four red lamps each represents five hours.
+ The following row of four red lamps each represents one hour.
+ Then the next row of eleven lamps shows five‑minute blocks (every third lamp is red to
+ mark quarter hours). The last row shows the remaining minutes one by one.
+
);
diff --git a/src/components/Lamp.tsx b/src/components/Lamp.tsx
index 2ee0f57..6d73000 100644
--- a/src/components/Lamp.tsx
+++ b/src/components/Lamp.tsx
@@ -14,23 +14,17 @@ function getBackgroundColor(state: LampState): string {
}
function getBorderRadius(variant?: LampProps["variant"]): string {
- switch (variant) {
- case "alone":
- return "50%";
- case "first":
- return "50% 0 0 50%";
- case "last":
- return "0 50% 50% 0";
- default:
- return "0";
- }
+ if (variant === "alone") return "50%";
+ if (variant === "first") return "16px 0 0 16px";
+ if (variant === "last") return "0 16px 16px 0";
+ return "0";
}
export function Lamp({ state, id, variant }: LampProps) {
const style: React.CSSProperties = {
- display: "inline-block",
- width: 20,
- height: 20,
+ display: "block",
+ width: variant === "alone" ? 50 : "100%",
+ height: 50,
backgroundColor: getBackgroundColor(state),
borderRadius: getBorderRadius(variant),
margin: 1,
diff --git a/src/components/LampLine.tsx b/src/components/LampLine.tsx
index 41ac281..9229f1a 100644
--- a/src/components/LampLine.tsx
+++ b/src/components/LampLine.tsx
@@ -11,7 +11,7 @@ export function LampLine({ states, rowTestId }: LampLineProps) {
return (
{states.map((state, index) => {
let variant: "alone" | "first" | "last" | "middle" | undefined;
@@ -25,12 +25,16 @@ export function LampLine({ states, rowTestId }: LampLineProps) {
variant = "middle";
}
return (
-
+ style={{ flex: 1, display: "flex" }}
+ >
+
+
);
})}
diff --git a/src/containers/BerlinClock.tsx b/src/containers/BerlinClock.tsx
index 718063f..69a4de3 100644
--- a/src/containers/BerlinClock.tsx
+++ b/src/containers/BerlinClock.tsx
@@ -11,17 +11,22 @@ export function BerlinClock({ enabled, clock }: BerlinClockProps) {
if (!enabled) return null;
return (
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
);
}
diff --git a/src/containers/TimeConverter.tsx b/src/containers/TimeConverter.tsx
index 904e7cb..6392c90 100644
--- a/src/containers/TimeConverter.tsx
+++ b/src/containers/TimeConverter.tsx
@@ -19,6 +19,12 @@ export function TimeConverter() {
return (
+
+
Use system time
-
-
);
}
diff --git a/src/index.css b/src/index.css
index aad5cb1..b3d019b 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,3 +1,5 @@
+@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&display=swap');
+
:root {
--text: #6b6375;
--text-h: #08060d;
@@ -59,6 +61,8 @@
min-height: 100svh;
display: flex;
flex-direction: column;
+ justify-content: center;
+ align-items: center;
box-sizing: border-box;
}
@@ -109,3 +113,11 @@ code {
padding: 4px 8px;
background: var(--code-bg);
}
+
+.clock-container {
+ font-family: 'Orbitron', monospace;
+}
+
+.clock-container input {
+ font-family: inherit;
+}