prakharg24 commited on
Commit
0c49767
·
verified ·
1 Parent(s): 49e282a

Update my_pages/home.py

Browse files
Files changed (1) hide show
  1. my_pages/home.py +7 -7
my_pages/home.py CHANGED
@@ -16,6 +16,8 @@ def render():
16
  cursor: pointer;
17
  border: none !important;
18
  display: inline;
 
 
19
  }
20
  button[kind="primary"]:hover {
21
  text-decoration: none;
@@ -31,7 +33,6 @@ def render():
31
  unsafe_allow_html=True,
32
  )
33
 
34
- st.markdown("<div style='text-align: center;'>", unsafe_allow_html=True)
35
  st.markdown(
36
  "<div style='font-size:24px; color:#3366cc; font-weight:bold;'>Explore the concepts:</div>",
37
  unsafe_allow_html=True
@@ -46,20 +47,19 @@ def render():
46
  ("ICA Framework.", "ica"),
47
  ("Multiverse", "multiverse"),
48
  ]
 
49
 
50
  button_clicked_dict = {k[1]: False for k in sentences}
51
  for text, page in sentences:
52
  with stylable_container(
53
  page,
54
- css_styles="""
55
- button {
56
- color: green;
57
- }""",
58
  ):
59
  button_clicked_dict[page] = st.button(text, type="primary")
60
 
61
  for page in button_clicked_dict:
62
  if button_clicked_dict[page]:
63
  go_to(page)
64
-
65
- st.markdown("</div>", unsafe_allow_html=True)
 
16
  cursor: pointer;
17
  border: none !important;
18
  display: inline;
19
+ font-weight:bold;
20
+ font-size:24px;
21
  }
22
  button[kind="primary"]:hover {
23
  text-decoration: none;
 
33
  unsafe_allow_html=True,
34
  )
35
 
 
36
  st.markdown(
37
  "<div style='font-size:24px; color:#3366cc; font-weight:bold;'>Explore the concepts:</div>",
38
  unsafe_allow_html=True
 
47
  ("ICA Framework.", "ica"),
48
  ("Multiverse", "multiverse"),
49
  ]
50
+ color_dict = {"information_loss": "#FF6B6B", "rashomon_effect": "#FFD93D", "developer_decisions": "#6BCB77", "ica": "#FF9F1C", "multiverse": "#9D4EDD"}
51
 
52
  button_clicked_dict = {k[1]: False for k in sentences}
53
  for text, page in sentences:
54
  with stylable_container(
55
  page,
56
+ css_styles=f"""
57
+ button {{
58
+ color: {color_dict[page]};
59
+ }}""",
60
  ):
61
  button_clicked_dict[page] = st.button(text, type="primary")
62
 
63
  for page in button_clicked_dict:
64
  if button_clicked_dict[page]:
65
  go_to(page)