1# On "all" and on a shelf's tab, the sort and the globe still apply: by2# name is one list a to z, and the globe keeps only repos with a site, the3# panel's head counting what it shows; a panel with none says so.4. "$(dirname "$0")/../lib.sh"5user dami6for r in chess go notes blog; do7 repo "dami/$r"8 clone dami "dami/$r" "$T/w/$r"9 tick 360010 at "$T/w/$r" commit "first"11 push_as dami "$T/w/$r" origin main12done13printf 'games\n' >"$FORGE_ROOT/dami/chess.git/category"14printf 'games\n' >"$FORGE_ROOT/dami/go.git/category"15printf 'tools\n' >"$FORGE_ROOT/dami/notes.git/category"16push_as dami "$T/w/notes" origin "$(site_commit "$T/w/notes" docs):refs/sites/docs"17export FORGE_STRICT=118build19i=$FORGE_WWW/dami/index.html20page() { node --no-warnings "$T_HOME/test/page.ts" shelves "$i" "$@"; }21eq "$(page click '[data-sort="name"]')" "all 4: blog chess go notes"22eq "$(page click '[data-shelves] a[data-shelf="games"]' click '[data-sort="name"]')" "games 2: chess go"23eq "$(page click '[data-has-site]')" "all 1: notes"24eq "$(page click '[data-has-site]' click '[data-shelves] a[data-shelf="games"]')" "empty: No repos here have a site."