From 45db5dd51b1f5ff2062194bb619ab5b505cef70b Mon Sep 17 00:00:00 2001 From: tannuiscoding Date: Fri, 1 Nov 2024 19:11:32 +0530 Subject: [PATCH 1/4] Added resources in the navbar --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 9ced1d0..0db7a2d 100644 --- a/app.py +++ b/app.py @@ -193,7 +193,7 @@ def main(): selected = option_menu( menu_title=None, - options=["Home", "Calm Space", "About & Feedback","FAQs"], + options=["Home", "Calm Space","Resources" , "About & Feedback","FAQs"], icons=["house-door-fill", "cloud-sun-fill", "chat-dots-fill","question-circle-fill"], menu_icon="sun", From f9b53a79e2f55fa5a5299c62d5de03770ec73deb Mon Sep 17 00:00:00 2001 From: tannuiscoding Date: Fri, 1 Nov 2024 19:40:24 +0530 Subject: [PATCH 2/4] fixed navbar --- app.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/app.py b/app.py index 0db7a2d..3a89c71 100644 --- a/app.py +++ b/app.py @@ -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", @@ -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": From a9b1ab1d12e71a5543fc51ec7275109a09b40513 Mon Sep 17 00:00:00 2001 From: tannuiscoding Date: Mon, 4 Nov 2024 18:40:12 +0530 Subject: [PATCH 3/4] fixed navbar --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 3a89c71..8380d26 100644 --- a/app.py +++ b/app.py @@ -192,7 +192,7 @@ def load_lottie_url(url: str): def main(): selected = option_menu( menu_title="Main Menu", # Added a title for clarity - options=["Home", "Calm Space", "Resources", "About & Feedback", "FAQs"], + 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, From 446a9e334433b61e348825edae9803e75038ed2d Mon Sep 17 00:00:00 2001 From: tannuiscoding Date: Mon, 4 Nov 2024 18:41:30 +0530 Subject: [PATCH 4/4] improved readability --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 8380d26..89f3ee6 100644 --- a/app.py +++ b/app.py @@ -229,8 +229,8 @@ def main(): show_main_page() elif selected == "Calm Space": show_calm_space() - elif selected == "Resources": # Added condition for "Resources" - show_resources() # Call the new function + elif selected == "Resources": + show_resources() elif selected == "About & Feedback": show_about_and_feedback() elif selected == "FAQs":