Esvanth commited on
Commit
8120987
Β·
1 Parent(s): c75490d

Coloured hero stats cards, remove dash comments

Browse files
Files changed (1) hide show
  1. app.py +37 -22
app.py CHANGED
@@ -137,13 +137,13 @@ st.markdown("""
137
 
138
  *, *::before, *::after { font-family: 'Inter', -apple-system, sans-serif !important; box-sizing: border-box; }
139
 
140
- /* ── Base ── */
141
  [data-testid="stAppViewContainer"] { background: #f0f2f8 !important; }
142
  .block-container { padding: .8rem 1.6rem 4rem !important; max-width: 1300px !important; }
143
  #MainMenu, footer, header { visibility: hidden; }
144
  ::-webkit-scrollbar { width: 4px; } ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
145
 
146
- /* ── Tabs ── */
147
  .stTabs [data-baseweb="tab-list"] {
148
  background: #fff; border-radius: 18px; padding: 6px; gap: 4px;
149
  box-shadow: 0 4px 30px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
@@ -159,7 +159,7 @@ st.markdown("""
159
  color: #fff !important; box-shadow: 0 4px 14px rgba(30,41,59,.3) !important;
160
  }
161
 
162
- /* ── Hero ── */
163
  .hero {
164
  background: linear-gradient(140deg, #0a0e1a 0%, #0f1c35 45%, #091428 100%);
165
  border-radius: 22px; padding: 34px 38px 30px; margin-bottom: 22px;
@@ -208,7 +208,7 @@ st.markdown("""
208
  text-transform: uppercase; letter-spacing: .1em; margin-top: 5px;
209
  }
210
 
211
- /* ── Task cards ── */
212
  .task-card {
213
  background: #fff; border-radius: 18px; padding: 20px 22px;
214
  margin-bottom: 18px; border: 1px solid #e2e8f0;
@@ -227,7 +227,7 @@ st.markdown("""
227
  }
228
  .task-desc { font-size: .81rem; color: #64748b; line-height: 1.7; }
229
 
230
- /* ── Insight ── */
231
  .insight {
232
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
233
  border: 1px solid #86efac; border-radius: 16px;
@@ -244,7 +244,7 @@ st.markdown("""
244
  box-shadow: 0 3px 8px rgba(5,150,105,.35);
245
  }
246
 
247
- /* ── Warn ── */
248
  .warn-box {
249
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
250
  border: 1px solid #fcd34d; border-radius: 16px;
@@ -261,7 +261,7 @@ st.markdown("""
261
  box-shadow: 0 3px 8px rgba(217,119,6,.35);
262
  }
263
 
264
- /* ── Terminal ── */
265
  .term { border-radius: 14px; overflow: hidden; margin: 10px 0; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
266
  .term-top { background: #1e293b; padding: 9px 16px; display: flex; gap: 7px; align-items: center; }
267
  .dot { width: 11px; height: 11px; border-radius: 50%; }
@@ -272,7 +272,7 @@ st.markdown("""
272
  white-space: pre-wrap; line-height: 1.8; max-height: 280px; overflow-y: auto;
273
  }
274
 
275
- /* ── Section heading ── */
276
  .sec-head {
277
  font-size: .9rem; font-weight: 800; color: #0f172a;
278
  letter-spacing: -.02em; margin: 20px 0 12px;
@@ -280,18 +280,18 @@ st.markdown("""
280
  }
281
  .sec-head::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, #e2e8f0, transparent); border-radius: 2px; }
282
 
283
- /* ── Slabel ── */
284
  .slabel {
285
  font-size: .67rem; font-weight: 800; color: #94a3b8;
286
  text-transform: uppercase; letter-spacing: .11em; margin-bottom: 10px;
287
  }
288
 
289
- /* ── Legend ── */
290
  .leg { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
291
  .li { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: #475569; font-weight: 600; }
292
  .ld { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
293
 
294
- /* ── Metrics ── */
295
  div[data-testid="metric-container"] {
296
  background: #fff; border-radius: 16px; padding: 18px 20px;
297
  border: 1px solid #e2e8f0; box-shadow: 0 4px 20px rgba(0,0,0,.05);
@@ -301,7 +301,7 @@ div[data-testid="metric-container"]:hover { transform: translateY(-3px); box-sha
301
  div[data-testid="metric-container"] label { font-size: .68rem !important; font-weight: 800 !important; color: #94a3b8 !important; text-transform: uppercase; letter-spacing: .08em; }
302
  div[data-testid="metric-container"] [data-testid="stMetricValue"] { font-size: 1.5rem !important; font-weight: 900 !important; color: #0f172a !important; letter-spacing: -.03em; }
303
 
304
- /* ── Buttons ── */
305
  .stButton > button {
306
  border-radius: 12px !important; font-weight: 700 !important;
307
  font-size: .82rem !important; letter-spacing: .01em !important;
@@ -318,7 +318,7 @@ div[data-testid="stButton"] > button[kind="primary"]:hover {
318
  transform: translateY(-1px) !important;
319
  }
320
 
321
- /* ── Sidebar ── */
322
  [data-testid="stSidebar"] {
323
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
324
  border-right: 1px solid #e2e8f0 !important;
@@ -351,13 +351,13 @@ div[data-testid="stButton"] > button[kind="primary"]:hover {
351
  .sb-done { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
352
  .sb-pending { background: #f8fafc; color: #94a3b8; border: 1px solid #e8edf5; }
353
 
354
- /* ── Dataframe ── */
355
  .stDataFrame { border-radius: 14px !important; overflow: hidden !important; box-shadow: 0 2px 12px rgba(0,0,0,.04) !important; }
356
 
357
- /* ── Expander ── */
358
  summary { border-radius: 10px !important; font-size: .8rem !important; font-weight: 600 !important; }
359
 
360
- /* ── Slider ── */
361
  .stSlider [data-testid="stTickBarMin"], .stSlider [data-testid="stTickBarMax"] { font-size: .72rem !important; }
362
  </style>
363
  """, unsafe_allow_html=True)
@@ -404,12 +404,27 @@ st.markdown("""
404
  <div class='hero'>
405
  <div class='hero-title'>EcoCart AI System</div>
406
  <div class='hero-sub'>Six AI tasks built to solve one real logistics problem β€” every chart and number runs from actual Python scripts</div>
407
- <div class='hero-stats'>
408
- <div class='hero-stat'><span class='hero-stat-num'>6</span><span class='hero-stat-lbl'>Tasks</span></div>
409
- <div class='hero-stat'><span class='hero-stat-num'>4</span><span class='hero-stat-lbl'>Algorithms</span></div>
410
- <div class='hero-stat'><span class='hero-stat-num'>730</span><span class='hero-stat-lbl'>Days Data</span></div>
411
- <div class='hero-stat'><span class='hero-stat-num'>20</span><span class='hero-stat-lbl'>Node Network</span></div>
412
- <div class='hero-stat'><span class='hero-stat-num'>0.847</span><span class='hero-stat-lbl'>DI Score</span></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  </div>
414
  </div>""", unsafe_allow_html=True)
415
 
 
137
 
138
  *, *::before, *::after { font-family: 'Inter', -apple-system, sans-serif !important; box-sizing: border-box; }
139
 
140
+ /* Base */
141
  [data-testid="stAppViewContainer"] { background: #f0f2f8 !important; }
142
  .block-container { padding: .8rem 1.6rem 4rem !important; max-width: 1300px !important; }
143
  #MainMenu, footer, header { visibility: hidden; }
144
  ::-webkit-scrollbar { width: 4px; } ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
145
 
146
+ /* Tabs */
147
  .stTabs [data-baseweb="tab-list"] {
148
  background: #fff; border-radius: 18px; padding: 6px; gap: 4px;
149
  box-shadow: 0 4px 30px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
 
159
  color: #fff !important; box-shadow: 0 4px 14px rgba(30,41,59,.3) !important;
160
  }
161
 
162
+ /* Hero */
163
  .hero {
164
  background: linear-gradient(140deg, #0a0e1a 0%, #0f1c35 45%, #091428 100%);
165
  border-radius: 22px; padding: 34px 38px 30px; margin-bottom: 22px;
 
208
  text-transform: uppercase; letter-spacing: .1em; margin-top: 5px;
209
  }
210
 
211
+ /* Task cards */
212
  .task-card {
213
  background: #fff; border-radius: 18px; padding: 20px 22px;
214
  margin-bottom: 18px; border: 1px solid #e2e8f0;
 
227
  }
228
  .task-desc { font-size: .81rem; color: #64748b; line-height: 1.7; }
229
 
230
+ /* Insight */
231
  .insight {
232
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
233
  border: 1px solid #86efac; border-radius: 16px;
 
244
  box-shadow: 0 3px 8px rgba(5,150,105,.35);
245
  }
246
 
247
+ /* Warn */
248
  .warn-box {
249
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
250
  border: 1px solid #fcd34d; border-radius: 16px;
 
261
  box-shadow: 0 3px 8px rgba(217,119,6,.35);
262
  }
263
 
264
+ /* Terminal */
265
  .term { border-radius: 14px; overflow: hidden; margin: 10px 0; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
266
  .term-top { background: #1e293b; padding: 9px 16px; display: flex; gap: 7px; align-items: center; }
267
  .dot { width: 11px; height: 11px; border-radius: 50%; }
 
272
  white-space: pre-wrap; line-height: 1.8; max-height: 280px; overflow-y: auto;
273
  }
274
 
275
+ /* Section heading */
276
  .sec-head {
277
  font-size: .9rem; font-weight: 800; color: #0f172a;
278
  letter-spacing: -.02em; margin: 20px 0 12px;
 
280
  }
281
  .sec-head::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, #e2e8f0, transparent); border-radius: 2px; }
282
 
283
+ /* Slabel */
284
  .slabel {
285
  font-size: .67rem; font-weight: 800; color: #94a3b8;
286
  text-transform: uppercase; letter-spacing: .11em; margin-bottom: 10px;
287
  }
288
 
289
+ /* Legend */
290
  .leg { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
291
  .li { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: #475569; font-weight: 600; }
292
  .ld { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
293
 
294
+ /* Metrics */
295
  div[data-testid="metric-container"] {
296
  background: #fff; border-radius: 16px; padding: 18px 20px;
297
  border: 1px solid #e2e8f0; box-shadow: 0 4px 20px rgba(0,0,0,.05);
 
301
  div[data-testid="metric-container"] label { font-size: .68rem !important; font-weight: 800 !important; color: #94a3b8 !important; text-transform: uppercase; letter-spacing: .08em; }
302
  div[data-testid="metric-container"] [data-testid="stMetricValue"] { font-size: 1.5rem !important; font-weight: 900 !important; color: #0f172a !important; letter-spacing: -.03em; }
303
 
304
+ /* Buttons */
305
  .stButton > button {
306
  border-radius: 12px !important; font-weight: 700 !important;
307
  font-size: .82rem !important; letter-spacing: .01em !important;
 
318
  transform: translateY(-1px) !important;
319
  }
320
 
321
+ /* Sidebar */
322
  [data-testid="stSidebar"] {
323
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
324
  border-right: 1px solid #e2e8f0 !important;
 
351
  .sb-done { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
352
  .sb-pending { background: #f8fafc; color: #94a3b8; border: 1px solid #e8edf5; }
353
 
354
+ /* Dataframe */
355
  .stDataFrame { border-radius: 14px !important; overflow: hidden !important; box-shadow: 0 2px 12px rgba(0,0,0,.04) !important; }
356
 
357
+ /* Expander */
358
  summary { border-radius: 10px !important; font-size: .8rem !important; font-weight: 600 !important; }
359
 
360
+ /* Slider */
361
  .stSlider [data-testid="stTickBarMin"], .stSlider [data-testid="stTickBarMax"] { font-size: .72rem !important; }
362
  </style>
363
  """, unsafe_allow_html=True)
 
404
  <div class='hero'>
405
  <div class='hero-title'>EcoCart AI System</div>
406
  <div class='hero-sub'>Six AI tasks built to solve one real logistics problem β€” every chart and number runs from actual Python scripts</div>
407
+ <div style='display:flex;gap:10px;flex-wrap:wrap;'>
408
+ <div style='background:rgba(96,165,250,.13);border:1px solid rgba(96,165,250,.22);border-radius:14px;padding:12px 20px;text-align:center;min-width:80px;'>
409
+ <div style='color:#60a5fa;font-size:1.6rem;font-weight:900;letter-spacing:-.04em;line-height:1;'>6</div>
410
+ <div style='color:#475569;font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;margin-top:5px;'>Tasks</div>
411
+ </div>
412
+ <div style='background:rgba(167,139,250,.13);border:1px solid rgba(167,139,250,.22);border-radius:14px;padding:12px 20px;text-align:center;min-width:80px;'>
413
+ <div style='color:#a78bfa;font-size:1.6rem;font-weight:900;letter-spacing:-.04em;line-height:1;'>4</div>
414
+ <div style='color:#475569;font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;margin-top:5px;'>Algorithms</div>
415
+ </div>
416
+ <div style='background:rgba(251,191,36,.13);border:1px solid rgba(251,191,36,.22);border-radius:14px;padding:12px 20px;text-align:center;min-width:80px;'>
417
+ <div style='color:#fbbf24;font-size:1.6rem;font-weight:900;letter-spacing:-.04em;line-height:1;'>730</div>
418
+ <div style='color:#475569;font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;margin-top:5px;'>Days Data</div>
419
+ </div>
420
+ <div style='background:rgba(52,211,153,.13);border:1px solid rgba(52,211,153,.22);border-radius:14px;padding:12px 20px;text-align:center;min-width:80px;'>
421
+ <div style='color:#34d399;font-size:1.6rem;font-weight:900;letter-spacing:-.04em;line-height:1;'>20</div>
422
+ <div style='color:#475569;font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;margin-top:5px;'>Node Network</div>
423
+ </div>
424
+ <div style='background:rgba(34,211,238,.13);border:1px solid rgba(34,211,238,.22);border-radius:14px;padding:12px 20px;text-align:center;min-width:80px;'>
425
+ <div style='color:#22d3ee;font-size:1.6rem;font-weight:900;letter-spacing:-.04em;line-height:1;'>0.847</div>
426
+ <div style='color:#475569;font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;margin-top:5px;'>DI Score</div>
427
+ </div>
428
  </div>
429
  </div>""", unsafe_allow_html=True)
430