Clément PEPONNET commited on
Commit
f6b051e
·
1 Parent(s): ddf0451

chore: improve UI

Browse files
Files changed (2) hide show
  1. app.py +22 -7
  2. index.html +22 -18
app.py CHANGED
@@ -5,21 +5,36 @@ with open("index.html", "r", encoding="utf-8") as f:
5
  html_content = f.read()
6
 
7
  # Create Gradio interface with custom HTML
8
- with gr.Blocks(css="""
9
- .gradio-container {
 
 
 
 
 
 
 
 
 
10
  padding: 0 !important;
 
 
 
11
  max-width: 100% !important;
12
- background: transparent !important;
13
  }
14
  #html-component {
15
  height: 100vh !important;
16
  width: 100% !important;
 
17
  }
18
- #html-component * {
19
- color: inherit !important;
 
 
 
20
  }
21
- #html-component iframe {
22
- border: none !important;
23
  }
24
  """) as demo:
25
  gr.HTML(html_content, elem_id="html-component")
 
5
  html_content = f.read()
6
 
7
  # Create Gradio interface with custom HTML
8
+ with gr.Blocks(
9
+ theme=gr.themes.Base(
10
+ primary_hue="red",
11
+ secondary_hue="blue",
12
+ ).set(
13
+ body_background_fill="linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%)",
14
+ body_background_fill_dark="linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%)",
15
+ ),
16
+ css="""
17
+ body, .gradio-container {
18
+ background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
19
  padding: 0 !important;
20
+ margin: 0 !important;
21
+ }
22
+ .gradio-container {
23
  max-width: 100% !important;
 
24
  }
25
  #html-component {
26
  height: 100vh !important;
27
  width: 100% !important;
28
+ overflow-y: auto !important;
29
  }
30
+ .contain {
31
+ background: transparent !important;
32
+ }
33
+ .app {
34
+ background: transparent !important;
35
  }
36
+ main {
37
+ background: transparent !important;
38
  }
39
  """) as demo:
40
  gr.HTML(html_content, elem_id="html-component")
index.html CHANGED
@@ -14,13 +14,15 @@
14
  box-sizing: border-box;
15
  }
16
 
17
- body {
18
  font-family: 'Cormorant Garamond', serif;
19
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
20
  color: #f0e6d2 !important;
21
  min-height: 100vh;
22
  overflow-x: hidden;
23
  position: relative;
 
 
24
  }
25
 
26
  /* Animated background elements */
@@ -56,10 +58,10 @@
56
 
57
  h1 {
58
  font-family: 'Cinzel', serif;
59
- font-size: 4rem;
60
  font-weight: 700;
61
- color: #cc3333;
62
- text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
63
  margin-bottom: 20px;
64
  letter-spacing: 4px;
65
  text-transform: uppercase;
@@ -75,9 +77,10 @@
75
 
76
  .tagline {
77
  font-size: 1.3rem;
78
- color: #d4af37;
79
  margin-top: 20px;
80
  font-weight: 600;
 
81
  }
82
 
83
  .decorative-line {
@@ -88,12 +91,12 @@
88
  }
89
 
90
  .main-content {
91
- background: rgba(22, 33, 62, 0.8);
92
  border: 2px solid #cc3333;
93
  border-radius: 15px;
94
- padding: 50px;
95
  margin-bottom: 40px;
96
- box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
97
  backdrop-filter: blur(10px);
98
  }
99
 
@@ -103,11 +106,12 @@
103
 
104
  h2 {
105
  font-family: 'Cinzel', serif;
106
- font-size: 2.5rem;
107
- color: #cc3333;
108
  margin-bottom: 25px;
109
  text-align: center;
110
  letter-spacing: 2px;
 
111
  }
112
 
113
  .info-box {
@@ -122,12 +126,12 @@
122
  }
123
 
124
  .info-box strong {
125
- color: #d4af37;
126
  font-size: 1.3rem;
127
  }
128
 
129
  .highlight {
130
- color: #cc3333;
131
  font-weight: 600;
132
  }
133
 
@@ -160,7 +164,7 @@
160
  .value-card h3 {
161
  font-family: 'Cinzel', serif;
162
  font-size: 1.5rem;
163
- color: #d4af37;
164
  margin-bottom: 10px;
165
  }
166
 
@@ -182,7 +186,7 @@
182
  .schedule h3 {
183
  font-family: 'Cinzel', serif;
184
  font-size: 2rem;
185
- color: #d4af37;
186
  margin-bottom: 20px;
187
  }
188
 
@@ -194,7 +198,7 @@
194
 
195
  .schedule-details .time {
196
  font-size: 2rem;
197
- color: #cc3333;
198
  font-weight: 700;
199
  display: block;
200
  margin: 15px 0;
@@ -204,7 +208,7 @@
204
  font-style: italic;
205
  font-size: 1.4rem;
206
  text-align: center;
207
- color: #d4af37;
208
  margin: 40px 0;
209
  padding: 30px;
210
  border-top: 2px solid #cc3333;
@@ -221,8 +225,8 @@
221
  }
222
 
223
  .members {
224
- font-size: 0.9rem;
225
- color: #d4af37;
226
  line-height: 1.6;
227
  }
228
 
 
14
  box-sizing: border-box;
15
  }
