funkwhale/front/scripts/fix-fomantic-css.sh

25 wiersze
724 B
Bash
Czysty Zwykły widok Historia

2022-11-24 20:14:59 +00:00
#!/usr/bin/env bash
2021-04-07 07:18:17 +00:00
2022-11-24 20:14:59 +00:00
set -eux
cd "$(dirname "$0")/.." # change into base directory
FOMANTIC_SRC_PATH="node_modules/fomantic-ui-css"
find "$FOMANTIC_SRC_PATH/components" -name "*.min.css" -delete
mkdir -p "$FOMANTIC_SRC_PATH/tweaked"
2020-05-15 12:12:36 +00:00
echo 'Removing google font…'
2022-11-24 20:14:59 +00:00
sed -i '/@import url(/d' "$FOMANTIC_SRC_PATH/components/site.css"
2020-05-15 12:12:36 +00:00
echo "Replacing hardcoded values by CSS vars…"
2022-11-24 20:14:59 +00:00
scripts/fix-fomantic-css.py "$FOMANTIC_SRC_PATH" "$FOMANTIC_SRC_PATH/tweaked"
2022-07-20 18:49:11 +00:00
echo 'Fixing jQuery import…'
# shellcheck disable=SC2046
sed -i '1s/^import jQuery from "jquery"//' $(find "$FOMANTIC_SRC_PATH" -name '*.js')
2022-11-24 20:14:59 +00:00
# shellcheck disable=SC2046
sed -i '1s/^/import jQuery from "jquery"\n/' $(find "$FOMANTIC_SRC_PATH" -name '*.js')