melisklc0 commited on
Commit
9ab05dd
·
1 Parent(s): b02f059

refactor: Update branding and layout in Streamlit app

Browse files

- Changed the brand subtitle to reflect AI-assisted CT review capabilities.
- Removed the app header section and added a spacer for improved layout above the CT scan/Analysis row.
- Introduced new CSS styles for additional spacing and layout adjustments.

Files changed (2) hide show
  1. src/static/app.css +25 -23
  2. src/streamlit_app.py +3 -8
src/static/app.css CHANGED
@@ -14,6 +14,30 @@ html, body, [class*="css"] {
14
  max-width: 1100px;
15
  }
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  section[data-testid="stSidebar"] {
18
  background-color: #ffffff;
19
  border-right: 1px solid #e2e8f0;
@@ -53,6 +77,7 @@ section[data-testid="stSidebar"] .block-container {
53
 
54
  .brand-sub {
55
  font-size: 0.75rem;
 
56
  color: #64748b;
57
  margin-top: 2px;
58
  }
@@ -117,29 +142,6 @@ section[data-testid="stSidebar"] .block-container {
117
  font-variant-numeric: tabular-nums;
118
  }
119
 
120
- .app-header {
121
- background: linear-gradient(120deg, #0f2b46 0%, #164e73 55%, #1a5f8a 100%);
122
- border-radius: 12px;
123
- padding: 1.75rem 2rem;
124
- margin-bottom: 1.5rem;
125
- color: #ffffff;
126
- }
127
-
128
- .app-header h1 {
129
- margin: 0;
130
- font-size: 1.65rem;
131
- font-weight: 700;
132
- color: #ffffff !important;
133
- letter-spacing: -0.02em;
134
- }
135
-
136
- .app-header p {
137
- margin: 0.4rem 0 0;
138
- color: #cbd5e1;
139
- font-size: 0.95rem;
140
- font-weight: 400;
141
- }
142
-
143
  .verdict-box {
144
  border-radius: 10px;
145
  padding: 1.25rem 1.5rem;
 
14
  max-width: 1100px;
15
  }
16
 
17
+ /* Extra breathing room above the first main row (CT scan / Analysis cards) */
18
+ section[data-testid="stMain"] .block-container {
19
+ padding-top: 3.5rem;
20
+ }
21
+
22
+ /* Spacer block before the two-column layout — survives Streamlit inner margins */
23
+ section[data-testid="stMain"] [data-testid="stMarkdownContainer"]:has(.main-cards-top-gap) {
24
+ margin-top: 0 !important;
25
+ margin-bottom: 0 !important;
26
+ padding-top: 0 !important;
27
+ padding-bottom: 0 !important;
28
+ }
29
+
30
+ section[data-testid="stMain"] [data-testid="stMarkdownContainer"]:has(.main-cards-top-gap) > div {
31
+ padding: 0 !important;
32
+ margin: 0 !important;
33
+ }
34
+
35
+ .main-cards-top-gap {
36
+ display: block;
37
+ height: 2.25rem;
38
+ width: 100%;
39
+ }
40
+
41
  section[data-testid="stSidebar"] {
42
  background-color: #ffffff;
43
  border-right: 1px solid #e2e8f0;
 
77
 
78
  .brand-sub {
79
  font-size: 0.75rem;
80
+ line-height: 1.45;
81
  color: #64748b;
82
  margin-top: 2px;
83
  }
 
142
  font-variant-numeric: tabular-nums;
143
  }
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  .verdict-box {
146
  border-radius: 10px;
147
  padding: 1.25rem 1.5rem;
src/streamlit_app.py CHANGED
@@ -155,7 +155,7 @@ with st.sidebar:
155
  <div class="brand-mark">SC</div>
156
  <div>
157
  <div class="brand-title">Stroke Classification</div>
158
- <div class="brand-sub">Clinical decision support</div>
159
  </div>
160
  </div>
161
  """,
@@ -180,14 +180,9 @@ with st.sidebar:
180
  unsafe_allow_html=True,
181
  )
182
 
183
- # --- Header (render immediately so the page is not blank) ---
184
  st.markdown(
185
- """
186
- <div class="app-header">
187
- <h1>Stroke Detection</h1>
188
- <p>AI-assisted CT review powered by knowledge-distilled EfficientNet-B0</p>
189
- </div>
190
- """,
191
  unsafe_allow_html=True,
192
  )
193
 
 
155
  <div class="brand-mark">SC</div>
156
  <div>
157
  <div class="brand-title">Stroke Classification</div>
158
+ <div class="brand-sub">AI-assisted CT review powered by knowledge-distilled EfficientNet-B0</div>
159
  </div>
160
  </div>
161
  """,
 
180
  unsafe_allow_html=True,
181
  )
182
 
183
+ # Visible gap above the CT scan / Analysis row (Streamlit main chrome eats plain padding)
184
  st.markdown(
185
+ '<div class="main-cards-top-gap" aria-hidden="true"></div>',
 
 
 
 
 
186
  unsafe_allow_html=True,
187
  )
188