Fix GrampsWeb subpath: patch CSS font paths from ../fonts/ to fonts/ (STI-90)
CSS url() resolves relative to the stylesheet, not <base href>. With
the stylesheet at /ahnenforschung/style.css, url('../fonts/...') resolves
to /fonts/ (root) instead of /ahnenforschung/fonts/. Changed to relative
url('fonts/...') which correctly resolves under the subpath.
Also fixes Material Icons font not loading (menu icons broken).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -233,9 +233,10 @@ services:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for f in /app/static/*.css; do
|
for f in /app/static/*.css; do
|
||||||
if [ -f "$$f" ] && grep -q '"/fonts/' "$$f" 2>/dev/null; then
|
if [ -f "$$f" ] && grep -q 'fonts/' "$$f" 2>/dev/null; then
|
||||||
sed -i "s|\"/fonts/|\"$${SUBPATH}fonts/|g" "$$f"
|
sed -i "s|'../fonts/|'fonts/|g" "$$f"
|
||||||
echo "[grampsweb] patched CSS paths: $$f"
|
sed -i "s|\"../fonts/|\"fonts/|g" "$$f"
|
||||||
|
echo "[grampsweb] patched CSS font paths: $$f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "[grampsweb] Done."
|
echo "[grampsweb] Done."
|
||||||
|
|||||||
@@ -159,9 +159,10 @@ services:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for f in /app/static/*.css; do
|
for f in /app/static/*.css; do
|
||||||
if [ -f "$$f" ] && grep -q '"/fonts/' "$$f" 2>/dev/null; then
|
if [ -f "$$f" ] && grep -q 'fonts/' "$$f" 2>/dev/null; then
|
||||||
sed -i "s|\"/fonts/|\"$${SUBPATH}fonts/|g" "$$f"
|
sed -i "s|'../fonts/|'fonts/|g" "$$f"
|
||||||
echo "[grampsweb] patched CSS paths: $$f"
|
sed -i "s|\"../fonts/|\"fonts/|g" "$$f"
|
||||||
|
echo "[grampsweb] patched CSS font paths: $$f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "[grampsweb] Done."
|
echo "[grampsweb] Done."
|
||||||
|
|||||||
Reference in New Issue
Block a user