Skip to content

Commit

Permalink
fixed navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
tannuiscoding committed Nov 1, 2024
1 parent 45db5dd commit f9b53a7
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,9 @@ def load_lottie_url(url: str):
# Main function to control page navigation
def main():
selected = option_menu(
menu_title=None,

options=["Home", "Calm Space","Resources" , "About & Feedback","FAQs"],
icons=["house-door-fill", "cloud-sun-fill", "chat-dots-fill","question-circle-fill"],

menu_title="Main Menu", # Added a title for clarity
options=["Home", "Calm Space", "Resources", "About & Feedback", "FAQs"],
icons=["house-door-fill", "cloud-sun-fill", "chat-dots-fill", "question-circle-fill"],
menu_icon="sun",
default_index=0,
orientation="horizontal",
Expand All @@ -205,27 +203,28 @@ def main():
"background-color": "#333",
"border-radius": "10px",
"box-shadow": "0 4px 6px rgba(0, 0, 0, 0.1)",
"width": "100%", # Increase the width of the menu bar
"max-width": "100%", # Prevent overflow
"width": "100%",
"max-width": "100%",
},
"nav-link": {
"font-size": "18px",
"text-align": "center",
"margin": "0 20px", # Increase left and right margin to expand space between items
"margin": "0 20px",
"--hover-color": "#ddd",
"border-radius": "10px",
"color": "#fff",
"background-color": "rgba(0, 0, 0, 0.8)", # More opaque background
"transition": "background-color 0.3s ease, transform 0.2s"
"background-color": "rgba(0, 0, 0, 0.8)",
"transition": "background-color 0.3s ease, transform 0.2s",
},
"nav-link-selected": {
"background-color": "#04AA6D",
"color": "#fff",
"font-size": "14px",
"font-size": "16px",
"font-weight": "bold",
"transform": "scale(1.1)",
}
}
)

if selected == "Home":
show_main_page()
elif selected == "Calm Space":
Expand Down

0 comments on commit f9b53a7

Please sign in to comment.