Spaces:
Running
Running
Upload 9 files
Browse files- app.py +7 -47
- styles/main.css +45 -0
app.py
CHANGED
@@ -173,57 +173,17 @@ with open("manual.md", "r", encoding="utf-8") as file:
|
|
173 |
# Mostrar el contenido del manual en el sidebar
|
174 |
st.sidebar.markdown(manual_content)
|
175 |
|
176 |
-
#
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
padding-top: 1rem;
|
183 |
-
padding-bottom: 5rem;
|
184 |
-
}
|
185 |
-
|
186 |
-
/* Ajustar espaciado del título */
|
187 |
-
h1 {
|
188 |
-
margin-top: -2rem;
|
189 |
-
padding-top: 0.5rem;
|
190 |
-
}
|
191 |
-
|
192 |
-
/* Ajustar espaciado del subtítulo */
|
193 |
-
h4 {
|
194 |
-
margin-top: 0.5rem;
|
195 |
-
padding-top: 0rem;
|
196 |
-
}
|
197 |
-
</style>
|
198 |
-
""", unsafe_allow_html=True)
|
199 |
|
200 |
# Centrar el título y el subtítulo
|
201 |
st.markdown("<h1 style='text-align: center;'>Enchanted Hooks</h1>", unsafe_allow_html=True)
|
202 |
st.markdown("<h4 style='text-align: center;'>Imagina poder conjurar títulos que no solo informan, sino que encantan. Esta app es tu varita mágica en el mundo del copywriting, transformando cada concepto en un titular cautivador que deja a todos deseando más.</h4>", unsafe_allow_html=True)
|
203 |
|
204 |
-
# Añadir CSS personalizado para el botón
|
205 |
-
st.markdown("""
|
206 |
-
<style>
|
207 |
-
div.stButton > button {
|
208 |
-
background-color: #FFCC00;
|
209 |
-
color: black;
|
210 |
-
width: 90%;
|
211 |
-
height: 60px;
|
212 |
-
font-weight: bold;
|
213 |
-
font-size: 22px;
|
214 |
-
text-transform: uppercase;
|
215 |
-
border: 1px solid #000000;
|
216 |
-
border-radius: 8px;
|
217 |
-
display: block;
|
218 |
-
margin: 0 auto;
|
219 |
-
}
|
220 |
-
div.stButton > button:hover {
|
221 |
-
background-color: #FFD700;
|
222 |
-
color: black;
|
223 |
-
}
|
224 |
-
</style>
|
225 |
-
""", unsafe_allow_html=True)
|
226 |
-
|
227 |
# Crear columnas
|
228 |
col1, col2 = st.columns([1, 2])
|
229 |
|
@@ -276,7 +236,7 @@ if submit:
|
|
276 |
selected_angle # Agregar el ángulo seleccionado
|
277 |
)
|
278 |
col2.markdown(f"""
|
279 |
-
<div
|
280 |
<h4>Observa la magia en acción:</h4>
|
281 |
<p>{generated_headlines}</p>
|
282 |
</div>
|
|
|
173 |
# Mostrar el contenido del manual en el sidebar
|
174 |
st.sidebar.markdown(manual_content)
|
175 |
|
176 |
+
# Load CSS from file
|
177 |
+
with open("styles/main.css", "r") as f:
|
178 |
+
css = f.read()
|
179 |
+
|
180 |
+
# Apply the CSS
|
181 |
+
st.markdown(f"<style>{css}</style>", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
# Centrar el título y el subtítulo
|
184 |
st.markdown("<h1 style='text-align: center;'>Enchanted Hooks</h1>", unsafe_allow_html=True)
|
185 |
st.markdown("<h4 style='text-align: center;'>Imagina poder conjurar títulos que no solo informan, sino que encantan. Esta app es tu varita mágica en el mundo del copywriting, transformando cada concepto en un titular cautivador que deja a todos deseando más.</h4>", unsafe_allow_html=True)
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
# Crear columnas
|
188 |
col1, col2 = st.columns([1, 2])
|
189 |
|
|
|
236 |
selected_angle # Agregar el ángulo seleccionado
|
237 |
)
|
238 |
col2.markdown(f"""
|
239 |
+
<div class="results-container">
|
240 |
<h4>Observa la magia en acción:</h4>
|
241 |
<p>{generated_headlines}</p>
|
242 |
</div>
|
styles/main.css
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Main container styling */
|
2 |
+
.block-container {
|
3 |
+
padding-top: 1rem;
|
4 |
+
padding-bottom: 5rem;
|
5 |
+
}
|
6 |
+
|
7 |
+
/* Title spacing */
|
8 |
+
h1 {
|
9 |
+
margin-top: -2rem;
|
10 |
+
padding-top: 0.5rem;
|
11 |
+
}
|
12 |
+
|
13 |
+
/* Subtitle spacing */
|
14 |
+
h4 {
|
15 |
+
margin-top: 0.5rem;
|
16 |
+
padding-top: 0rem;
|
17 |
+
}
|
18 |
+
|
19 |
+
/* Custom button styling */
|
20 |
+
div.stButton > button {
|
21 |
+
background-color: #FFCC00;
|
22 |
+
color: black;
|
23 |
+
width: 90%;
|
24 |
+
height: 60px;
|
25 |
+
font-weight: bold;
|
26 |
+
font-size: 22px;
|
27 |
+
text-transform: uppercase;
|
28 |
+
border: 1px solid #000000;
|
29 |
+
border-radius: 8px;
|
30 |
+
display: block;
|
31 |
+
margin: 0 auto;
|
32 |
+
}
|
33 |
+
|
34 |
+
div.stButton > button:hover {
|
35 |
+
background-color: #FFD700;
|
36 |
+
color: black;
|
37 |
+
}
|
38 |
+
|
39 |
+
/* Results container */
|
40 |
+
.results-container {
|
41 |
+
border: 1px solid #000000;
|
42 |
+
padding: 15px;
|
43 |
+
border-radius: 8px;
|
44 |
+
background-color: #ffffff;
|
45 |
+
}
|