JeCabrera commited on
Commit
31f5eff
verified
1 Parent(s): a41074a

Create styles.py

Browse files
Files changed (1) hide show
  1. styles.py +102 -0
styles.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ def apply_styles():
4
+ # Estilos generales de la p谩gina
5
+ st.markdown("""
6
+ <style>
7
+ /* Configuraci贸n general */
8
+ .block-container {
9
+ padding-top: 1rem;
10
+ padding-bottom: 5rem;
11
+ }
12
+
13
+ /* Estilos del t铆tulo */
14
+ h1 {
15
+ margin-top: -2rem;
16
+ padding-top: 0.5rem;
17
+ color: #2C3E50;
18
+ font-family: 'Helvetica Neue', sans-serif;
19
+ font-size: 2.5rem;
20
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
21
+ }
22
+
23
+ /* Estilos del subt铆tulo */
24
+ h3 {
25
+ margin-top: 0.5rem;
26
+ padding-top: 0rem;
27
+ color: #34495E;
28
+ font-family: 'Helvetica Neue', sans-serif;
29
+ font-size: 1.2rem;
30
+ line-height: 1.6;
31
+ }
32
+
33
+ /* Estilos del bot贸n */
34
+ div.stButton > button {
35
+ background-color: #2ECC71;
36
+ color: white;
37
+ width: 90%;
38
+ height: 60px;
39
+ font-weight: bold;
40
+ font-size: 22px;
41
+ text-transform: uppercase;
42
+ border: none;
43
+ border-radius: 8px;
44
+ display: block;
45
+ margin: 0 auto;
46
+ transition: all 0.3s ease;
47
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
48
+ }
49
+
50
+ div.stButton > button:hover {
51
+ background-color: #27AE60;
52
+ box-shadow: 0 6px 8px rgba(0,0,0,0.2);
53
+ transform: translateY(-2px);
54
+ }
55
+
56
+ /* Estilos del texto de salida */
57
+ .story-output {
58
+ border: 1px solid #ddd;
59
+ border-radius: 12px;
60
+ padding: 25px;
61
+ background-color: #ffffff;
62
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
63
+ margin: 20px 0;
64
+ font-size: 1.1rem;
65
+ line-height: 1.8;
66
+ }
67
+
68
+ /* Estilos del manual en sidebar */
69
+ .sidebar .sidebar-content {
70
+ background-color: #f8f9fa;
71
+ padding: 20px;
72
+ }
73
+
74
+ /* Estilos de los inputs */
75
+ .stTextInput > div > div > input {
76
+ border-radius: 8px;
77
+ border: 1px solid #ddd;
78
+ padding: 10px;
79
+ font-size: 1rem;
80
+ }
81
+
82
+ /* Estilos del expander */
83
+ .streamlit-expanderHeader {
84
+ background-color: #f8f9fa;
85
+ border-radius: 8px;
86
+ padding: 10px;
87
+ }
88
+
89
+ /* Estilos del interlineado general */
90
+ p {
91
+ line-height: 1.8;
92
+ margin-bottom: 1.2rem;
93
+ }
94
+ </style>
95
+ """, unsafe_allow_html=True)
96
+
97
+ def format_story_output(story_text):
98
+ return f"""
99
+ <div class="story-output">
100
+ {story_text}
101
+ </div>
102
+ """