# HG changeset patch # User drewp@bigasterisk.com # Date 1717717191 25200 # Node ID deb0c25655ebe7af7985a690a9ce157f5230236f # Parent 4092f674046d0171382cf7b2054ba39ef7badf53 cleanup, add FdClock and Countdown diff -r 4092f674046d -r deb0c25655eb Dockerfile --- a/Dockerfile Thu Jun 06 14:49:34 2024 -0700 +++ b/Dockerfile Thu Jun 06 16:39:51 2024 -0700 @@ -5,5 +5,5 @@ COPY package.json ./ RUN pnpm install --loglevel debug -COPY index.html tsconfig.json vite.config.ts ./ +COPY tsconfig.json vite.config.ts ./ COPY src ./src diff -r 4092f674046d -r deb0c25655eb src/FdClock.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/FdClock.ts Thu Jun 06 16:39:51 2024 -0700 @@ -0,0 +1,28 @@ +import { css, html, LitElement } from "lit"; +import { shared } from "./shared"; + + +export class FdClock extends LitElement { + constructor() { + super(); + setInterval(() => { + this.requestUpdate(); + }, 1000); + } + static styles = [ + shared, + css` + :host { + display: inline block; + } + `, + ]; + render() { + const t = new Date(); + const h = t.getHours().toString().padStart(2, "0"); + const m = t.getMinutes().toString().padStart(2, "0"); + const s = t.getSeconds().toString().padStart(2, "0"); + return html` ${h}:${m.slice(0, 2)}:${s.slice(0, 2)} `; + } +} +customElements.define("fd-clock", FdClock); diff -r 4092f674046d -r deb0c25655eb src/WeekGuide.ts --- a/src/WeekGuide.ts Thu Jun 06 14:49:34 2024 -0700 +++ b/src/WeekGuide.ts Thu Jun 06 16:39:51 2024 -0700 @@ -12,7 +12,8 @@ static styles = [ shared, css` - :host { + :host, + :host > div { display: inline-block; } .wday > span { @@ -48,3 +49,5 @@ `; } } + + diff -r 4092f674046d -r deb0c25655eb src/index.html --- a/src/index.html Thu Jun 06 14:49:34 2024 -0700 +++ b/src/index.html Thu Jun 06 16:39:51 2024 -0700 @@ -10,9 +10,9 @@ - +
- +