Skip to content
Snippets Groups Projects
Commit 72f910f9 authored by Vanessa Stehr's avatar Vanessa Stehr
Browse files

Use themes to apply stylesheet globally

parent 1abb1dc8
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,8 @@ import tarfile
import warnings
from bokeh.plotting import curdoc
from bokeh.layouts import column
from bokeh.models import FileInput, Div, CustomJS, Button, TabPanel, Tabs, Dropdown, GlobalInlineStyleSheet
from bokeh.models import FileInput, Div, CustomJS, Button, TabPanel, Tabs, Dropdown, InlineStyleSheet
from bokeh.themes import Theme
from pyDsiVectorsAndTables.pyDsiVectorsAndTables import (
dsiVector,
dsiMultiVector,
......@@ -32,6 +33,13 @@ class page:
curdoc().template_variables["VERSION"] = VERSION
curdoc().add_root(self.tabs)
curdoc().theme = Theme(
json=dict(
attrs=dict(
UIElement=dict(stylesheets=[self.stylesheet]),
),
),
)
# curdoc().add_root(self.fileUploader.layout)
# curdoc().add_root(self.fileDownloader.layout)
# curdoc().add_root(self.dataView.layout)
......@@ -290,5 +298,5 @@ class fileDownloader:
self.fileDownloadMessage.css_classes = css_classes
stylesheet = GlobalInlineStyleSheet(css = open("static/css/styles.css").read())
stylesheet = InlineStyleSheet(css = open("static/css/styles.css").read())
thisPage = page(stylesheet)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment