diff --git a/app.py b/app.py index 06e3932..2f8d37c 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,55 @@ import streamlit as st +import base64 + +def set_background(image_path): + with open(image_path, "rb") as image_file: + encoded_string = base64.b64encode(image_file.read()).decode() + + st.markdown( + f""" + + """, + unsafe_allow_html=True + ) + +# ✅ Set your background image +set_background("static_files/pink.png") # --- Custom CSS for Toggle Button --- diff --git a/css/styles.py b/css/styles.py index ffb9989..68e00e4 100644 --- a/css/styles.py +++ b/css/styles.py @@ -10,13 +10,13 @@ def apply_custom_css(): from core.theme import get_current_theme theme_config = get_current_theme() theme_overrides = { - 'primary': '#6366f1', - 'primary_light': '#818cf8', - 'primary_dark': '#4f46e5', + 'primary': '#ff7096', + 'primary_light': '#ff99ac', + 'primary_dark': '#ff477e', 'secondary': '#ec4899', 'success': '#10b981', - 'warning': '#f59e0b', - 'danger': '#ef4444', + 'warning': '#ff0a54', + 'danger': '#c9184a', 'surface': 'rgba(255,255,255,0.14)', 'surface_alt': 'rgba(25,25,46,0.23)', 'text_primary': '#fff', diff --git a/pages/About.py b/pages/About.py index ec6f660..bfa903d 100644 --- a/pages/About.py +++ b/pages/About.py @@ -35,6 +35,11 @@ def set_background(image_path): background-color: rgba(0, 0, 0, 0); }} + h1 {{ + color: rgb(214, 51, 108) !important; + text-shadow: 1px 1px 2px rgba(0,0,0,0.2); + }} + /* Hide left/right arrow at sidebar bottom */ button[title="Close sidebar"], button[title="Open sidebar"] {{ @@ -46,7 +51,7 @@ def set_background(image_path): ) # ✅ Set your background image -set_background("static_files/mint.png") +set_background("static_files/pink.png") # ------------ About Page Content ------------ st.title("About TalkHeal") diff --git a/pages/AppOverview.py b/pages/AppOverview.py index ff925c7..9f12111 100644 --- a/pages/AppOverview.py +++ b/pages/AppOverview.py @@ -1,4 +1,51 @@ import streamlit as st +import base64 + +def set_background(image_path): + with open(image_path, "rb") as image_file: + encoded_string = base64.b64encode(image_file.read()).decode() + + st.markdown( + f""" + + """, + unsafe_allow_html=True + ) + +# ✅ Set your background image +set_background("static_files/pink.png") + def show_app_overview(): diff --git a/pages/Blog.py b/pages/Blog.py index 096be09..41295b9 100644 --- a/pages/Blog.py +++ b/pages/Blog.py @@ -1,12 +1,70 @@ import streamlit as st +import base64 from datetime import datetime import json import math +def set_background(image_path): + with open(image_path, "rb") as image_file: + encoded_string = base64.b64encode(image_file.read()).decode() + + st.markdown( + f""" + + """, + unsafe_allow_html=True + ) + +# ✅ Set your background image +set_background("static_files/pink.png") + # --- Blog Data --- # In a real app, this might come from a database or a CMS. # For now, we'll store it as a list of dictionaries. + +BLOG_POSTS = [ + { + "id": 1, + "title": "How to Start Your Healing Journey: A Beginner's Guide", + "author": "Team Talkheal", + "date": datetime(2025, 9, 19), + "excerpt": "Healing is not a destination, but a gentle, ongoing process of returning to yourself. This guide offers five simple yet powerful first steps you can take today...", + "featured_image": "static_files/Yoga_Pink.png", + "content": ''' +
Healing is a personal and often non-linear journey. It's about progress, not perfection. If you're feeling lost and don't know where to begin, remember that the smallest step in the right direction can make the biggest difference. Here are five simple yet powerful first steps you can take today.
+ def load_blog_posts(): with open('data/blog_posts.json', 'r') as f: posts = json.load(f) @@ -14,6 +72,7 @@ def load_blog_posts(): post['date'] = datetime.strptime(post['date'], '%Y-%m-%d') return posts + BLOG_POSTS = load_blog_posts() @@ -25,6 +84,83 @@ def get_reading_time(content): return "1 min read" return f"{minutes} min read" +Nature has a profound ability to soothe and heal. If you can, spend 10-15 minutes outdoors. It doesn't have to be a strenuous hike; a simple walk in a local park, sitting on a bench, or even just paying attention to the sky from your window can help. Focus on the sensory details—the feeling of the sun on your skin, the sound of birds, the smell of rain. This helps pull you out of your internal world and into the calming presence of the natural world.
+ +Healing doesn't have to be a solitary journey. Reaching out is a sign of strength, not weakness. This could mean talking to a trusted friend or family member, or simply starting a conversation with your AI companion here at TalkHeal. Sharing your experience can lessen the burden and remind you that you are not alone.
+Remember, your healing journey is uniquely yours. Be patient and compassionate with yourself. Every step, no matter how small, is a victory.
+ ''' + }, + { + "id": 2, + "title": "Your Mood is a Map: How Tracking Your Emotions Can Guide You", + "author": "Team Talkheal", + "date": datetime(2025, 9, 22), + "excerpt": "Our feelings can seem chaotic, but they hold valuable clues to our well-being. Discover how the simple act of tracking your mood can serve as a personal map, guiding you toward greater self-awareness and emotional balance...", + "featured_image": "static_files/Tools_Pink.png", + "content": ''' +Our emotions can often feel like unpredictable weather—stormy one moment, sunny the next. But what if you had a way to navigate this internal landscape? Mood tracking is that compass. It's the simple practice of noting how you feel each day, and it's a powerful tool for self-discovery.
+ +Awareness is the first step to change. By consistently checking in with yourself, you move from being reactive to your emotions to being proactive. Tracking helps you see beyond the immediate feeling and understand the bigger picture of your emotional health. It provides a baseline, allowing you to notice when things are off and celebrate when you're feeling good.
+ +Getting started is easy. Use the Mood Dashboard feature in TalkHeal to log how you're feeling. Was it a 'Happy' day or a 'Stressed' one? You don't need to write a novel. A simple, honest label is enough. The goal is to create a consistent habit of pausing and acknowledging your internal state without judgment.
+ +After a week or two of tracking, you'll have a valuable set of data. Now you can become a detective in your own life. Look for patterns: +
Your mood map isn't just for observation; it's for navigation. Once you identify a pattern, you can make small, intentional changes. If you notice that a morning walk boosts your mood, you can prioritize it. If you find that scrolling social media before bed correlates with anxiety, you can create a new wind-down routine. Your data empowers you to make informed decisions that genuinely support your well-being.
+Your feelings are valid, and they are valuable sources of information. Start tracking your mood today and discover the power of your own emotional map.
+ ''' + }, + { + "id": 3, + "title": "The Science of Small Wins: Building Healthy Habits That Stick", + "author": "Team Talkheal", + "date": datetime(2025, 9, 22), + "excerpt": "Big life changes often start with the smallest steps. We explore the science behind how habits are formed and offer practical, gentle strategies to help you build positive routines that last, one small win at a time...", + "featured_image": "static_files/Home_Pink.png", + "content": ''' +Have you ever set a huge goal—like meditating for 30 minutes every day—only to give up after a few attempts? You're not alone. The secret to lasting change isn't about massive bursts of effort; it's about the quiet, consistent power of small, positive habits.
+ +Scientists who study behavior have identified a simple neurological loop at the core of every habit. It consists of three parts: +
The biggest mistake we make is starting too big. Instead, make your new habit so easy that you can't say no. Want to start journaling? Don't commit to writing three pages; commit to writing one sentence. Want to meditate? Start with one minute. These 'small wins' release dopamine in your brain, creating a positive feedback loop that builds momentum.
+ +A powerful technique is to 'stack' your new habit on top of an existing one. The existing habit acts as the cue. For example: +
Focus on showing up, not on the results. Use the Habit Builder in TalkHeal to track your consistency. Seeing a chain of checkmarks is a powerful reward in itself. It shifts your focus from a distant, intimidating goal to the simple, achievable act of not breaking the chain today. If you miss a day, don't panic. The rule is simple: never miss twice.
+Be patient and celebrate your small wins. Lasting change is a marathon, not a sprint, and it's built one tiny, consistent step at a time.
+ ''' + } +] def show_blog_list(): """Displays the list of blog post summaries.""" @@ -131,4 +267,4 @@ def show(): else: show_blog_list() -show() \ No newline at end of file +show() diff --git a/pages/Breathing_Exercise.py b/pages/Breathing_Exercise.py index e9896d0..a5ec173 100644 --- a/pages/Breathing_Exercise.py +++ b/pages/Breathing_Exercise.py @@ -1,9 +1,60 @@ import streamlit as st +import base64 import time import datetime import json from streamlit_lottie import st_lottie +def set_background(image_path): + with open(image_path, "rb") as image_file: + encoded_string = base64.b64encode(image_file.read()).decode() + + st.markdown( + f""" + + """, + unsafe_allow_html=True + ) + +# ✅ Set your background image +set_background("static_files/pink.png") + # --- CONFIG & CONSTANTS --- TECHNIQUES = { "Default Relaxation (4-2-4)": {"inhale": 4, "hold1": 2, "exhale": 4, "hold2": 0}, @@ -55,7 +106,7 @@ def calculate_weekly_minutes(log): # --- UI VIEWS --- def show_setup_view(): - st.markdown("Connect. Share. Grow.
Welcome! Connect, share, and support each other in a safe, AI-moderated environment.
+We'd love to hear from you! Please fill out the form below or reach out to us via email.
+We respect your privacy and will never share your email.
", unsafe_allow_html=True) + st.markdown("We respect your privacy and will never share your email.
", unsafe_allow_html=True) def show(): """Renders the Newsletter Signup page.""" diff --git a/pages/Pinned_msg.py b/pages/Pinned_msg.py index a76760c..5106717 100644 --- a/pages/Pinned_msg.py +++ b/pages/Pinned_msg.py @@ -50,14 +50,66 @@ def set_background(image_path): ) # Set your background image -set_background("static_files/lavender.png") +set_background("static_files/pink.png") + +def show(): + """Renders a more visually appealing Community page using tabs and icons.""" + + st.markdown(""" + + """, unsafe_allow_html=True) + -def render_pinned_messages_page(): - """Render the pinned messages page""" - st.title("📌 Pinned Messages") - inject_custom_css() # load same chat bubble styles + with st.container(): + + st.markdown(""" +- Connect with licensed mental health professionals, gain valuable insights, and get your questions answered in our expert-led sessions. -
-Connect with licensed mental health professionals, gain valuable insights, and get your questions answered in our expert-led sessions.
+Dr. Rahul Kumar
Clinical Psychologist