Ubuntu Claude Sonnet 4.5 commited on
Commit
2df9e57
·
1 Parent(s): bcf6759

Fix logos alignment and remove placeholder

Browse files

- Set both logos to same height (80px) for consistent sizing
- Align logos at center with proper gap
- Hide Streamlit placeholder/header elements
- Remove padding to eliminate white square at top
- Hide sidebar and all Streamlit UI elements

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. modules/ui/ui.py +43 -7
modules/ui/ui.py CHANGED
@@ -65,13 +65,36 @@ def main():
65
  #############################################################
66
 
67
  def login_page(lang_code, t):
 
 
 
 
 
 
 
68
  # CSS personalizado
69
  st.markdown("""
70
  <style>
71
- /* Ocultar header y footer de Streamlit */
72
  #MainMenu {visibility: hidden;}
73
  footer {visibility: hidden;}
74
  header {visibility: hidden;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  /* Centrar contenido */
77
  .main {
@@ -81,6 +104,7 @@ def login_page(lang_code, t):
81
  justify-content: center;
82
  min-height: 100vh;
83
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 
84
  }
85
 
86
  /* Container del login */
@@ -89,19 +113,25 @@ def login_page(lang_code, t):
89
  padding: 3rem;
90
  border-radius: 20px;
91
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
92
- max-width: 400px;
93
  width: 100%;
94
  }
95
 
96
- /* Logos container */
97
  .logos-container {
98
  display: flex;
99
  align-items: center;
100
  justify-content: center;
101
- gap: 30px;
102
  margin-bottom: 2rem;
103
  }
104
 
 
 
 
 
 
 
105
  /* Título */
106
  .login-title {
107
  text-align: center;
@@ -131,6 +161,7 @@ def login_page(lang_code, t):
131
  color: #6b7280;
132
  border-top: 1px solid #e5e7eb;
133
  backdrop-filter: blur(10px);
 
134
  }
135
 
136
  /* Botón de submit */
@@ -162,19 +193,24 @@ def login_page(lang_code, t):
162
  border-color: #667eea;
163
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
164
  }
 
 
 
 
 
165
  </style>
166
  """, unsafe_allow_html=True)
167
 
168
  # Container principal
169
  st.markdown('<div class="login-container">', unsafe_allow_html=True)
170
 
171
- # Logos
172
  st.markdown("""
173
  <div class="logos-container">
174
  <img src="https://huggingface.co/spaces/AIdeaText/v5Prod/resolve/main/assets/img/AIdeaText_Logo_vectores.png"
175
- width="120" alt="AIdeaText Logo">
176
  <img src="https://huggingface.co/spaces/AIdeaText/v5Prod/resolve/main/assets/img/socialmedia/nvidia/nvidia-inception-program-badge-rgb-for-screen.png"
177
- width="120" alt="NVIDIA Logo">
178
  </div>
179
  """, unsafe_allow_html=True)
180
 
 
65
  #############################################################
66
 
67
  def login_page(lang_code, t):
68
+ # Configurar página para ocultar elementos de Streamlit
69
+ st.set_page_config(
70
+ page_title="AIdeaText Login",
71
+ page_icon="🧠",
72
+ initial_sidebar_state="collapsed"
73
+ )
74
+
75
  # CSS personalizado
76
  st.markdown("""
77
  <style>
78
+ /* Ocultar TODO de Streamlit */
79
  #MainMenu {visibility: hidden;}
80
  footer {visibility: hidden;}
81
  header {visibility: hidden;}
82
+ .stDeployButton {visibility: hidden;}
83
+ [data-testid="stHeader"] {visibility: hidden;}
84
+ [data-testid="stToolbar"] {visibility: hidden;}
85
+ section[data-testid="stSidebar"] {display: none;}
86
+
87
+ /* Ocultar el cuadrado en blanco (placeholder de Streamlit) */
88
+ .block-container {
89
+ padding-top: 0 !important;
90
+ padding-bottom: 0 !important;
91
+ }
92
+
93
+ /* Remover cualquier padding superior */
94
+ .main .block-container {
95
+ padding-top: 0rem !important;
96
+ max-width: 100% !important;
97
+ }
98
 
99
  /* Centrar contenido */
100
  .main {
 
104
  justify-content: center;
105
  min-height: 100vh;
106
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
107
+ padding: 0 !important;
108
  }
109
 
110
  /* Container del login */
 
113
  padding: 3rem;
114
  border-radius: 20px;
115
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
116
+ max-width: 450px;
117
  width: 100%;
118
  }
119
 
120
+ /* Logos container - MISMO TAMAÑO Y ALTURA */
121
  .logos-container {
122
  display: flex;
123
  align-items: center;
124
  justify-content: center;
125
+ gap: 40px;
126
  margin-bottom: 2rem;
127
  }
128
 
129
+ .logos-container img {
130
+ height: 80px;
131
+ width: auto;
132
+ object-fit: contain;
133
+ }
134
+
135
  /* Título */
136
  .login-title {
137
  text-align: center;
 
161
  color: #6b7280;
162
  border-top: 1px solid #e5e7eb;
163
  backdrop-filter: blur(10px);
164
+ z-index: 1000;
165
  }
166
 
167
  /* Botón de submit */
 
193
  border-color: #667eea;
194
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
195
  }
196
+
197
+ /* Ocultar labels de Streamlit */
198
+ .stTextInput label {
199
+ display: none;
200
+ }
201
  </style>
202
  """, unsafe_allow_html=True)
203
 
204
  # Container principal
205
  st.markdown('<div class="login-container">', unsafe_allow_html=True)
206
 
207
+ # Logos - MISMO TAMAÑO (height: 80px)
208
  st.markdown("""
209
  <div class="logos-container">
210
  <img src="https://huggingface.co/spaces/AIdeaText/v5Prod/resolve/main/assets/img/AIdeaText_Logo_vectores.png"
211
+ alt="AIdeaText Logo">
212
  <img src="https://huggingface.co/spaces/AIdeaText/v5Prod/resolve/main/assets/img/socialmedia/nvidia/nvidia-inception-program-badge-rgb-for-screen.png"
213
+ alt="NVIDIA Logo">
214
  </div>
215
  """, unsafe_allow_html=True)
216