Update my_pages/home.py
Browse files- my_pages/home.py +14 -4
my_pages/home.py
CHANGED
|
@@ -9,19 +9,18 @@ def render():
|
|
| 9 |
background: none!important;
|
| 10 |
border: none;
|
| 11 |
padding: 0!important;
|
| 12 |
-
color: black !important;
|
| 13 |
text-decoration: none;
|
| 14 |
cursor: pointer;
|
| 15 |
border: none !important;
|
| 16 |
}
|
| 17 |
button[kind="primary"]:hover {
|
| 18 |
text-decoration: none;
|
| 19 |
-
color:
|
| 20 |
}
|
| 21 |
button[kind="primary"]:focus {
|
| 22 |
outline: none !important;
|
| 23 |
box-shadow: none !important;
|
| 24 |
-
color:
|
| 25 |
}
|
| 26 |
</style>
|
| 27 |
""",
|
|
@@ -43,8 +42,19 @@ def render():
|
|
| 43 |
("Multiverse", "multiverse"),
|
| 44 |
]
|
| 45 |
|
|
|
|
| 46 |
for text, page in sentences:
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
go_to(page)
|
| 49 |
|
| 50 |
st.markdown("</div>", unsafe_allow_html=True)
|
|
|
|
| 9 |
background: none!important;
|
| 10 |
border: none;
|
| 11 |
padding: 0!important;
|
|
|
|
| 12 |
text-decoration: none;
|
| 13 |
cursor: pointer;
|
| 14 |
border: none !important;
|
| 15 |
}
|
| 16 |
button[kind="primary"]:hover {
|
| 17 |
text-decoration: none;
|
| 18 |
+
color: #3366cc !important;
|
| 19 |
}
|
| 20 |
button[kind="primary"]:focus {
|
| 21 |
outline: none !important;
|
| 22 |
box-shadow: none !important;
|
| 23 |
+
color: #3366cc !important;
|
| 24 |
}
|
| 25 |
</style>
|
| 26 |
""",
|
|
|
|
| 42 |
("Multiverse", "multiverse"),
|
| 43 |
]
|
| 44 |
|
| 45 |
+
button_clicked_dict = {k[1]: False for k in sentences}
|
| 46 |
for text, page in sentences:
|
| 47 |
+
with stylable_container(
|
| 48 |
+
"green",
|
| 49 |
+
css_styles="""
|
| 50 |
+
button {
|
| 51 |
+
color: green;
|
| 52 |
+
}""",
|
| 53 |
+
):
|
| 54 |
+
button_clicked_dict[page] = st.button(text, type="primary")
|
| 55 |
+
|
| 56 |
+
for page in button_clicked_dict:
|
| 57 |
+
if button_clicked_dict[page]:
|
| 58 |
go_to(page)
|
| 59 |
|
| 60 |
st.markdown("</div>", unsafe_allow_html=True)
|