Elf M. Sternberg
||3 months ago|
|original||2 years ago|
|src||3 months ago|
|.eslintrc.json||3 months ago|
|.gitignore||2 years ago|
|.pre-commit-config.yaml||2 years ago|
|.prettierrc||3 months ago|
|LICENSE.md||2 years ago|
|README.md||2 years ago|
|custom-elements.json||3 months ago|
|index.html||3 months ago|
|package-lock.json||3 months ago|
|package.json||3 months ago|
|tsconfig.json||3 months ago|
|vite.config.js||2 years ago|
It's nostalgia week at Pendorwright Labs, where toy programs are the order of the day. DominoClock is a simulation (or a re-implementation) of a nifty electromechanical watch I saw back about 25 years ago; it was a watch with a domino face, and the points on it elevated as the minutes slipped by. It was kinda-sorta meant for the blind, so re-implementing it as a web application is a bit silly. It only has a resolution of every five minutes, so implementing the seconds hand is also a bit silly, but it lets you see that the clock is working as planned.
orginal/ folder, you'll find the Java (!) program I wrote back
in 1996. This is literally my first and, if memory serves me correctly,
only Java applet I ever wrote. It's written in Java so old it may even
be before Java 1.0 was released. Sun used to send a sales team to nerdy
offices and, while the main guy talked to the managers, the sales
engineer would slip the devs a CD or two with labels like "Java 0.9
beta" and "Sun Proprietary - Not for general release" handwritten on
them. By the time management got around to asking the nerds, "Have you
heard about this Java thing?" we'd already been playing with it for
I just wanted to see it again.
I also wanted to practice a bit more with web components. I think they're more important than React, and I have a strong preference for the way they integrate with the browser ecosystem rather than fight against it the way React does.
$ npm install $ npm run dev
It'll be on port 3000.
It's written using the original colors I chose back in 1996, so it's
more than a bit ugly. This version, though, has rounded corners and
dots, so there's that. It does respond to a variety of CSS variables, so
you can change the size and colors. I really should make it resize
the faces in response to the overall size of the container allocated to
<domino-clock /> component, but that's a future task.
There is a demo: The Domino Clock.
- Add a few more CSS variables.
- Make it respond to the size of the container, rather than forcing its size.
- Make the faces aria-compliant.
aria-valuenowseems like the safest bet.
This code is released under the Mozilla 2.0 Public License. A copy of the License File is included in this folder.