Update modules/ui/ui.py
Browse files- modules/ui/ui.py +63 -18
modules/ui/ui.py
CHANGED
|
@@ -60,15 +60,21 @@ st.markdown("""
|
|
| 60 |
eventos = [
|
| 61 |
{
|
| 62 |
"imagen": "assets/img/socialmedia/WebSummit_ShowCase_2025.png",
|
| 63 |
-
"titulo": "WebSummitRio 2025, Brasil, april, 27-30",
|
| 64 |
"descripcion": "AIdeaText showcase"
|
| 65 |
},
|
| 66 |
|
| 67 |
{
|
| 68 |
"imagen": "assets/img/socialmedia/image_pycon_2024.png",
|
| 69 |
-
"titulo": "PyCon 2024, Colombia, june, 7-9",
|
| 70 |
"descripcion": "AIdeaText showcase"
|
| 71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
]
|
| 73 |
|
| 74 |
def initialize_carousel_state():
|
|
@@ -118,16 +124,13 @@ def show_carousel():
|
|
| 118 |
st.session_state.current_event = (current_idx + 1) % len(eventos)
|
| 119 |
st.rerun()
|
| 120 |
|
| 121 |
-
# Indicadores de posición
|
| 122 |
st.markdown("<div class='carousel-nav'>", unsafe_allow_html=True)
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
if st.button("•", key=f"carousel_dot_{i}"):
|
| 127 |
-
st.session_state.current_event = i
|
| 128 |
-
st.rerun()
|
| 129 |
st.markdown("</div>", unsafe_allow_html=True)
|
| 130 |
-
|
| 131 |
except Exception as e:
|
| 132 |
st.error(f"Error al mostrar el carrusel: {str(e)}")
|
| 133 |
logger.error(f"Error en show_carousel: {str(e)}")
|
|
@@ -216,17 +219,55 @@ def login_register_page(lang_code, t):
|
|
| 216 |
}
|
| 217 |
</style>
|
| 218 |
""", unsafe_allow_html=True)
|
| 219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
# Crear contenedor para logos y selector de idioma usando columnas de Streamlit
|
| 221 |
-
|
|
|
|
| 222 |
|
| 223 |
with col1:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
# Logo de ALPHA
|
| 225 |
-
st.image("https://huggingface.co/spaces/AIdeaText/
|
| 226 |
|
| 227 |
-
with
|
| 228 |
-
# Logo de
|
| 229 |
-
st.image("https://huggingface.co/spaces/AIdeaText/
|
|
|
|
|
|
|
|
|
|
|
|
|
| 230 |
|
| 231 |
with col5:
|
| 232 |
# Selector de idioma
|
|
@@ -442,4 +483,8 @@ __all__ = ['main', 'login_register_page', 'initialize_session_state']
|
|
| 442 |
|
| 443 |
# Bloque de ejecución condicional
|
| 444 |
if __name__ == "__main__":
|
| 445 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
eventos = [
|
| 61 |
{
|
| 62 |
"imagen": "assets/img/socialmedia/WebSummit_ShowCase_2025.png",
|
| 63 |
+
"titulo": "WebSummitRio 2025, Rio, Brasil, april, 27-30",
|
| 64 |
"descripcion": "AIdeaText showcase"
|
| 65 |
},
|
| 66 |
|
| 67 |
{
|
| 68 |
"imagen": "assets/img/socialmedia/image_pycon_2024.png",
|
| 69 |
+
"titulo": "PyCon 2024, Medellin, Colombia, june, 7-9",
|
| 70 |
"descripcion": "AIdeaText showcase"
|
| 71 |
+
},
|
| 72 |
+
|
| 73 |
+
{
|
| 74 |
+
"imagen": "assets/img/socialmedia/_MG_2845.JPG",
|
| 75 |
+
"titulo": "MakerFaire 2024, Mexico City, Mexico, octuber, 12-13",
|
| 76 |
+
"descripcion": "AIdeaText showcase"
|
| 77 |
+
}
|
| 78 |
]
|
| 79 |
|
| 80 |
def initialize_carousel_state():
|
|
|
|
| 124 |
st.session_state.current_event = (current_idx + 1) % len(eventos)
|
| 125 |
st.rerun()
|
| 126 |
|
| 127 |
+
# Indicadores de posición (solo visuales, no botones)
|
| 128 |
st.markdown("<div class='carousel-nav'>", unsafe_allow_html=True)
|
| 129 |
+
for i in range(len(eventos)):
|
| 130 |
+
active_class = "carousel-dot active" if i == current_idx else "carousel-dot"
|
| 131 |
+
st.markdown(f"<span class='{active_class}'></span>", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
| 132 |
st.markdown("</div>", unsafe_allow_html=True)
|
| 133 |
+
|
| 134 |
except Exception as e:
|
| 135 |
st.error(f"Error al mostrar el carrusel: {str(e)}")
|
| 136 |
logger.error(f"Error en show_carousel: {str(e)}")
|
|
|
|
| 219 |
}
|
| 220 |
</style>
|
| 221 |
""", unsafe_allow_html=True)
|
| 222 |
+
|
| 223 |
+
####################################################################################################################################
|
| 224 |
+
|
| 225 |
+
# Pie de página legal (debe ir al final de la función)
|
| 226 |
+
footer_placeholder = st.empty()
|
| 227 |
+
footer_placeholder.markdown("""
|
| 228 |
+
<style>
|
| 229 |
+
#footer {
|
| 230 |
+
position: fixed;
|
| 231 |
+
bottom: 0;
|
| 232 |
+
left: 0;
|
| 233 |
+
width: 100%;
|
| 234 |
+
background-color: #f0f2f6;
|
| 235 |
+
color: #4f4f4f;
|
| 236 |
+
text-align: center;
|
| 237 |
+
padding: 10px;
|
| 238 |
+
font-size: 12px;
|
| 239 |
+
border-top: 1px solid #e6e6e6;
|
| 240 |
+
z-index: 100;
|
| 241 |
+
}
|
| 242 |
+
.main > div {
|
| 243 |
+
padding-bottom: 60px;
|
| 244 |
+
}
|
| 245 |
+
</style>
|
| 246 |
+
<div id="footer">
|
| 247 |
+
© 2025 NVIDIA, the NVIDIA logo are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.
|
| 248 |
+
</div>
|
| 249 |
+
""", unsafe_allow_html=True)
|
| 250 |
+
|
| 251 |
+
#################################### LOGOS ################################################################################################
|
| 252 |
# Crear contenedor para logos y selector de idioma usando columnas de Streamlit
|
| 253 |
+
|
| 254 |
+
col1, col2, col3, col4, col5 = st.columns([0.2, 0.2, 0.3, 0.3, 0.2])
|
| 255 |
|
| 256 |
with col1:
|
| 257 |
+
# Logo de AIdeaText
|
| 258 |
+
st.image("https://huggingface.co/spaces/AIdeaText/v5Prod/resolve/main/assets/img/AIdeaText_Logo_vectores.png", width=100)
|
| 259 |
+
|
| 260 |
+
with col2:
|
| 261 |
# Logo de ALPHA
|
| 262 |
+
st.image("https://huggingface.co/spaces/AIdeaText/v5Prod/resolve/main/assets/img/ALPHA_Startup%20Badges.png", width=100)
|
| 263 |
|
| 264 |
+
with col3:
|
| 265 |
+
# Logo de NVIDIA
|
| 266 |
+
st.image("https://huggingface.co/spaces/AIdeaText/v5Prod/resolve/main/assets/img/socialmedia/nvidia/nvidia-inception-program-badge-rgb-for-screen.png", width=250)
|
| 267 |
+
|
| 268 |
+
with col4:
|
| 269 |
+
# Logo de F6S (nuevo logo)
|
| 270 |
+
st.image("https://huggingface.co/spaces/AIdeaText/v5Prod/resolve/main/assets/img/socialmedia/F6/F6S_Top_Company_EdTech_27.png", width=300)
|
| 271 |
|
| 272 |
with col5:
|
| 273 |
# Selector de idioma
|
|
|
|
| 483 |
|
| 484 |
# Bloque de ejecución condicional
|
| 485 |
if __name__ == "__main__":
|
| 486 |
+
main()
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
#############################################################
|
| 490 |
+
#############################################################
|