changed color of nav items in sidebar
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ lemma_counts = load_lemma_count_dict()
|
|
| 49 |
|
| 50 |
|
| 51 |
# Set styles for menu
|
| 52 |
-
|
| 53 |
"container": {"display": "flex", "justify-content": "center"},
|
| 54 |
"nav": {"display": "flex", "gap": "2px", "margin": "5px"},
|
| 55 |
"nav-item": {"flex": "1", "font-family": "Sans-serif"},
|
|
@@ -79,16 +79,25 @@ styles = {
|
|
| 79 |
"icon": {"display": "None"}
|
| 80 |
}
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
with st.sidebar:
|
| 83 |
st.image('images/AGALMA_logo.png', width=250)
|
| 84 |
st.markdown('# ἄγαλμα | AGALMA')
|
| 85 |
selected = option_menu(None, ["App", "About", "FAQ", "License"],
|
| 86 |
-
menu_icon="menu", default_index=0, orientation="vertical")
|
| 87 |
|
| 88 |
if selected == "App":
|
| 89 |
# Horizontal menu
|
| 90 |
active_tab = option_menu(None, ["Nearest neighbours", "Cosine similarity", "3D graph", 'Dictionary'],
|
| 91 |
-
menu_icon="cast", default_index=0, orientation="horizontal", styles=
|
| 92 |
|
| 93 |
|
| 94 |
# Adding CSS style to remove list-style-type
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
# Set styles for menu
|
| 52 |
+
styles_horizontal = {
|
| 53 |
"container": {"display": "flex", "justify-content": "center"},
|
| 54 |
"nav": {"display": "flex", "gap": "2px", "margin": "5px"},
|
| 55 |
"nav-item": {"flex": "1", "font-family": "Sans-serif"},
|
|
|
|
| 79 |
"icon": {"display": "None"}
|
| 80 |
}
|
| 81 |
|
| 82 |
+
|
| 83 |
+
styles_vertical = {
|
| 84 |
+
"nav-link-selected": {
|
| 85 |
+
"background-color": "#B8E52B",
|
| 86 |
+
"color": "white",
|
| 87 |
+
"font-weight": "bold"
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
with st.sidebar:
|
| 92 |
st.image('images/AGALMA_logo.png', width=250)
|
| 93 |
st.markdown('# ἄγαλμα | AGALMA')
|
| 94 |
selected = option_menu(None, ["App", "About", "FAQ", "License"],
|
| 95 |
+
menu_icon="menu", default_index=0, orientation="vertical", styles=styles_vertical)
|
| 96 |
|
| 97 |
if selected == "App":
|
| 98 |
# Horizontal menu
|
| 99 |
active_tab = option_menu(None, ["Nearest neighbours", "Cosine similarity", "3D graph", 'Dictionary'],
|
| 100 |
+
menu_icon="cast", default_index=0, orientation="horizontal", styles=styles_horizontal)
|
| 101 |
|
| 102 |
|
| 103 |
# Adding CSS style to remove list-style-type
|