rafaldembski commited on
Commit
4c70eb3
·
verified ·
1 Parent(s): 9d1d07a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -12
app.py CHANGED
@@ -16,22 +16,41 @@ import os
16
  st.set_page_config(
17
  page_title="📱 Detektor Fałszywych Wiadomości SMS",
18
  page_icon="📱",
19
- layout="wide"
 
20
  )
21
 
22
  # 2. Inicjalizacja pliku statystyk
23
  init_stats_file()
24
 
25
- # 3. Ukryj boczne menu Streamlit za pomocą CSS
26
- hide_sidebar_style = """
27
- <style>
28
- /* Hide the sidebar */
29
  [data-testid="stSidebar"] {
30
  display: none;
31
  }
32
- </style>
33
- """
34
- st.markdown(hide_sidebar_style, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  # 4. Tworzenie poziomego menu
37
  selected = option_menu(
@@ -42,9 +61,9 @@ selected = option_menu(
42
  default_index=0,
43
  orientation="horizontal",
44
  styles={
45
- "container": {"padding": "0!important", "background-color": "#fafafa"},
46
- "icon": {"color": "black", "font-size": "18px"},
47
- "nav-link": {"font-size": "16px", "text-align": "left", "margin":"0px", "--hover-color": "#eee"},
48
  "nav-link-selected": {"background-color": "#02ab21"},
49
  }
50
  )
@@ -65,4 +84,11 @@ elif selected == "Statystyki":
65
  elif selected == "Kontakt":
66
  from pages.Contact import main as show_contact
67
  show_contact()
68
-
 
 
 
 
 
 
 
 
16
  st.set_page_config(
17
  page_title="📱 Detektor Fałszywych Wiadomości SMS",
18
  page_icon="📱",
19
+ layout="wide",
20
+ initial_sidebar_state="collapsed" # Opcjonalnie, jeśli chcesz domyślnie ukryć sidebar
21
  )
22
 
23
  # 2. Inicjalizacja pliku statystyk
24
  init_stats_file()
25
 
26
+ # 3. Dodanie niestandardowego CSS
27
+ custom_css = """
28
+ <style>
29
+ /* Ukryj boczne menu Streamlit */
30
  [data-testid="stSidebar"] {
31
  display: none;
32
  }
33
+
34
+ /* Dostosowanie stylu menu */
35
+ .css-1aumxhk {
36
+ background-color: #0e1117;
37
+ }
38
+
39
+ /* Stylizacja stopki */
40
+ .footer {
41
+ position: fixed;
42
+ left: 0;
43
+ bottom: 0;
44
+ width: 100%;
45
+ background-color: #0e1117;
46
+ color: white;
47
+ text-align: center;
48
+ padding: 10px 0;
49
+ font-size: 0.9em;
50
+ }
51
+ </style>
52
+ """
53
+ st.markdown(custom_css, unsafe_allow_html=True)
54
 
55
  # 4. Tworzenie poziomego menu
56
  selected = option_menu(
 
61
  default_index=0,
62
  orientation="horizontal",
63
  styles={
64
+ "container": {"padding": "0!important", "background-color": "#0e1117"},
65
+ "icon": {"color": "#fafafa", "font-size": "18px"},
66
+ "nav-link": {"font-size": "16px", "text-align": "left", "margin":"0px", "--hover-color": "#333"},
67
  "nav-link-selected": {"background-color": "#02ab21"},
68
  }
69
  )
 
84
  elif selected == "Kontakt":
85
  from pages.Contact import main as show_contact
86
  show_contact()
87
+
88
+ # 6. Dodanie stopki
89
+ footer = """
90
+ <div class="footer">
91
+ &copy; 2024 Rafał Dębski. Wszystkie prawa zastrzeżone.
92
+ </div>
93
+ """
94
+ st.markdown(footer, unsafe_allow_html=True)