1717def homepage_layout (user_headers , user_credentials , lang = "fr" ):
1818 translate = {
1919 "fr" : {
20- "animate_on_off" : "Activer / Désactiver l'animation" ,
2120 "show_hide_prediction" : "Afficher / Cacher la prédiction" ,
2221 "download_image" : "Télécharger l'image" ,
2322 "acknowledge_alert" : "Acquitter l'alerte" ,
@@ -31,7 +30,6 @@ def homepage_layout(user_headers, user_credentials, lang="fr"):
3130 "no_alert_default_image" : "./assets/images/no-alert-default.png" ,
3231 },
3332 "es" : {
34- "animate_on_off" : "Activar / Desactivar la animación" ,
3533 "show_hide_prediction" : "Mostrar / Ocultar la predicción" ,
3634 "download_image" : "Descargar la imagen" ,
3735 "acknowledge_alert" : "Descartar la alerta" ,
@@ -98,40 +96,46 @@ def homepage_layout(user_headers, user_credentials, lang="fr"):
9896 ),
9997 ],
10098 ),
101- html .Div (
102- dcc .Slider (id = "image-slider" , min = 0 , max = 10 , step = 1 , value = 0 ),
103- id = "slider-container" ,
104- className = "common-style-slider" ,
105- style = {"display" : "none" , "marginTop" : "10px" },
106- ),
10799 dbc .Row (
108100 [
109101 dbc .Col (
110102 dbc .Button (
111- translate [ lang ][ "animate_on_off" ] ,
103+ html . Img ( src = "assets/images/play-pause.svg" ) ,
112104 id = "auto-move-button" ,
113105 n_clicks = 1 ,
114- className = "btn-uniform common-style" ,
115- style = {"backgroundColor" : "#FD5252" },
106+ style = {"height" : "100%" , "width" : "100%" }
116107 ),
117- width = 3 ,
108+ width = 1
118109 ),
110+ dbc .Col (
111+ html .Div (
112+ dcc .Slider (id = "image-slider" , min = 0 , max = 10 , step = 1 , value = 0 ),
113+ id = "slider-container" ,
114+ className = "common-style-slider" ,
115+ style = {"display" : "none" }
116+ ),
117+ width = 11
118+ )
119+
120+ ], style = {"marginTop" : "10px" }
121+ ),
122+ dbc .Row (
123+ [
119124 dbc .Col (
120125 dbc .Button (
121126 translate [lang ]["show_hide_prediction" ],
122127 id = "hide-bbox-button" ,
123128 n_clicks = 0 ,
124- className = "btn-uniform common-style " ,
125- style = {"backgroundColor" : "#FEBA6A" },
129+ className = "btn-uniform" ,
130+ style = {}, # Will be overwritten dynamically
126131 ),
127132 width = 3 ,
128133 ),
129134 dbc .Col (
130135 html .A (
131136 dbc .Button (
132137 translate [lang ]["download_image" ],
133- className = "btn-uniform common-style" ,
134- style = {"backgroundColor" : "#2C796E" },
138+ className = "btn-uniform" ,
135139 id = "dl-image-button" ,
136140 ),
137141 className = "no-underline" ,
@@ -147,17 +151,17 @@ def homepage_layout(user_headers, user_credentials, lang="fr"):
147151 translate [lang ]["acknowledge_alert" ],
148152 id = "acknowledge-button" ,
149153 n_clicks = 0 ,
150- className = "btn-uniform common-style" ,
151- style = {"backgroundColor" : "#054546" },
154+ className = "btn-uniform" ,
152155 ),
153156 width = 3 ,
154157 ),
155158 ],
156159 className = "mb-4" ,
157- style = {"display" : "flex" , "marginTop" : "10px" },
160+ style = {"display" : "flex" , "marginTop" : "10px" , "justify-content" : "space-evenly" },
158161 ),
159162 ],
160163 width = 8 ,
164+ style = {"padding" : "0" }
161165 ),
162166 dbc .Col (
163167 [
0 commit comments