File size: 1,265 Bytes
d1fd9e1
785400f
 
 
d1fd9e1
785400f
 
d1fd9e1
 
 
 
785400f
d1fd9e1
 
 
 
 
 
 
 
 
 
 
 
 
 
785400f
 
d1fd9e1
f972805
 
d1fd9e1
49363c2
 
f2e849e
 
617e380
f2e849e
49363c2
f972805
a684a19
8d79749
d1fd9e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import base64

import streamlit as st

st.set_page_config(page_title=" ShadowLog ", page_icon="assets/logo.png", layout="wide")


def add_logo():
    # Lecture du fichier image local
    with open("assets/small_logo_no_text.png", "rb") as f:
        logo_data = base64.b64encode(f.read()).decode()

    st.markdown(
        f"""
        <style>
            [data-testid="stSidebarNav"] {{
                background-image: url("data:image/png;base64,{logo_data}");
                background-repeat: no-repeat;
                padding-top: 225px;
                background-position: center 20px;
                background-size: 50%;
            }}
        </style>
        """,
        unsafe_allow_html=True,
    )


add_logo()


# Pages definition
home = st.Page("sections/home.py", title="🏠 Home")
upload = st.Page("sections/upload.py", title="📥 Upload")
statistics = st.Page("sections/statistics.py", title="📈 Statistics")
analyze = st.Page("sections/analyze.py", title="🔍 Analyze")
analytics = st.Page("sections/analytics.py", title="🤖 Analytics")
alerts = st.Page("sections/alerts.py", title="🚨 Alerts")
about = st.Page("sections/about.py", title="📄 About")


pg = st.navigation([home, upload, statistics, analyze, analytics])
pg.run()