diff --git a/assets/gui/css/advanced-material-alas.css b/assets/gui/css/advanced-material-alas.css index 323f7d069..610f1c676 100644 --- a/assets/gui/css/advanced-material-alas.css +++ b/assets/gui/css/advanced-material-alas.css @@ -34,8 +34,7 @@ :root { /* === 色彩系统 === */ --alas-apple-bg: #f5f5f7; - /* 主题样式通过 WebSocket 内联注入,资源路径相对页面解析。 */ - --alas-apple-bg-image: url("static/assets/gui/css/bj.jpg"); + --alas-apple-bg-image: url("https://api.yppp.net/api.php"); --alas-apple-bg-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E"); --alas-apple-card-bg: rgba(255, 255, 255, 0.72); --alas-apple-card-bg-solid: #ffffff; diff --git a/tests/test_webui_static_assets.py b/tests/test_webui_static_assets.py index 1b6a12837..5ea21f77f 100644 --- a/tests/test_webui_static_assets.py +++ b/tests/test_webui_static_assets.py @@ -73,7 +73,7 @@ def test_default_pywebio_assets_are_self_hosted(self): self.assertIn('href="pywebio_static/css/app.css?v=', response.text) self.assertNotIn("cdn.jsdelivr.net", response.text) - def test_theme_assets_do_not_depend_on_external_font_services(self): + def test_theme_keeps_random_background_without_external_font_services(self): theme_css = (PROJECT_ROOT / "assets/gui/css/advanced-material-alas.css").read_text( encoding="utf-8" ) @@ -83,13 +83,6 @@ def test_theme_assets_do_not_depend_on_external_font_services(self): self.assertNotIn("fonts.googleapis.com", theme_css) self.assertNotIn("fonts.gstatic.com", theme_css) - self.assertNotIn("api.yppp.net", theme_css) + self.assertIn('url("https://api.yppp.net/api.php")', theme_css) self.assertNotIn("fonts.googleapis.com", obs_overlay) self.assertNotIn("fonts.gstatic.com", obs_overlay) - self.assertIn('url("static/assets/gui/css/bj.jpg")', theme_css) - self.assertEqual( - urljoin( - "https://example.test/azur/", "static/assets/gui/css/bj.jpg" - ), - "https://example.test/azur/static/assets/gui/css/bj.jpg", - )