AIdeaText commited on
Commit
a5e455c
·
verified ·
1 Parent(s): 6eeb73e

Update modules/ui/ui.py

Browse files
Files changed (1) hide show
  1. modules/ui/ui.py +5 -8
modules/ui/ui.py CHANGED
@@ -118,16 +118,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
- cols = st.columns(len(eventos))
124
- for i, col in enumerate(cols):
125
- with col:
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)}")
 
118
  st.session_state.current_event = (current_idx + 1) % len(eventos)
119
  st.rerun()
120
 
121
+ # Indicadores de posición (solo visuales, no botones)
122
  st.markdown("<div class='carousel-nav'>", unsafe_allow_html=True)
123
+ for i in range(len(eventos)):
124
+ active_class = "carousel-dot active" if i == current_idx else "carousel-dot"
125
+ st.markdown(f"<span class='{active_class}'></span>", unsafe_allow_html=True)
 
 
 
126
  st.markdown("</div>", unsafe_allow_html=True)
127
+
128
  except Exception as e:
129
  st.error(f"Error al mostrar el carrusel: {str(e)}")
130
  logger.error(f"Error en show_carousel: {str(e)}")