Tanyaaaaaaaaaa commited on
Commit
c694484
Β·
verified Β·
1 Parent(s): f813187

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -5
app.py CHANGED
@@ -225,7 +225,7 @@ body {
225
 
226
  .gradio-container {
227
  /* Apply the semi-transparent black overlay from your inner div */
228
- background-color: rgba(0, 0, 0, 0.55) !important; /* Equivalent to bg-black/55 */
229
 
230
  /* Ensure the container stretches to fill the screen height, accounting for its own padding/margin */
231
  min-height: calc(100vh - 4rem); /* Adjust 4rem if your top/bottom margin (2rem each) changes */
@@ -233,14 +233,46 @@ body {
233
  flex-direction: column; /* Stacks content vertically within the container */
234
  }
235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  label, .gr-checkbox-label span { /* Target labels and checkbox labels */
237
  color: #E8E8E8 !important; /* Slightly brighter light gray for labels */
238
  font-weight: bold !important;
239
  }
240
- h1 {
241
- color: #FFFFFF !important;
242
- text-align: center !important;
 
 
 
 
 
 
 
 
 
243
  }
 
244
  .prose { /* Markdown text */
245
  color: #F0F0F0 !important;
246
  }
@@ -277,7 +309,8 @@ exercise_choices = ["Hammer Curl", "Push Up", "Squat"]
277
 
278
  # Pass the theme and custom_css to gr.Blocks
279
  with gr.Blocks(theme=theme, css=custom_css) as iface:
280
- gr.Markdown("# Live AI Trainer") # This will be styled by H1 in CSS
 
281
  gr.Markdown("Select an exercise, set your targets, and get real-time feedback on your form and reps.") # Styled by .prose
282
 
283
  with gr.Row():
 
225
 
226
  .gradio-container {
227
  /* Apply the semi-transparent black overlay from your inner div */
228
+ background-color: rgba(0, 0, 0, 0.60) !important; /* Equivalent to bg-black/55 */
229
 
230
  /* Ensure the container stretches to fill the screen height, accounting for its own padding/margin */
231
  min-height: calc(100vh - 4rem); /* Adjust 4rem if your top/bottom margin (2rem each) changes */
 
233
  flex-direction: column; /* Stacks content vertically within the container */
234
  }
235
 
236
+ .header-container {
237
+ width: 100%;
238
+ height: 140px;
239
+ position: relative;
240
+ display: flex; /* For centering the h1 */
241
+ flex-direction: column; /* For vertical alignment */
242
+ justify-content: center; /* Centers the h1 vertically */
243
+ align-items: center; /* Centers the h1 horizontally */
244
+ padding: 0 1rem; /* Padding for text inside, equivalent to p-4 for text content */
245
+ overflow: hidden;
246
+ border-bottom-left-radius: 1rem; /* Equivalent to rounded-b-2xl */
247
+ border-bottom-right-radius: 1rem; /* Equivalent to rounded-b-2xl */
248
+ background: linear-gradient(to bottom, rgba(30,18,51,0.9) 0%, rgba(30,18,51,0.7) 60%, rgba(0,0,0,0) 100%);
249
+ box-sizing: border-box; /* Include padding in the element's total width/height */
250
+
251
+ /* To make it span full width including gradio-container's padding */
252
+ margin-top: -2rem !important; /* Compensate for gradio-container's top padding */
253
+ margin-left: -2rem !important; /* Compensate for gradio-container's left padding */
254
+ margin-right: -2rem !important; /* Compensate for gradio-container's right padding */
255
+ width: calc(100% + 4rem) !important; /* Adjust width to cover padding (2rem left + 2rem right) */
256
+ }
257
+
258
  label, .gr-checkbox-label span { /* Target labels and checkbox labels */
259
  color: #E8E8E8 !important; /* Slightly brighter light gray for labels */
260
  font-weight: bold !important;
261
  }
262
+ .header-container h1 {
263
+ color: #E6E6FA !important; /* Equivalent to text-lavender-100 */
264
+ font-size: 2.5rem !important; /* Equivalent to text-3xl, but made a bit larger for a main heading */
265
+ font-weight: bold !important; /* Equivalent to font-bold */
266
+ letter-spacing: 0.05em !important; /* Equivalent to tracking-wide */
267
+ width: 100%; /* Equivalent to w-full */
268
+ text-align: center; /* Equivalent to text-center */
269
+ margin: 0 auto; /* Equivalent to mx-auto */
270
+ /* IMPORTANT: For 'Sprintura' font, you still need to host the font files and
271
+ add an @font-face rule to your CSS that points to their public URLs.
272
+ Otherwise, browsers will use a generic sans-serif font. */
273
+ font-family: 'Sprintura', sans-serif !important;
274
  }
275
+
276
  .prose { /* Markdown text */
277
  color: #F0F0F0 !important;
278
  }
 
309
 
310
  # Pass the theme and custom_css to gr.Blocks
311
  with gr.Blocks(theme=theme, css=custom_css) as iface:
312
+ with gr.Box(elem_classes="header-container"):
313
+ gr.Markdown("# Live AI Trainer") # This will now be styled by .header-container and .header-container h1
314
  gr.Markdown("Select an exercise, set your targets, and get real-time feedback on your form and reps.") # Styled by .prose
315
 
316
  with gr.Row():