mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 19:56:48 +00:00
build(deps): Bootstrap and Bootswatch 5.3.8
Bootstrap SCSS, the JS bundle and the Bootswatch themes go from 5.3.3 to 5.3.8 (bug fixes only), and wvc-main.min.css is recompiled from zephyr. Bootswatch now gives table text the body color, and Lux drops card and modal header borders. Tests compile every theme with the pinned libsass and check that the shipped CSS is zephyr from these sources. The update and rollback steps put back the two files a theme change rewrites, or git refuses to pull over them.
This commit is contained in:
parent
c23521bcf4
commit
d4f04cbf1e
80 changed files with 701 additions and 246 deletions
33
appsettings/test_themes.py
Normal file
33
appsettings/test_themes.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
"""The themes in dev/scss/wvc-themes compile with the pinned libsass, and the
|
||||
shipped wvc-main.min.css is the default theme compiled from these sources."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import sass
|
||||
from django.conf import settings
|
||||
from django.test import SimpleTestCase
|
||||
|
||||
SCSS = Path(settings.BASE_DIR, "dev", "scss")
|
||||
|
||||
|
||||
def compile_theme(theme):
|
||||
# the imports the settings view compiles
|
||||
return sass.compile(
|
||||
string=f"@import '{SCSS}/wvc-themes/{theme}/variables';\n"
|
||||
f"@import '{SCSS}/bootstrap-overrides.scss';\n"
|
||||
f"@import '{SCSS}/wvc-themes/{theme}/bootswatch';",
|
||||
output_style="compressed",
|
||||
)
|
||||
|
||||
|
||||
class ThemeTests(SimpleTestCase):
|
||||
def test_every_theme_compiles(self):
|
||||
themes = sorted(p.name for p in (SCSS / "wvc-themes").iterdir() if p.is_dir())
|
||||
self.assertIn("zephyr", themes)
|
||||
for theme in themes:
|
||||
with self.subTest(theme=theme):
|
||||
self.assertIn(".btn", compile_theme(theme))
|
||||
|
||||
def test_the_shipped_css_is_zephyr_from_these_sources(self):
|
||||
shipped = Path(settings.BASE_DIR, "static", "css", "wvc-main.min.css").read_text()
|
||||
self.assertEqual(shipped, compile_theme("zephyr"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue