SHELLAPANDIANGANHUNGING commited on
Commit
c575d43
·
verified ·
1 Parent(s): 966d943

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -47
app.py CHANGED
@@ -284,68 +284,55 @@ st.sidebar.markdown('</div>', unsafe_allow_html=True)
284
 
285
 
286
  # =================== HEADER ===================
 
 
287
 
288
- # CSS untuk membuat box logo di kanan atas
289
  st.markdown("""
290
  <style>
291
- .header-container {
292
- display: flex;
293
- justify-content: space-between;
294
- align-items: center;
295
- padding: 12px 20px;
296
- border-radius: 10px;
297
- background-color: #ffffff;
298
  border: 1px solid #e0e0e0;
 
 
299
  }
300
-
301
  .header-title {
302
- flex-grow: 1;
303
  text-align: center;
304
  }
305
-
306
- .logo-box {
307
- border: 1px solid #e0e0e0;
308
- padding: 6px;
309
- border-radius: 10px;
310
- background-color: #f8f9fa;
311
- display: flex;
312
- align-items: center;
313
- }
314
  </style>
315
  """, unsafe_allow_html=True)
316
 
 
 
 
 
317
 
318
- # ======== HEADER LAYOUT ========
319
- logo_path = "pln.png"
320
-
321
- st.markdown('<div class="header-container">', unsafe_allow_html=True)
322
 
323
- # ---- TITLE (CENTER) ----
324
- st.markdown("""
325
- <div class="header-title">
326
- <h1 style="margin-bottom:4px;">PLN Audit Insight & Intelligence Dashboard</h1>
327
- <p style="color:#546e7a; font-size:1.05em; margin-top:0px;">
328
- Operational Risk Intelligence for Audit & Compliance
329
- </p>
330
- </div>
331
- """, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
332
 
333
- # ---- LOGO (RIGHT BOX) ----
334
- if os.path.exists(logo_path):
335
- st.markdown(f"""
336
- <div class="logo-box">
337
- <img src="data:image/png;base64,{open(logo_path, "rb").read().hex()}"
338
- width="70">
339
- </div>
340
- """, unsafe_allow_html=True)
341
- else:
342
- st.markdown("""
343
- <div class="logo-box">
344
- <p style="color:red; font-size:0.9em;">Logo missing</p>
345
- </div>
346
- """, unsafe_allow_html=True)
347
 
348
- st.markdown('</div>', unsafe_allow_html=True)
349
 
350
  # =================== 1. Pie Charts: Temuan/Person by Company (PG & UM) - PERBAIKAN ===================
351
  st.markdown("<h3 class='section-title'>OBJECTIVE 1 - Company Reporting Activity: Who Reports the Most?</h3>", unsafe_allow_html=True)
 
284
 
285
 
286
  # =================== HEADER ===================
287
+ import streamlit as st
288
+ import os
289
 
290
+ # CSS biar header terlihat seperti 1 kotak besar
291
  st.markdown("""
292
  <style>
293
+ .header-box {
294
+ padding: 15px 25px;
295
+ background-color: white;
 
 
 
 
296
  border: 1px solid #e0e0e0;
297
+ border-radius: 12px;
298
+ margin-bottom: 25px;
299
  }
 
300
  .header-title {
 
301
  text-align: center;
302
  }
 
 
 
 
 
 
 
 
 
303
  </style>
304
  """, unsafe_allow_html=True)
305
 
306
+ # ==== HEADER LAYOUT (Columns) ====
307
+ with st.container():
308
+ st.markdown('<div class="header-box">', unsafe_allow_html=True)
309
+ col1, col2, col3 = st.columns([1, 5, 1]) # tengah lebih besar
310
 
311
+ # LEFT (kosong)
312
+ with col1:
313
+ st.write("")
 
314
 
315
+ # CENTER TITLE
316
+ with col2:
317
+ st.markdown("""
318
+ <div class="header-title">
319
+ <h1 style="margin-bottom:6px;">PLN Audit Insight & Intelligence Dashboard</h1>
320
+ <p style="color:#546e7a; font-size:1.05em; margin-top:-8px;">
321
+ Operational Risk Intelligence for Audit & Compliance
322
+ </p>
323
+ </div>
324
+ """, unsafe_allow_html=True)
325
+
326
+ # RIGHT — LOGO BOX
327
+ with col3:
328
+ logo_path = "pln.png"
329
+ if os.path.exists(logo_path):
330
+ st.image(logo_path, width=80)
331
+ else:
332
+ st.error("Logo not found")
333
 
334
+ st.markdown("</div>", unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
335
 
 
336
 
337
  # =================== 1. Pie Charts: Temuan/Person by Company (PG & UM) - PERBAIKAN ===================
338
  st.markdown("<h3 class='section-title'>OBJECTIVE 1 - Company Reporting Activity: Who Reports the Most?</h3>", unsafe_allow_html=True)