-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
55 lines (48 loc) · 1.26 KB
/
main.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
import dash
import dash_bootstrap_components as dbc
external_stylesheets1 = dbc.themes.COSMO
external_stylesheets2 = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(
__name__,
use_pages=True,
external_stylesheets=[external_stylesheets1],
)
navbar = dbc.NavbarSimple([
dbc.Nav(
[
dbc.NavLink(page["name"], href=page["path"])
for page in dash.page_registry.values()
if page.get("top_nav")
],
),
dbc.DropdownMenu(
[
dbc.DropdownMenuItem(page["name"], href=page["path"])
for page in dash.page_registry.values()
if page.get("analytics")
],
nav=True,
label="Analytics",
),
dbc.DropdownMenu(
[
dbc.DropdownMenuItem(page["name"], href=page["path"])
for page in dash.page_registry.values()
if page.get("guide")
],
nav=True,
label="Guides",
)],
brand="Dash board - Energy",
color="primary",
dark=True,
className="mb-2",
)
app.layout = dbc.Container(
[dash.html.Link(rel='stylesheet', href='/assets/style.css'),
navbar,
dash.page_container],
fluid=True,
)
if __name__ == "__main__":
app.run_server(debug=False)