Browse Source

configure quasar colors

Falko Schindler 2 years ago
parent
commit
d7a2fb3d45
2 changed files with 11 additions and 2 deletions
  1. 1 1
      nicegui/client.py
  2. 10 1
      nicegui/templates/index.html

+ 1 - 1
nicegui/client.py

@@ -37,7 +37,7 @@ class Client:
 
         self.waiting_javascript_commands: Dict[str, str] = {}
 
-        self.head_html = '<style>body { --q-primary: #5A99FF }</style>'
+        self.head_html = ''
         self.body_html = ''
 
         self.page = page

+ 10 - 1
nicegui/templates/index.html

@@ -88,7 +88,16 @@
           window.socket.on("notify", (msg) => Quasar.Notify.create(msg));
           window.socket.on("disconnect", () => window.location.reload());
         },
-      }).use(Quasar);
+      }).use(Quasar, {
+        config: {
+          brand: {
+            primary: '#5A99FF',
+          },
+          loadingBar: {
+            color: 'primary'
+          },
+        }
+      });
 
       {{ vue_scripts | safe }}
       {{ js_imports | safe }}