16
 
17
+ html, body {
18
  font-family: 'Cormorant Garamond', serif;
19
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
20
  color: #f0e6d2 !important;
21
  min-height: 100vh;
22
  overflow-x: hidden;
23
  position: relative;
24
+ margin: 0 !important;
25
+ padding: 0 !important;
26
  }
27
 
28
  /* Animated background elements */
 
58
 
59
  h1 {
60
  font-family: 'Cinzel', serif;
61
+ font-size: 3.5rem;
62
  font-weight: 700;
63
+ color: #cc3333 !important;
64
+ text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8);
65
  margin-bottom: 20px;
66
  letter-spacing: 4px;
67
  text-transform: uppercase;
 
77
 
78
  .tagline {
79
  font-size: 1.3rem;
80
+ color: #d4af37 !important;
81
  margin-top: 20px;
82
  font-weight: 600;
83
+ text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
84
  }
85
 
86
  .decorative-line {
 
91
  }
92
 
93
  .main-content {
94
+ background: rgba(22, 33, 62, 0.6);
95
  border: 2px solid #cc3333;
96
  border-radius: 15px;
97
+ padding: 40px;
98
  margin-bottom: 40px;
99
+ box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
100
  backdrop-filter: blur(10px);
101
  }
102
 
 
106
 
107
  h2 {
108
  font-family: 'Cinzel', serif;
109
+ font-size: 2.2rem;
110
+ color: #cc3333 !important;
111
  margin-bottom: 25px;
112
  text-align: center;
113
  letter-spacing: 2px;
114
+ text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
115
  }
116
 
117
  .info-box {
 
126
  }
127
 
128
  .info-box strong {
129
+ color: #d4af37 !important;
130
  font-size: 1.3rem;
131
  }
132
 
133
  .highlight {
134
+ color: #cc3333 !important;
135
  font-weight: 600;
136
  }
137
 
 
164
  .value-card h3 {
165
  font-family: 'Cinzel', serif;
166
  font-size: 1.5rem;
167
+ color: #d4af37 !important;
168
  margin-bottom: 10px;
169
  }
170
 
 
186
  .schedule h3 {
187
  font-family: 'Cinzel', serif;
188
  font-size: 2rem;
189
+ color: #d4af37 !important;
190
  margin-bottom: 20px;
191
  }
192
 
 
198
 
199
  .schedule-details .time {
200
  font-size: 2rem;
201
+ color: #cc3333 !important;
202
  font-weight: 700;
203
  display: block;
204
  margin: 15px 0;
 
208
  font-style: italic;
209
  font-size: 1.4rem;
210
  text-align: center;
211
+ color: #d4af37 !important;
212
  margin: 40px 0;
213
  padding: 30px;
214
  border-top: 2px solid #cc3333;
 
225
  }
226
 
227
  .members {
228
+ font-size: 1rem;
229
+ color: #d4af37 !important;
230
  line-height: 1.6;
231
  }
232