clone

a personal forge on plain git: static pages, stacked-diff reviews, signed local ci, repo sites and releases

main
forge / test / scenarios / times-columns.sh
times-columns.sh 1.8K
1# A time in its own column is compact; a time in a sentence reads as one2# (DESIGN.md, Times). Both are a <time> with the moment, in UTC, in its3# datetime and title, and the page has the day, as short as what ui.ts4# puts there: "Sep 1", or "2025-03-01" from an earlier year. In the home5# page's recent feed, the commits log and the reviews list it is compact;6# in the profiles' "active ..." and a commit page's byline it is marked7# data-ago, for ui.ts to say "5m ago".8. "$(dirname "$0")/../lib.sh"9user dami10repo dami/greet11clone dami dami/greet "$T/w/d"12at "$T/w/d" sh -c 'echo old >old.txt && git add old.txt && GIT_AUTHOR_DATE="@1740830400 +0000" git commit -q -m "long ago"'13old=$(git -C "$T/w/d" rev-parse HEAD)14at "$T/w/d" commit "first"15push_as dami "$T/w/d" origin main16tick17at "$T/w/d" commit "a change"18push_as dami "$T/w/d" -o 'title=Say it louder' origin HEAD:dami/change19export FORGE_STRICT=120build21col='<time datetime="2026-09-01T00:00:00Z" title="2026-09-01 00:00 UTC">Sep 1</time>'22i=$FORGE_WWW/index.html23has "$i" "<b>greet</b> first</a>$col</li>"24has "$i" 'active <time datetime="2026-09-01T00:0[0-9]:00Z" title="2026-09-01 00:0[0-9] UTC" data-ago>Sep 1</time>'25p=$FORGE_WWW/dami/greet/log/main/index.html26has "$p" '>first</a></td><td class="nowrap">[^<]*</td><td class="date"><time datetime="2026-09-01T00:0[0-9]:00Z" title="2026-09-01 00:0[0-9] UTC">Sep 1</time></td>'27has "$p" '>long ago</a></td><td class="nowrap">[^<]*</td><td class="date"><time datetime="2025-03-01T12:00:00Z" title="2025-03-01 12:00 UTC">2025-03-01</time></td>'28has "$FORGE_WWW/dami/greet/commit/$old/index.html" 'committed <time datetime="2025-03-01T12:00:00Z" title="2025-03-01 12:00 UTC" data-ago>Mar 1, 2025</time>'29has "$FORGE_WWW/dami/greet/reviews/index.html" '<span class="date"><time datetime="2026-09-01T00:01:00Z" title="2026-09-01 00:01 UTC">Sep 1</time></span>'