Spaces:
Sleeping
Sleeping
rafaldembski
commited on
Commit
•
a6aa82f
1
Parent(s):
f4e9414
Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ translations = {
|
|
72 |
}
|
73 |
}
|
74 |
|
75 |
-
# 5.
|
76 |
if 'language' not in st.session_state:
|
77 |
st.session_state.language = 'Polish'
|
78 |
|
@@ -95,7 +95,7 @@ selected_language = st.session_state.language
|
|
95 |
|
96 |
st.markdown(f"**{translations[selected_language]['language_selected']} {selected_language}**")
|
97 |
|
98 |
-
# 6.
|
99 |
menu_keys = ['menu_analysis_sms', 'menu_about', 'menu_education', 'menu_statistics', 'menu_contact']
|
100 |
menu_options = [translations[selected_language][key] for key in menu_keys]
|
101 |
|
@@ -107,23 +107,46 @@ custom_css = """
|
|
107 |
display: flex;
|
108 |
justify-content: center;
|
109 |
align-items: center;
|
110 |
-
background-color: var(--st-secondary-background-color);
|
111 |
padding: 10px 0;
|
112 |
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
113 |
}
|
114 |
|
115 |
-
/*
|
116 |
-
.streamlit-option-menu
|
117 |
-
background-color:
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
119 |
border-radius: 5px;
|
120 |
padding: 8px 16px;
|
|
|
|
|
|
|
121 |
}
|
122 |
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
background-color: transparent;
|
126 |
-
color:
|
127 |
border: none;
|
128 |
border-radius: 5px;
|
129 |
padding: 8px 16px;
|
@@ -132,10 +155,16 @@ custom_css = """
|
|
132 |
cursor: pointer;
|
133 |
}
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
|
141 |
/* Zmiana koloru ikon w menu */
|
|
|
72 |
}
|
73 |
}
|
74 |
|
75 |
+
# 5. Wybór języka z flagami w akordeonie
|
76 |
if 'language' not in st.session_state:
|
77 |
st.session_state.language = 'Polish'
|
78 |
|
|
|
95 |
|
96 |
st.markdown(f"**{translations[selected_language]['language_selected']} {selected_language}**")
|
97 |
|
98 |
+
# 6. Pobranie przetłumaczonych opcji menu
|
99 |
menu_keys = ['menu_analysis_sms', 'menu_about', 'menu_education', 'menu_statistics', 'menu_contact']
|
100 |
menu_options = [translations[selected_language][key] for key in menu_keys]
|
101 |
|
|
|
107 |
display: flex;
|
108 |
justify-content: center;
|
109 |
align-items: center;
|
|
|
110 |
padding: 10px 0;
|
111 |
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
112 |
}
|
113 |
|
114 |
+
/* Light theme styles */
|
115 |
+
html[data-theme="light"] .streamlit-option-menu {
|
116 |
+
background-color: #f0f0f0; /* Jasne tło */
|
117 |
+
}
|
118 |
+
|
119 |
+
html[data-theme="light"] .streamlit-option-menu .menu-item {
|
120 |
+
background-color: transparent;
|
121 |
+
color: #333;
|
122 |
+
border: none;
|
123 |
border-radius: 5px;
|
124 |
padding: 8px 16px;
|
125 |
+
margin: 0 5px;
|
126 |
+
transition: background-color 0.3s, color 0.3s;
|
127 |
+
cursor: pointer;
|
128 |
}
|
129 |
|
130 |
+
html[data-theme="light"] .streamlit-option-menu .menu-item:hover {
|
131 |
+
background-color: #02ab21 !important; /* Zielone tło podczas hover */
|
132 |
+
color: #ffffff !important; /* Biały tekst podczas hover */
|
133 |
+
}
|
134 |
+
|
135 |
+
html[data-theme="light"] .streamlit-option-menu .selected {
|
136 |
+
background-color: #02ab21 !important; /* Zielone tło dla wybranej zakładki */
|
137 |
+
color: #ffffff !important; /* Biały tekst dla wybranej zakładki */
|
138 |
+
border-radius: 5px;
|
139 |
+
padding: 8px 16px;
|
140 |
+
}
|
141 |
+
|
142 |
+
/* Dark theme styles */
|
143 |
+
html[data-theme="dark"] .streamlit-option-menu {
|
144 |
+
background-color: #333; /* Ciemne tło */
|
145 |
+
}
|
146 |
+
|
147 |
+
html[data-theme="dark"] .streamlit-option-menu .menu-item {
|
148 |
background-color: transparent;
|
149 |
+
color: #ffffff;
|
150 |
border: none;
|
151 |
border-radius: 5px;
|
152 |
padding: 8px 16px;
|
|
|
155 |
cursor: pointer;
|
156 |
}
|
157 |
|
158 |
+
html[data-theme="dark"] .streamlit-option-menu .menu-item:hover {
|
159 |
+
background-color: #02ab21 !important; /* Zielone tło podczas hover */
|
160 |
+
color: #ffffff !important; /* Biały tekst podczas hover */
|
161 |
+
}
|
162 |
+
|
163 |
+
html[data-theme="dark"] .streamlit-option-menu .selected {
|
164 |
+
background-color: #02ab21 !important; /* Zielone tło dla wybranej zakładki */
|
165 |
+
color: #ffffff !important; /* Biały tekst dla wybranej zakładki */
|
166 |
+
border-radius: 5px;
|
167 |
+
padding: 8px 16px;
|
168 |
}
|
169 |
|
170 |
/* Zmiana koloru ikon w menu */
|