-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
58 lines (48 loc) · 1.64 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import dash
import dash_bootstrap_components as dbc
"""
https://github.com/facultyai/dash-bootstrap-components
dash-bootstrap-components provides Bootstrap components.
Plotly Dash is great! However, creating the initial layout can require a lot
of boilerplate. dash-bootstrap-components reduces this boilerplate by providing
standard layouts and high-level components.
A good way to start customising the stylesheet is to use an alternative
pre-compiled theme. Bootswatch is a great place to find new themes. Links to
CDNs for each of the Bootswatch styles are also included , and can be used
with the external_stylesheets argument of the Dash constructor:
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.CERULEAN])
Go to https://bootswatch.com/ to preview these Bootswatch themes:
dbc.themes.BOOTSTRAP
dbc.themes.CERULEAN
dbc.themes.COSMO
dbc.themes.CYBORG
dbc.themes.DARKLY
dbc.themes.FLATLY
dbc.themes.JOURNAL
dbc.themes.LITERA
dbc.themes.LUMEN
dbc.themes.LUX
dbc.themes.MATERIA
dbc.themes.MINTY
dbc.themes.PULSE
dbc.themes.SANDSTONE
dbc.themes.SIMPLEX
dbc.themes.SKETCHY
dbc.themes.SLATE
dbc.themes.SOLAR
dbc.themes.SPACELAB
dbc.themes.SUPERHERO
dbc.themes.UNITED
dbc.themes.YETI
"""
external_stylesheets = [
dbc.themes.FLATLY, # FLATLY theme
'https://use.fontawesome.com/releases/v5.9.0/css/all.css', # for social media icons
]
meta_tags=[
{'name': 'viewport', 'content': 'width=device-width, initial-scale=1'}
]
app = dash.Dash(__name__, external_stylesheets=external_stylesheets, meta_tags=meta_tags)
app.config.suppress_callback_exceptions = True
app.title = 'Toronto Subway Delay' # appears in browser title bar
server = app.server