diff --git a/css/theme/source/company.scss b/css/theme/source/company.scss index cc8b20a7..b186b38f 100644 --- a/css/theme/source/company.scss +++ b/css/theme/source/company.scss @@ -22,7 +22,8 @@ $headingColor: $companyBlue; $headingTextTransform: none; $mainFont: "Museo", "Palatino Linotype", "Book Antiqua", "Palatino", serif; -$headingFont: "Museo Sans", "Palatin Linotype", "Book Antiqua", "Palatino", serif; +$headingFont: "Museo Sans", "Palatin Linotype", "Book Antiqua", "Palatino", + serif; $linkColor: $companyBlueDark; $linkColorHover: $companyBlue; diff --git a/justfile b/justfile index f4f44876..9930b052 100644 --- a/justfile +++ b/justfile @@ -11,7 +11,6 @@ present: package: npm run package -bake-logo: +bake-logo mime="svg": cd "{{root_dir}}" && \ - repl=$(cat css/theme/source/files/company-logo.svg | base64 -w 0| sed "s/\+/\\\+/g") && \ - sed -i -E "s@background-image(.*);base64,.*\"@background-image\1;base64,$repl\"@" css/theme/source/company.scss + tools/bake-logo.sh "{{mime}}" diff --git a/tools/bake-logo.sh b/tools/bake-logo.sh index e2abefa4..c1f69278 100755 --- a/tools/bake-logo.sh +++ b/tools/bake-logo.sh @@ -21,9 +21,10 @@ function clean_up() { [ -f "$temp" ] && rm -rf "$temp" } -repl=$(cat "$ROOT_DIR/css/theme/source/files/company-logo.png" | base64 -w 0 | sed "s/\+/\\\+/g") +repl=$(base64 -w 0 <"$ROOT_DIR/css/theme/source/files/company-logo.$type" | sed "s/\+/\\\+/g") temp=$(mktemp) # shellcheck disable=SC2028 +echo "Baking logo into 'company.scss'..." printf 's@background-image(.*);base64,.*"@background-image: url("data:image/%s;base64,%s"@' "$mime" "$repl" >"$temp" sed -i -E -f "$temp" "$ROOT_DIR/css/theme/source/company.scss"