SHELLAPANDIANGANHUNGING commited on
Commit
d96c2c9
·
verified ·
1 Parent(s): c25a116

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -21
app.py CHANGED
@@ -283,27 +283,26 @@ else:
283
  st.sidebar.markdown('</div>', unsafe_allow_html=True)
284
 
285
 
286
- # =================== HEADER ===================
287
- # Gunakan kolom untuk menyusun logo dan teks secara horizontal
288
- header_cols = st.columns([1, 3]) # Rasio lebar kolom: Logo (kecil), Teks (lebih besar)
289
-
290
- with header_cols[0]:
291
- # Cek apakah file logo ada, lalu tampilkan
292
- logo_path = "pln.png" # Sesuaikan nama file jika berbeda
293
- if os.path.exists(logo_path):
294
- st.image(logo_path, caption="", width=100) # Atur width sesuai kebutuhan
295
- else:
296
- st.warning(f"Logo `{logo_path}` not found. Please place it in the same directory as this script.")
297
-
298
- with header_cols[1]:
299
- st.markdown("""
300
- <div class="main-header">
301
- <h1>PLN Audit Insight & Intelligence Dashboard</h1>
302
- <p style="text-align:center; color:#546e7a; font-size:1.1em; margin-top:8px;">
303
- Operational Risk Intelligence for Audit & Compliance
304
- </p>
305
- </div>
306
- """, unsafe_allow_html=True)
307
 
308
  # =================== 1. Pie Charts: Temuan/Person by Company (PG & UM) - PERBAIKAN ===================
309
  st.markdown("<h3 class='section-title'>OBJECTIVE 1 - Company Reporting Activity: Who Reports the Most?</h3>", unsafe_allow_html=True)
 
283
  st.sidebar.markdown('</div>', unsafe_allow_html=True)
284
 
285
 
286
+ # =================== HEADER DENGAN LOGO DI POJOK KANAN ATAS DALAM BOX ===================
287
+ # Gunakan HTML dan CSS untuk menyusun header dengan logo mengambang di kanan atas
288
+ header_html = f"""
289
+ <div class="main-header" style="position: relative; padding: 25px; box-sizing: border-box;">
290
+ <!-- Logo mengambang (absolute) di pojok kanan atas -->
291
+ <img src="pln.png" style="position: absolute; top: 10px; right: 10px; width: 80px; height: auto; object-fit: contain;" alt="PLN Logo">
292
+
293
+ <!-- Konten teks header -->
294
+ <h1>PLN Audit Insight & Intelligence Dashboard</h1>
295
+ <p style="text-align:center; color:#546e7a; font-size:1.1em; margin-top:8px;">
296
+ Operational Risk Intelligence for Audit & Compliance
297
+ </p>
298
+ </div>
299
+ """
300
+
301
+ st.markdown(header_html, unsafe_allow_html=True)
302
+
303
+ # Pastikan file pln.png ada di direktori yang sama dengan app.py
304
+ if not os.path.exists("pln.png"):
305
+ st.warning("⚠️ File logo `pln.png` tidak ditemukan di direktori aplikasi. Harap letakkan file tersebut di sini.")
 
306
 
307
  # =================== 1. Pie Charts: Temuan/Person by Company (PG & UM) - PERBAIKAN ===================
308
  st.markdown("<h3 class='section-title'>OBJECTIVE 1 - Company Reporting Activity: Who Reports the Most?</h3>", unsafe_allow_html=True)