diff --git a/themes/bonsai/images/screenshot.png b/themes/bonsai/images/screenshot.png new file mode 100644 index 0000000..5de1f24 Binary files /dev/null and b/themes/bonsai/images/screenshot.png differ diff --git a/themes/bonsai/images/tn.png b/themes/bonsai/images/tn.png new file mode 100644 index 0000000..635d858 Binary files /dev/null and b/themes/bonsai/images/tn.png differ diff --git a/themes/bonsai/scripts/capture-screenshots.sh b/themes/bonsai/scripts/capture-screenshots.sh new file mode 100755 index 0000000..534098f --- /dev/null +++ b/themes/bonsai/scripts/capture-screenshots.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Capture submission assets (images/screenshot.png + images/tn.png) from +# the live demo. Run from repo root. Re-runnable; overwrites existing files. +# +# Requires: npx (installs Playwright on first run, ~170 MB chromium cache) +# Optional: oxipng (lossless PNG compression — recommended) + +set -euo pipefail + +URL="${BONSAI_DEMO_URL:-https://tiennm99.github.io/bonsai/}" +SCREENSHOT="images/screenshot.png" +THUMBNAIL="images/tn.png" + +cd "$(dirname "$0")/.." + +mkdir -p images + +echo "==> Installing Playwright Chromium (cached after first run)" +npx --yes playwright@1.50.0 install chromium + +echo "==> Capturing screenshot.png (1500x1000)" +npx --yes playwright@1.50.0 screenshot \ + --viewport-size=1500,1000 \ + --browser=chromium \ + --color-scheme=light \ + --wait-for-timeout=800 \ + "$URL" "$SCREENSHOT" + +echo "==> Capturing tn.png (900x600)" +npx --yes playwright@1.50.0 screenshot \ + --viewport-size=900,600 \ + --browser=chromium \ + --color-scheme=light \ + --wait-for-timeout=800 \ + "$URL" "$THUMBNAIL" + +if command -v oxipng >/dev/null 2>&1; then + echo "==> Compressing with oxipng" + oxipng -o4 --strip safe "$SCREENSHOT" "$THUMBNAIL" +else + echo "==> oxipng not installed; skipping compression (install for smaller files)" +fi + +echo "==> Done" +file "$SCREENSHOT" "$THUMBNAIL" diff --git a/themes/bonsai/static/css/bonsai.css b/themes/bonsai/static/css/bonsai.css index 5ad81d8..4d7cea8 100644 --- a/themes/bonsai/static/css/bonsai.css +++ b/themes/bonsai/static/css/bonsai.css @@ -148,6 +148,19 @@ body { color: var(--bonsai-accent); } +.link__icon svg { + width: 20px; + height: 20px; + display: block; + fill: currentColor; +} + +/* Lucide UI icons use stroke, not fill */ +.link__icon svg[stroke="currentColor"], +.link__icon svg.lucide { + fill: none; +} + .link__title { line-height: 1; } .bonsai-footer {