Agreeable goat

This commit is contained in:
2026-02-01 21:27:52 +02:00
parent 06d5a6a779
commit f283c5e99e
4 changed files with 91 additions and 33 deletions

View File

@@ -131,7 +131,8 @@ var bigColonBlink = []string{
}
// RenderBigClock renders the current time as massive ASCII block digits.
// Format: HH:MM:SS in 24h. The colon blinks every second.
// Format: HH:MM:SS in 24h. The colon blinks on a 500ms cycle (offset from
// the second boundary so it doesn't flip in sync with the digits).
func RenderBigClock(t time.Time) string {
h := t.Hour()
m := t.Minute()
@@ -139,6 +140,9 @@ func RenderBigClock(t time.Time) string {
timeStr := fmt.Sprintf("%02d:%02d:%02d", h, m, s)
// Colon visible for first 500ms of each second, hidden for last 500ms.
colonVisible := t.UnixMilli()%1000 < 500
var lines [7]string
for i := range lines {
var parts []string
@@ -147,7 +151,7 @@ func RenderBigClock(t time.Time) string {
case ch >= '0' && ch <= '9':
parts = append(parts, bigDigits[ch-'0'][i])
case ch == ':':
if s%2 == 0 {
if colonVisible {
parts = append(parts, bigColon[i])
} else {
parts = append(parts, bigColonBlink[i])