Skip to content

Commit 8f38ae3

Browse files
committed
feat: Updated style & position in right panel
1 parent ae350cf commit 8f38ae3

File tree

1 file changed

+57
-35
lines changed

1 file changed

+57
-35
lines changed

app/pages/homepage.py

Lines changed: 57 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -165,88 +165,110 @@ def homepage_layout(user_headers, user_credentials, lang="fr"):
165165
),
166166
dbc.Col(
167167
[
168-
dbc.Row(
169-
dbc.Button(
170-
translate[lang]["enlarge_map"],
171-
className="common-style",
172-
style={"backgroundColor": "#FEBA6A"},
173-
id="map-button",
174-
),
175-
className="mb-2",
176-
),
177-
dbc.Row(
178-
dbc.Col(
179-
build_alerts_map(user_headers, user_credentials),
180-
className="common-style",
181-
style={
182-
"position": "relative",
183-
"width": "100%",
184-
"paddingTop": "100%",
185-
},
186-
),
187-
),
188-
dbc.Row(
168+
html.Div(
189169
html.Div(
190170
id="alert-information",
191171
className="common-style",
192-
style={"display": "none"},
172+
style={"display": "none", "padding": "8px"},
193173
children=[
194174
html.Div(
195175
id="alert-information-styling-container",
196-
style={"padding": "5px"},
197176
children=[
198-
html.H4(translate[lang]["alert_information"]),
177+
html.H5(translate[lang]["alert_information"],
178+
style={"text-align": "center"}),
199179
html.Div(
200180
id="alert-camera",
201-
style={"marginBottom": "10px"},
202181
children=[
203182
html.Span(
204-
id="alert-camera-header", children=translate[lang]["camera"]
183+
id="alert-camera-header",
184+
children=translate[lang]["camera"],
185+
className="alert-information-title"
186+
),
187+
html.Span(
188+
id="alert-camera-value",
189+
children=[],
205190
),
206-
html.Span(id="alert-camera-value", children=[]),
207191
],
208192
),
209193
html.Div(
210194
id="camera-location",
211-
style={"marginBottom": "10px"},
212195
children=[
213196
html.Span(
214197
id="camera-location-header",
215198
children=translate[lang]["camera_location"],
199+
className="alert-information-title"
200+
),
201+
html.Span(
202+
id="camera-location-value",
203+
children=[],
216204
),
217-
html.Span(id="camera-location-value", children=[]),
218205
],
219206
),
220207
html.Div(
221208
id="alert-azimuth",
222-
style={"marginBottom": "10px"},
223209
children=[
224210
html.Span(
225211
id="alert-azimuth-header",
226212
children=translate[lang]["detection_azimuth"],
213+
className="alert-information-title"
214+
),
215+
html.Span(
216+
id="alert-azimuth-value",
217+
children=[],
227218
),
228-
html.Span(id="alert-azimuth-value", children=[]),
229219
],
230220
),
231221
html.Div(
232222
id="alert-date",
233223
children=[
234224
html.Span(
235-
id="alert-date-header", children=translate[lang]["date"]
225+
id="alert-date-header",
226+
children=translate[lang]["date"],
227+
className="alert-information-title"
228+
),
229+
html.Span(
230+
id="alert-date-value",
231+
children=[],
236232
),
237-
html.Span(id="alert-date-value", children=[]),
238233
],
239234
),
240235
],
241236
),
242237
],
243238
),
244-
className="mt-4",
245239
id="alert-panel",
246240
),
241+
242+
html.Div(
243+
dbc.Col(
244+
build_alerts_map(user_headers, user_credentials),
245+
className="common-style",
246+
style={
247+
"position": "relative",
248+
"width": "100%",
249+
"paddingTop": "100%",
250+
},
251+
),
252+
),
253+
html.Div(
254+
dbc.Button(
255+
translate[lang]["enlarge_map"],
256+
className="common-style",
257+
style={
258+
"backgroundColor": "#FEBA6A",
259+
"color": "black",
260+
"width": "100%"
261+
},
262+
id="map-button",
263+
),
264+
),
247265
],
248266
width=2,
249-
className="mb-4",
267+
style={
268+
"display" : "flex",
269+
"flex-direction": "column",
270+
"gap" : "16px",
271+
},
250272
),
251273
]
252274
),

0 commit comments

Comments
 (0)