import streamlit as st import base64 # ✅ Set Page Config st.set_page_config( page_title="The Ayurveda Explorer", layout="wide", initial_sidebar_state="auto" # Or "collapsed" ) # ✅ Background image function def set_bg(image_file): with open(image_file, "rb") as f: data = f.read() encoded = base64.b64encode(data).decode() css = f""" """ st.markdown(css, unsafe_allow_html=True) # 🔁 Load local background image # Make sure 'background.png' is in the same directory as Homepage.py try: set_bg("background.png") except FileNotFoundError: st.warning("background.png not found. Please add it to your project root.") # ✅ Title st.markdown("""

🌿 Vedica: Ayurveda Explorer

""", unsafe_allow_html=True) st.markdown("""

Welcome to Vedica – explore the depth and wisdom of traditional Indian healing.

""", unsafe_allow_html=True) st.markdown("
", unsafe_allow_html=True) # Adding a little space st.markdown("

Use the buttons below to begin your journey:

", unsafe_allow_html=True) # --- KEY CHANGE: Button Navigation Using st.switch_page --- # This is the modern and recommended way to navigate. # First Row spacer, col1, col2, col3, spacer2 = st.columns([0.5, 1, 1, 1, 0.5]) with col1: if st.button("📜 History & Origins", use_container_width=True): st.switch_page("Pages/history_and_Origins.py") with col2: if st.button("🌿 Principles of Ayurveda", use_container_width=True): st.switch_page("Pages/principles_of_Ayurveda.py") with col3: if st.button("🩺 Symptom & Cure Guide", use_container_width=True): st.switch_page("Pages/Symptoms snd solutions.py") st.markdown("
", unsafe_allow_html=True) # Second Row spacer, col4, col5, col6, spacer2 = st.columns([0.5, 1, 1, 1, 0.5]) with col4: if st.button("🕉️ Sound Therapy", use_container_width=True): st.switch_page("Pages/Sound_Therapy.py") with col5: if st.button("🌱 Poisonous Plants & Ayurvedic Antidote", use_container_width=True): st.switch_page("Pages/Ayurvedic_maps.py") with col6: if st.button("🧘 Yoga Asana", use_container_width=True): st.switch_page("Pages/Yoga_Asana.py") st.markdown("---") st.info("Tip: You can also use the sidebar for full navigation at any time.")