-
Notifications
You must be signed in to change notification settings - Fork 1
/
layout.py
160 lines (157 loc) · 10.2 KB
/
layout.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import dash_bootstrap_components as dbc
from dash import dcc, html
# Sidebar layout
sidebar = html.Div(
[
html.Div(
[
html.Img(src='/assets/logo.webp', style={'width': '100%', 'height': 'auto'}),
html.Hr(),
dbc.NavLink([html.I(className="fas fa-home"), " Home"], href="/", style={'fontSize': '16px', 'fontWeight': 'bold'}),
html.Hr(),
dbc.Button(
[html.I(className="fas fa-database"), " Datasets"], id="datasets-button", className="mb-2", n_clicks=0,
style={'fontSize': '16px', 'fontWeight': 'bold', 'backgroundColor': 'transparent', 'border': 'none', 'color': 'green'}
),
dbc.Collapse(
html.Div(
[
html.H2("European Space Agency (ESA)", className="display-0", style={'fontSize': '18px'}),
dbc.Button(
[html.I(className="fas fa-globe"), " GlobColour"], id="globcolor-button", className="mb-2", n_clicks=0,
style={'fontSize': '16px', 'marginBottom': '10px'}
),
dbc.Collapse(
dbc.Nav(
[
dbc.NavLink([html.I(className="fas fa-sun"), " Reflectance"], href="/esa/globcolor/reflectance", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.NavLink([html.I(className="fas fa-water"), " PP"], href="/esa/globcolor/pp", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.NavLink([html.I(className="fas fa-eye"), " Optics"], href="/esa/globcolor/optics", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.NavLink([html.I(className="fas fa-tint"), " Transp"], href="/esa/globcolor/transp", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.NavLink([html.I(className="fas fa-fish"), " Plankton"], href="/esa/globcolor/plankton", style={'fontSize': '14px', 'paddingLeft': '20px'}),
], vertical=True
),
id="globcolor-collapse",
is_open=True,
),
dbc.Button(
[html.I(className="fas fa-satellite"), " Sentinel"], id="sentinel-button", className="mb-2", n_clicks=0,
style={'fontSize': '16px'}
),
dbc.Collapse(
dbc.Nav(
[
dbc.NavLink([html.I(className="fas fa-leaf"), " Chl-a"], href="/esa/sentinel/olci", style={'fontSize': '14px', 'paddingLeft': '20px'}),
], vertical=True
),
id="sentinel-collapse",
is_open=True,
),
html.Hr(),
html.H2("UK Met Office (UKMO)", className="display-6", style={'fontSize': '18px'}),
dbc.NavLink([html.I(className="fas fa-cloud"), " SST"], href="/ukmo/ostia", style={'fontSize': '14px'}),
html.Hr(),
html.H2("NASA", className="display-6", style={'fontSize': '18px'}),
dbc.Button(
[html.I(className="fas fa-thermometer-half"), " GHRSST"], id="ghrsst-button", className="mb-2", n_clicks=0,
style={'fontSize': '16px'}
),
dbc.Collapse(
dbc.Nav(
[
dbc.NavLink([html.I(className="fas fa-map"), " SST"], href="/nasa/ghrsst/mur", style={'fontSize': '14px', 'paddingLeft': '20px'}),
], vertical=True
),
id="ghrsst-collapse",
is_open=True,
),
dbc.Button(
[html.I(className="fas fa-satellite-dish"), " MODIS"], id="modis-button", className="mb-2", n_clicks=0,
style={'fontSize': '16px'}
),
dbc.Collapse(
dbc.Nav(
[
dbc.NavLink([html.I(className="fas fa-leaf"), " POC"], href="/nasa/modis/poc", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.NavLink([html.I(className="fas fa-cube"), " PIC"], href="/nasa/modis/pic", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.NavLink([html.I(className="fas fa-lightbulb"), " PAR"], href="/nasa/modis/par", style={'fontSize': '14px', 'paddingLeft': '20px'}),
], vertical=True
),
id="modis-collapse",
is_open=True,
),
html.Hr(),
html.H2("Mercator Ocean International (MOI)", className="display-6", style={'fontSize': '18px'}),
dbc.Button(
[html.I(className="fas fa-cogs"), " MODEL"], id="model-button", className="mb-2", n_clicks=0,
style={'fontSize': '16px'}
),
dbc.Collapse(
dbc.Nav(
[
dbc.NavLink([html.I(className="fas fa-fish"), html.B(" PISCES")], href="#", id="pisces-link", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.Collapse(
dbc.Nav(
[
dbc.NavLink([html.I(className="fas fa-dna"), " Bio"], href="/moi/model/pisces/bio", style={'fontSize': '14px', 'paddingLeft': '40px'}),
dbc.NavLink([html.I(className="fas fa-apple-alt"), " Nut"], href="/moi/model/pisces/nut", style={'fontSize': '14px', 'paddingLeft': '40px'}),
dbc.NavLink([html.I(className="fas fa-eye"), " Optics"], href="/moi/model/pisces/optics", style={'fontSize': '14px', 'paddingLeft': '40px'}),
dbc.NavLink([html.I(className="fas fa-leaf"), " Car"], href="/moi/model/pisces/car", style={'fontSize': '14px', 'paddingLeft': '40px'}),
dbc.NavLink([html.I(className="fas fa-cube"), " CO₂"], href="/moi/model/pisces/co2", style={'fontSize': '14px', 'paddingLeft': '40px'}),
dbc.NavLink([html.I(className="fas fa-seedling"), " PFTs"], href="/moi/model/pisces/pfts", style={'fontSize': '14px', 'paddingLeft': '40px'})
], vertical=True
),
id="pisces-collapse",
is_open=True,
),
dbc.NavLink([html.I(className="fas fa-fish"), html.B(" SEAPODYM")], href="#", id="seapodym-link", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.Collapse(
dbc.Nav(
[
dbc.NavLink([html.I(className="fas fa-weight"), " Biomass"], href="/moi/model/seapodym/biomass", style={'fontSize': '14px', 'paddingLeft': '40px'})
], vertical=True
),
id="seapodym-collapse",
is_open=True,
),
dbc.NavLink([html.I(className="fas fa-water"), html.B(" NEMO")], href="#", id="nemo-link", style={'fontSize': '14px', 'paddingLeft': '20px'}),
dbc.Collapse(
dbc.Nav(
[
dbc.NavLink([html.I(className="fas fa-tint"), " Salinity"], href="/moi/model/nemo/salinity", style={'fontSize': '14px', 'paddingLeft': '40px'})
], vertical=True
),
id="nemo-collapse",
is_open=True,
),
], vertical=True
),
id="model-collapse",
is_open=True,
),
]
),
id="datasets-collapse",
is_open=False,
),
],
id="sidebar-content",
style={"display": "block"}
),
],
className="sidebar",
style={
"position": "fixed",
"top": 0,
"left": 0,
"bottom": 0,
"width": "14rem",
"padding": "2rem 1rem",
"backgroundColor": "#f8f9fa",
"overflowY": "auto"
}
)
# Content area
content = html.Div(id="page-content", style={"margin-left": "14rem", "padding": "2rem 1rem"})
# Main layout
layout = html.Div([dcc.Location(id="url"), sidebar, content])