ysharma HF Staff commited on
Commit
213b28b
·
verified ·
1 Parent(s): dad5321

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -50
app.py CHANGED
@@ -28,7 +28,7 @@ DISCORD_INVITE = "https://discord.gg/YHECTft87Z"
28
  DISCORD_CHANNEL = "build-small-hackathon-official"
29
 
30
 
31
- HEADER_HTML = """
32
  <div class="bsh-banner">
33
  <h1>🪵 Build Small Hackathon</h1>
34
  <div class="tagline">Making AI Fun Again</div>
@@ -37,6 +37,13 @@ HEADER_HTML = """
37
  </div>
38
  """
39
 
 
 
 
 
 
 
 
40
  INFO_ROW_HTML = """
41
  <div class="bsh-info-row">
42
  <div class="bsh-card">
@@ -77,16 +84,16 @@ DATES_ROW_HTML = """
77
  <div class="bsh-dates">
78
  <div class="bsh-title">✦ Trail Map · Key Dates</div>
79
  <div class="bsh-dates-grid">
80
- <div>📅 <b>Reg closes:</b> Wed, May 27 · 23:59 UTC</div>
81
- <div>🎟️ <b>Credits:</b> Thu, May 28</div>
82
- <div>🚀 <b>Hack opens:</b> Fri, May 29</div>
83
- <div>🏁 <b>Submit by:</b> Mon, June 8</div>
84
  </div>
85
- <div class="bsh-warn">⛔ No registrations accepted once the event starts. Lock it in before May 27!</div>
86
  </div>
87
  <div class="bsh-counter">
88
- <div class="bsh-counter-title">🏕️ Hack opens in</div>
89
- <div class="bsh-counter-target">May 29, 2026 · 00:00 UTC</div>
90
  <div class="bsh-nums">
91
  <div class="bsh-unit"><span class="bsh-num" id="bsh-days">--</span><span class="bsh-lbl">Days</span></div>
92
  <div class="bsh-unit"><span class="bsh-num" id="bsh-hours">--</span><span class="bsh-lbl">Hrs</span></div>
@@ -105,7 +112,7 @@ DISCORD_RIBBON_HTML = f"""
105
 
106
  COUNTDOWN_JS = """
107
  () => {
108
- const targetDate = new Date(Date.UTC(2026, 4, 29, 0, 0, 0));
109
  function update() {
110
  const now = new Date();
111
  const diff = targetDate - now;
@@ -463,44 +470,18 @@ body.dark .gradio-container,
463
  }
464
 
465
  /* Banner */
466
- .bsh-banner {
467
- background: var(--bsh-banner-bg);
468
- color: var(--bsh-banner-text);
469
- border-radius: 14px;
470
- padding: 20px 22px;
471
  margin: 0 0 12px 0;
472
- text-align: center;
 
473
  border: 1px solid var(--bsh-card-border);
474
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
 
475
  }
476
- .bsh-banner h1 {
477
- margin: 0 0 4px 0 !important;
478
- font-size: 28px !important;
479
- font-weight: 800 !important;
480
- letter-spacing: -0.5px !important;
481
- color: var(--bsh-banner-text) !important;
482
- line-height: 1.15 !important;
483
- }
484
- .bsh-banner .tagline {
485
- font-size: 16px;
486
- font-style: italic;
487
- opacity: 0.92;
488
- margin-bottom: 4px;
489
- }
490
- .bsh-banner .meta {
491
- font-size: 14px;
492
- opacity: 0.85;
493
- }
494
- .bsh-banner .placeholder {
495
- margin-top: 12px;
496
- display: inline-block;
497
- background: rgba(245, 236, 217, 0.12);
498
- border: 1px dashed rgba(245, 236, 217, 0.40);
499
- border-radius: 6px;
500
- padding: 4px 12px;
501
- font-size: 11px;
502
- opacity: 0.80;
503
- letter-spacing: 0.3px;
504
  }
505
 
506
  /* Three-card info row */
@@ -597,7 +578,7 @@ body.dark .gradio-container,
597
  font-size: 13px;
598
  color: var(--bsh-text);
599
  }
600
- .bsh-dates-grid b { color: var(--bsh-accent); font-weight: 700; }
601
  .bsh-warn {
602
  margin-top: 10px;
603
  background: var(--bsh-warn-bg);
@@ -614,14 +595,14 @@ body.dark .gradio-container,
614
  border: 1px solid var(--bsh-card-border);
615
  border-radius: 10px;
616
  padding: 12px 14px;
617
- color: var(--bsh-counter-num);
618
  text-align: center;
619
  display: flex;
620
  flex-direction: column;
621
  justify-content: center;
622
  }
623
  .bsh-counter-title {
624
- color: var(--bsh-counter-num);
625
  font-size: 11px;
626
  letter-spacing: 1.5px;
627
  font-weight: 800;
@@ -629,7 +610,7 @@ body.dark .gradio-container,
629
  margin-bottom: 2px;
630
  }
631
  .bsh-counter-target {
632
- color: var(--bsh-counter-label);
633
  font-size: 11px;
634
  font-style: italic;
635
  margin-bottom: 8px;
@@ -649,13 +630,13 @@ body.dark .gradio-container,
649
  font-family: 'Courier New', monospace;
650
  font-size: 22px;
651
  font-weight: 700;
652
- color: var(--bsh-counter-num);
653
  line-height: 1;
654
  }
655
  .bsh-lbl {
656
  font-size: 9px;
657
  letter-spacing: 1px;
658
- color: var(--bsh-counter-label);
659
  margin-top: 4px;
660
  text-transform: uppercase;
661
  }
@@ -721,7 +702,6 @@ body.dark .gradio-container,
721
  @media (max-width: 760px) {
722
  .bsh-info-row { grid-template-columns: 1fr; }
723
  .bsh-dates-row { grid-template-columns: 1fr; }
724
- .bsh-banner h1 { font-size: 24px !important; }
725
  }
726
  """
