-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.py
More file actions
57 lines (52 loc) · 1.38 KB
/
layout.py
File metadata and controls
57 lines (52 loc) · 1.38 KB
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
import dash_bootstrap_components as dbc
from dash import dcc, html
from pages import home_page
SIDEBAR_STYLE = {
"position": "fixed",
"top": 0,
"left": 0,
"bottom": 0,
"width": "13vw",
"min-width": "13rem",
"padding": "2rem 1rem",
"background-color": "#f8f9fa",
}
# the styles for the main content position it to the right of the sidebar and
# add some padding.
CONTENT_STYLE = {
"margin-left": "10rem",
"margin-right": "10rem",
"padding": "2rem 1rem",
}
sidebar = html.Div(
[
html.H2("MultiDest", className="display-6", style={"size": "2rem"}),
dbc.Fade(
html.I("by It's Saturday"),
id="subtitle-fade",
class_name="text-muted",
is_in=True,
appear=True,
style={"transition": "all 1.5s ease"},
),
html.Hr(),
dbc.Nav(
[
dbc.NavLink("Home", href="/", active="exact"),
dbc.NavLink("About", href="/about", active="exact"),
dbc.NavLink("Contact Us", href="/contact", active="exact"),
],
vertical=True,
pills=True,
),
],
style=SIDEBAR_STYLE,
)
content = html.Div(
[
home_page.layout,
], # Default on load is home_page
id="page-content",
style=CONTENT_STYLE,
)
layout = html.Div([dcc.Location(id="url"), sidebar, content])