Story_Generator_2G / styles.py
JeCabrera's picture
Create styles.py
31f5eff verified
raw
history blame
2.79 kB
import streamlit as st
def apply_styles():
# Estilos generales de la p谩gina
st.markdown("""
<style>
/* Configuraci贸n general */
.block-container {
padding-top: 1rem;
padding-bottom: 5rem;
}
/* Estilos del t铆tulo */
h1 {
margin-top: -2rem;
padding-top: 0.5rem;
color: #2C3E50;
font-family: 'Helvetica Neue', sans-serif;
font-size: 2.5rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
/* Estilos del subt铆tulo */
h3 {
margin-top: 0.5rem;
padding-top: 0rem;
color: #34495E;
font-family: 'Helvetica Neue', sans-serif;
font-size: 1.2rem;
line-height: 1.6;
}
/* Estilos del bot贸n */
div.stButton > button {
background-color: #2ECC71;
color: white;
width: 90%;
height: 60px;
font-weight: bold;
font-size: 22px;
text-transform: uppercase;
border: none;
border-radius: 8px;
display: block;
margin: 0 auto;
transition: all 0.3s ease;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
div.stButton > button:hover {
background-color: #27AE60;
box-shadow: 0 6px 8px rgba(0,0,0,0.2);
transform: translateY(-2px);
}
/* Estilos del texto de salida */
.story-output {
border: 1px solid #ddd;
border-radius: 12px;
padding: 25px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
margin: 20px 0;
font-size: 1.1rem;
line-height: 1.8;
}
/* Estilos del manual en sidebar */
.sidebar .sidebar-content {
background-color: #f8f9fa;
padding: 20px;
}
/* Estilos de los inputs */
.stTextInput > div > div > input {
border-radius: 8px;
border: 1px solid #ddd;
padding: 10px;
font-size: 1rem;
}
/* Estilos del expander */
.streamlit-expanderHeader {
background-color: #f8f9fa;
border-radius: 8px;
padding: 10px;
}
/* Estilos del interlineado general */
p {
line-height: 1.8;
margin-bottom: 1.2rem;
}
</style>
""", unsafe_allow_html=True)
def format_story_output(story_text):
return f"""
<div class="story-output">
{story_text}
</div>
"""