Update modules/ui/ui.py
Browse files- modules/ui/ui.py +52 -16
modules/ui/ui.py
CHANGED
@@ -120,22 +120,58 @@ def main():
|
|
120 |
|
121 |
|
122 |
def login_register_page(lang_code, t):
|
123 |
-
#
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
def login_form(lang_code, t):
|
141 |
with st.form("login_form"):
|
|
|
120 |
|
121 |
|
122 |
def login_register_page(lang_code, t):
|
123 |
+
# 1. Contenedor para el logo
|
124 |
+
with st.container():
|
125 |
+
# CSS personalizado para el logo
|
126 |
+
st.html("""
|
127 |
+
<style>
|
128 |
+
[alt=Logo] {
|
129 |
+
height: 8rem;
|
130 |
+
max-width: 100%;
|
131 |
+
object-fit: contain;
|
132 |
+
margin: 1rem auto;
|
133 |
+
display: block;
|
134 |
+
}
|
135 |
+
|
136 |
+
/* Contenedor del logo */
|
137 |
+
.logo-container {
|
138 |
+
text-align: center;
|
139 |
+
padding: 1rem 0;
|
140 |
+
margin-bottom: 2rem;
|
141 |
+
}
|
142 |
+
|
143 |
+
/* Ajustes para el contenedor de login */
|
144 |
+
.login-container {
|
145 |
+
margin-top: 2rem;
|
146 |
+
}
|
147 |
+
</style>
|
148 |
+
<div class="logo-container">
|
149 |
+
<img src="./assets/img/logo_92x92.png" alt="Logo">
|
150 |
+
</div>
|
151 |
+
""", unsafe_allow_html=True)
|
152 |
+
|
153 |
+
# 2. Contenedor principal para login y contenido
|
154 |
+
with st.container():
|
155 |
+
# División en columnas para login/registro y videos
|
156 |
+
left_column, right_column = st.columns([1, 3])
|
157 |
+
|
158 |
+
# Columna izquierda: Login y Registro
|
159 |
+
with left_column:
|
160 |
+
# Tabs para login y registro
|
161 |
+
tab1, tab2 = st.tabs([
|
162 |
+
t.get("login", "Iniciar Sesión"),
|
163 |
+
t.get("register", "Registrarse")
|
164 |
+
])
|
165 |
+
|
166 |
+
with tab1:
|
167 |
+
login_form(lang_code, t)
|
168 |
+
|
169 |
+
with tab2:
|
170 |
+
register_form(lang_code, t)
|
171 |
+
|
172 |
+
# Columna derecha: Videos e información
|
173 |
+
with right_column:
|
174 |
+
display_videos_and_info(lang_code, t)
|
175 |
|
176 |
def login_form(lang_code, t):
|
177 |
with st.form("login_form"):
|