Files
if 6709c8c752 BeFree Gantry 1.0.0: GPLv3 Gantry 5 theme (BeFree x if.finance meld)
- Gantry 5 theme derived from Hydrogen 5.6.4 (GPLv2+), relicensed GPLv3+
- 6 contrast-checked style presets, 7 layout presets with admin thumbnails
- BeFree Meld style section, Sister Site particle, bundled OFL fonts
- Chart/TradingView embeds untouched except the copyright-link color
- README with previews, CHANGELOG, LICENSE, build and test tools
2026-11-01 01:19:14 -06:00

19 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Local render test helper: sync theme into the local WP, apply a style preset / layout, screenshot.
# Usage: wp_test.sh sync | preset <presetN> | layout <name> | shot <file> <w,h> <url>
WP=/workspace/bfg-test/wordpress; TH=$WP/wp-content/themes/befree-gantry; OUT=/workspace/befree-gantry/test
case "$1" in
sync) rsync -a --delete --exclude custom /workspace/befree-gantry/repo/befree-gantry/ $TH/; rm -rf $TH/custom/css-compiled ;;
preset) python3 - "$2" "$TH" <<'PY'
import yaml,sys
p=yaml.safe_load(open(sys.argv[2]+'/gantry/presets.yaml'))[sys.argv[1]]['styles']
p['preset']=sys.argv[1]
for o in ['default','home']:
import os; os.makedirs(f'{sys.argv[2]}/custom/config/{o}',exist_ok=True)
yaml.safe_dump(p,open(f'{sys.argv[2]}/custom/config/{o}/styles.yaml','w'))
PY
rm -rf $TH/custom/css-compiled ;;
layout) if [ "$2" = none ]; then rm -f $TH/custom/config/default/layout.yaml; else cp $TH/layouts/$2.yaml $TH/custom/config/default/layout.yaml; fi ;;
shot) timeout 120 google-chrome --headless=new --no-sandbox --disable-gpu --hide-scrollbars --virtual-time-budget=8000 --window-size=$3 --screenshot=$OUT/$2.png "$4" >/dev/null 2>&1; echo "$2.png $(stat -c %s $OUT/$2.png)";;
esac