727
 
 
28
  DISCORD_CHANNEL = "build-small-hackathon-official"
29
 
30
 
31
+ HEADER_HTML_OLD = """
32
  <div class="bsh-banner">
33
  <h1>🪵 Build Small Hackathon</h1>
34
  <div class="tagline">Making AI Fun Again</div>
 
37
  </div>
38
  """
39
 
40
+ HEADER_HTML = """
41
+ <div class="bsh-banner-img">
42
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/60d2dc1007da9c17c72708f8/Ctx1Jh4nImulMYS2PRClZ.png"
43
+ alt="Build Small Hackathon — Small Models, Big Adventures" />
44
+ </div>
45
+ """
46
+
47
  INFO_ROW_HTML = """
48
  <div class="bsh-info-row">
49
  <div class="bsh-card">
 
84
  <div class="bsh-dates">
85
  <div class="bsh-title">✦ Trail Map · Key Dates</div>
86
  <div class="bsh-dates-grid">
87
+ <div>📅 <b>Reg closes:</b> Wed, June 3 · 23:59 UTC</div>
88
+ <div>🎟️ <b>Credits:</b> Thu, June 4</div>
89
+ <div>🚀 <b>Hack opens:</b> Fri, June 5 · 00:01 UTC</div>
90
+ <div>🏁 <b>Submit by:</b> Mon, June 15 · 23:59 UTC</div>
91
  </div>
92
+ <div class="bsh-warn">⛔ No registrations accepted once the event starts. Lock it in before June 3!</div>
93
  </div>
94
  <div class="bsh-counter">
95
+ <div class="bsh-counter-title"> Registration closes in</div>
96
+ <div class="bsh-counter-target">June 3, 2026 · 23:59 UTC</div>
97
  <div class="bsh-nums">
98
  <div class="bsh-unit"><span class="bsh-num" id="bsh-days">--</span><span class="bsh-lbl">Days</span></div>
99
  <div class="bsh-unit"><span class="bsh-num" id="bsh-hours">--</span><span class="bsh-lbl">Hrs</span></div>
 
112
 
113
  COUNTDOWN_JS = """
114
  () => {
115
+ const targetDate = new Date(Date.UTC(2026, 5, 4, 0, 0, 0));
116
  function update() {
117
  const now = new Date();
118
  const diff = targetDate - now;
 
470
  }
471
 
472
  /* Banner */
473
+ .bsh-banner-img {
 
 
 
 
474
  margin: 0 0 12px 0;
475
+ border-radius: 14px;
476
+ overflow: hidden;
477
  border: 1px solid var(--bsh-card-border);
478
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
479
+ line-height: 0; /* kills the phantom gap under the img */
480
  }
481
+ .bsh-banner-img img {
482
+ display: block;
483
+ width: 100%;
484
+ height: auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
  }
486
 
487
  /* Three-card info row */
 
578
  font-size: 13px;
579
  color: var(--bsh-text);
580
  }
581
+ .bsh-dates-grid b { color: var(--bsh-accent) !important; font-weight: 700; }
582
  .bsh-warn {
583
  margin-top: 10px;
584
  background: var(--bsh-warn-bg);
 
595
  border: 1px solid var(--bsh-card-border);
596
  border-radius: 10px;
597
  padding: 12px 14px;
598
+ color: var(--bsh-counter-num) !important;
599
  text-align: center;
600
  display: flex;
601
  flex-direction: column;
602
  justify-content: center;
603
  }
604
  .bsh-counter-title {
605
+ color: var(--bsh-counter-num) !important;
606
  font-size: 11px;
607
  letter-spacing: 1.5px;
608
  font-weight: 800;
 
610
  margin-bottom: 2px;
611
  }
612
  .bsh-counter-target {
613
+ color: var(--bsh-counter-label) !important;
614
  font-size: 11px;
615
  font-style: italic;
616
  margin-bottom: 8px;
 
630
  font-family: 'Courier New', monospace;
631
  font-size: 22px;
632
  font-weight: 700;
633
+ color: var(--bsh-counter-num) !important;
634
  line-height: 1;
635
  }
636
  .bsh-lbl {
637
  font-size: 9px;
638
  letter-spacing: 1px;
639
+ color: var(--bsh-counter-label) !important;
640
  margin-top: 4px;
641
  text-transform: uppercase;
642
  }
 
702
  @media (max-width: 760px) {
703
  .bsh-info-row { grid-template-columns: 1fr; }
704
  .bsh-dates-row { grid-template-columns: 1fr; }
 
705
  }
706
  """
707