mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
build: the themes ship compiled, libsass is no longer installed
A theme change compiled Bootswatch with libsass (34 MB, upstream deprecated) into two tracked files, which updates, rollbacks and new Docker containers then reset. The 27 themes now ship as static/css/themes/<theme>.min.css, built by "manage.py build_themes"; the Settings page only saves the theme name and every page links that file (zephyr when no settings are in context, as on the 500 page). libsass moves to dev/requirements.txt; a test checks that each shipped file is its theme compiled from dev/scss. The "Theme SASS Path" setting is removed, and the theme default "flaty", a typo that never applied, becomes zephyr, the theme those installs showed. The update and rollback steps restore an older version's rewritten theme files only where they are modified.
This commit is contained in:
parent
28a73519d7
commit
41468c700d
43 changed files with 315 additions and 298 deletions
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
|
@ -154,12 +154,12 @@ jobs:
|
|||
done
|
||||
|
||||
- name: Import Compiled Dependencies
|
||||
run: docker exec wvc /srv/webvirtcloud/venv/bin/python3 -c "import libvirt, ldap, lxml.etree, psycopg, sass"
|
||||
run: docker exec wvc /srv/webvirtcloud/venv/bin/python3 -c "import libvirt, ldap, lxml.etree, psycopg"
|
||||
|
||||
# Static URLs carry no version: browsers must revalidate them
|
||||
- name: Static Files Revalidated
|
||||
run: |
|
||||
url=http://127.0.0.1:8080/static/css/wvc-main.min.css
|
||||
url=http://127.0.0.1:8080/static/css/themes/zephyr.min.css
|
||||
header() { tr -d '\r' | awk -v h="$1" 'tolower($0) ~ "^" h ":" {sub(/^[^:]*: */, ""); print}'; }
|
||||
h=$(curl -s -m 5 -D - -o /dev/null "$url")
|
||||
[ "$(echo "$h" | header cache-control)" = no-cache ] || { echo "$h"; exit 1; }
|
||||
|
|
@ -168,7 +168,7 @@ jobs:
|
|||
h=$(curl -s -m 5 -D - -o /dev/null -H "If-None-Match: $etag" "$url")
|
||||
echo "$h" | head -1 | grep -q " 304" || { echo "$h"; exit 1; }
|
||||
[ "$(echo "$h" | header cache-control)" = no-cache ]
|
||||
docker exec wvc sh -c 'echo "/* changed */" >> /srv/webvirtcloud/staticfiles/css/wvc-main.min.css'
|
||||
docker exec wvc sh -c 'echo "/* changed */" >> /srv/webvirtcloud/staticfiles/css/themes/zephyr.min.css'
|
||||
h=$(curl -s -m 5 -D - -o /dev/null -H "If-None-Match: $etag" "$url")
|
||||
echo "$h" | head -1 | grep -q " 200" || { echo "$h"; exit 1; }
|
||||
new=$(echo "$h" | header etag)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue