jostlebot commited on
Commit
86c91b1
·
1 Parent(s): 0297f64

Simplify UI, add comprehensive resources, and improve readability

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +122 -110
src/streamlit_app.py CHANGED
@@ -12,7 +12,7 @@ st.set_page_config(
12
  initial_sidebar_state="expanded"
13
  )
14
 
15
- # Custom CSS for warm, earth-toned design
16
  st.markdown("""
17
  <style>
18
  /* Custom fonts */
@@ -20,13 +20,13 @@ st.markdown("""
20
 
21
  /* Main container styling */
22
  .stApp {
23
- background-color: #FAF6F2; /* Warmer, lighter background */
24
  }
25
 
26
  /* Headers */
27
  h1, h2, h3 {
28
  font-family: 'Inter', sans-serif;
29
- color: #3D3235; /* Darker, more readable warm gray */
30
  font-weight: 600;
31
  margin-bottom: 1.2rem;
32
  }
@@ -34,126 +34,81 @@ st.markdown("""
34
  /* Text areas and inputs */
35
  .stTextArea, .stTextInput {
36
  background-color: #FFFFFF;
37
- border-radius: 0.8rem;
38
- border: 1px solid #D4C5B9; /* Darker border for better definition */
39
  padding: 1.2rem;
40
- box-shadow: 0 2px 6px rgba(0,0,0,0.05);
 
41
  }
42
 
43
  /* Buttons */
44
  .stButton > button {
45
- background-color: #7A8B73; /* Slightly darker sage for better contrast */
46
  color: white;
47
- border-radius: 0.8rem;
48
- padding: 0.6rem 1.8rem;
49
  border: none;
50
- box-shadow: 0 2px 4px rgba(0,0,0,0.15);
 
51
  font-family: 'Inter', sans-serif;
52
  font-weight: 500;
53
- transition: all 0.3s ease;
54
  }
55
 
56
  .stButton > button:hover {
57
- background-color: #697A62; /* Even darker on hover */
58
- transform: translateY(-1px);
59
- }
60
-
61
- /* Tone badges */
62
- .tone-badge {
63
- padding: 0.4rem 1rem;
64
- border-radius: 0.8rem;
65
- font-size: 0.9em;
66
- display: inline-block;
67
- margin-bottom: 0.8rem;
68
- font-weight: 500;
69
- }
70
-
71
- .tone-warm {
72
- background-color: #FFE4CC; /* Warmer gold */
73
- color: #96642D; /* Darker text for better contrast */
74
- }
75
-
76
- .tone-reflective {
77
- background-color: #D7E8D5; /* Deeper green */
78
- color: #4B6D5F;
79
- }
80
-
81
- .tone-encouraging {
82
- background-color: #E0E4F5; /* Deeper lavender */
83
- color: #505FA6;
84
- }
85
-
86
- .tone-direct {
87
- background-color: #E2E7EC; /* Deeper slate */
88
- color: #3F525C;
89
- }
90
-
91
- /* Expander styling */
92
- .streamlit-expanderHeader {
93
- background-color: #FFFFFF; /* White background for better contrast */
94
- border-radius: 0.8rem;
95
- border: 1px solid #D4C5B9;
96
- padding: 0.8rem;
97
- }
98
-
99
- /* Sidebar */
100
- .css-1d391kg { /* Sidebar */
101
- background-color: #FFFFFF; /* White background */
102
- border-right: 1px solid #D4C5B9;
103
  }
104
 
105
  /* Markdown text */
106
  p, li {
107
  font-family: 'Inter', sans-serif;
108
- color: #3D3235; /* Darker text for better readability */
109
  line-height: 1.8;
110
  font-size: 1rem;
111
- margin-bottom: 1rem;
112
  }
113
 
114
  /* Custom containers */
115
  .warm-container {
116
  background-color: #FFFFFF;
117
- border-radius: 0.8rem;
118
  padding: 2rem;
119
- border: 1px solid #D4C5B9;
 
120
  margin: 1.5rem 0;
121
- box-shadow: 0 3px 10px rgba(0,0,0,0.05);
122
  }
123
 
124
  /* Alert styling */
125
  .alert {
126
  padding: 1.2rem;
127
- border-radius: 0.8rem;
128
  margin: 1.2rem 0;
129
- border-left: 4px solid;
 
 
 
 
 
 
 
 
 
130
  }
131
 
132
- .alert-warning {
133
- background-color: #FFF8E8; /* Lighter warning background */
134
- border-left-color: #F4A261; /* Warmer warning color */
135
- color: #8B5E3C; /* Darker text for better contrast */
136
  }
137
-
138
- /* Selectbox styling */
139
- .stSelectbox {
140
- background-color: #FFFFFF;
141
- border-radius: 0.8rem;
142
- border: 1px solid #D4C5B9;
143
  }
144
-
145
- /* Text area label */
146
- .stTextArea label {
147
- color: #3D3235;
148
  font-weight: 500;
149
- margin-bottom: 0.5rem;
150
  }
151
-
152
- /* Prompt styling */
153
- .prompt-text {
154
- color: #666666;
155
- font-style: italic;
156
- margin-bottom: 1rem;
157
  }
158
  </style>
159
  """, unsafe_allow_html=True)
@@ -332,22 +287,77 @@ Created by [Jocelyn Skillman LMHC](http://www.jocelynskillman.com)
332
  [@jocelynskillmanlmhc](https://jocelynskillmanlmhc.substack.com/)
333
  """)
334
 
335
- # Crisis support notice
336
- st.markdown("""
337
- <div class="alert alert-warning">
338
- <strong>⚠️ Important:</strong> This app does not provide crisis support. If you need immediate help, please reach out to emergency services or click <a href="https://www.samhsa.gov/find-help/national-helpline" target="_blank">here</a> for support resources.
339
- </div>
340
- """, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
 
342
  # Main content area
343
  st.markdown("""
344
- <div class='warm-container'>
345
- <h1>NurtureNest</h1>
346
-
347
- <p>This is not a "parenting fix-it" tool.<br>
348
- It is a pause. A breath. A quiet turning inward.</p>
349
 
350
- <p>This space holds what feels messy, tangled, or painful—and trusts in your capacity to transform it. Here, guilt becomes a sign of care. Rupture becomes an opening for reconnection. Your presence, not your perfection, is what heals.</p>
 
 
 
 
 
 
351
  </div>
352
  """, unsafe_allow_html=True)
353
 
@@ -461,16 +471,18 @@ if st.session_state.reflections:
461
  """, unsafe_allow_html=True)
462
  st.markdown(reflection['content'])
463
 
464
- # Resource Nest
465
- with st.sidebar.expander("📚 Resource Nest", expanded=False):
466
- st.markdown("""
467
- ### Support Resources
468
- - [Find a Therapist](https://www.psychologytoday.com/us/therapists)
469
- - [Parent Support Groups](https://www.postpartum.net/get-help/psi-online-support-meetings/)
470
- - [Crisis Resources](https://www.samhsa.gov/find-help/national-helpline)
471
-
472
- ### Reading Corner
473
- - [Window of Tolerance](https://www.attachment-and-trauma-treatment-centre-for-healing.com/blogs/understanding-and-working-with-the-window-of-tolerance)
474
- - [Repair After Rupture](https://www.consciousdiscipline.com/resources/repair-after-rupture/)
475
- - [Co-Regulation Basics](https://www.nctsn.org/resources/co-regulation-building-foundation-for-emotional-regulation)
476
- """)
 
 
 
12
  initial_sidebar_state="expanded"
13
  )
14
 
15
+ # Simplified CSS for earth tones and better readability
16
  st.markdown("""
17
  <style>
18
  /* Custom fonts */
 
20
 
21
  /* Main container styling */
22
  .stApp {
23
+ background-color: #FFFAF5; /* Very light warm background */
24
  }
25
 
26
  /* Headers */
27
  h1, h2, h3 {
28
  font-family: 'Inter', sans-serif;
29
+ color: #5C4B51; /* Warm gray */
30
  font-weight: 600;
31
  margin-bottom: 1.2rem;
32
  }
 
34
  /* Text areas and inputs */
35
  .stTextArea, .stTextInput {
36
  background-color: #FFFFFF;
37
+ border: 1px solid #E0D5C8; /* Soft clay */
 
38
  padding: 1.2rem;
39
+ border-radius: 8px;
40
+ box-shadow: none;
41
  }
42
 
43
  /* Buttons */
44
  .stButton > button {
45
+ background-color: #8B9D83; /* Sage green */
46
  color: white;
 
 
47
  border: none;
48
+ padding: 0.6rem 1.8rem;
49
+ border-radius: 8px;
50
  font-family: 'Inter', sans-serif;
51
  font-weight: 500;
52
+ box-shadow: none;
53
  }
54
 
55
  .stButton > button:hover {
56
+ background-color: #7A8B73; /* Darker sage */
57
+ border: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  }
59
 
60
  /* Markdown text */
61
  p, li {
62
  font-family: 'Inter', sans-serif;
63
+ color: #3D3235; /* Dark warm gray */
64
  line-height: 1.8;
65
  font-size: 1rem;
 
66
  }
67
 
68
  /* Custom containers */
69
  .warm-container {
70
  background-color: #FFFFFF;
 
71
  padding: 2rem;
72
+ border: 1px solid #E0D5C8;
73
+ border-radius: 8px;
74
  margin: 1.5rem 0;
 
75
  }
76
 
77
  /* Alert styling */
78
  .alert {
79
  padding: 1.2rem;
80
+ border-radius: 8px;
81
  margin: 1.2rem 0;
82
+ background-color: #FFF8E8;
83
+ border-left: 4px solid #F4A261;
84
+ color: #8B5E3C;
85
+ }
86
+
87
+ /* Resource styling */
88
+ .resource-item {
89
+ margin-bottom: 2rem;
90
+ padding-bottom: 1rem;
91
+ border-bottom: 1px solid #E0D5C8;
92
  }
93
 
94
+ .resource-item:last-child {
95
+ border-bottom: none;
 
 
96
  }
97
+
98
+ .resource-title {
99
+ font-weight: 600;
100
+ color: #5C4B51;
101
+ margin-bottom: 0.5rem;
 
102
  }
103
+
104
+ .resource-link {
105
+ color: #8B9D83;
106
+ text-decoration: none;
107
  font-weight: 500;
 
108
  }
109
+
110
+ .resource-link:hover {
111
+ color: #7A8B73;
 
 
 
112
  }
113
  </style>
114
  """, unsafe_allow_html=True)
 
287
  [@jocelynskillmanlmhc](https://jocelynskillmanlmhc.substack.com/)
288
  """)
289
 
290
+ # Resource Nest in Sidebar
291
+ with st.sidebar.expander("📚 Recommended Resources", expanded=True):
292
+ st.markdown("""
293
+ ### Parenting Wisdom & Support
294
+
295
+ #### 🧠 Dr. Dan Siegel
296
+ *The Whole-Brain Child, No-Drama Discipline*
297
+ [Website](https://www.drdansiegel.com)
298
+ Pioneer in interpersonal neurobiology, explaining child brain development and integration-focused parenting.
299
+
300
+ #### 🌈 Dr. Becky Kennedy
301
+ *Good Inside*
302
+ [Website](https://www.goodinside.com)
303
+ Relationally-rich, trauma-aware parenting support focused on connection over correction.
304
+
305
+ #### 💞 Mona Delahooke
306
+ *Brain-Body Parenting, Beyond Behaviors*
307
+ [Website](https://www.monadelahooke.com)
308
+ Bridges neuroscience and compassion with practical Polyvagal Theory-based strategies.
309
+
310
+ #### 📚 Tina Payne Bryson
311
+ *The Power of Showing Up, The Yes Brain*
312
+ [Website](https://www.tinabryson.com)
313
+ Accessible guidance on building resilience through consistent, attuned caregiving.
314
+
315
+ #### 🧘‍♀️ Dr. Laura Markham
316
+ *Aha! Parenting*
317
+ [Website](https://www.ahaparenting.com)
318
+ Connection-first strategies with deep respect for emotional needs.
319
+
320
+ #### 🦋 Kristin Neff
321
+ *Self-Compassion for Parents*
322
+ [Website](https://self-compassion.org)
323
+ Research-backed practices for moving from guilt to warmth.
324
+
325
+ #### 🎧 Janet Lansbury
326
+ *Unruffled Podcast*
327
+ [Website](https://www.janetlansbury.com)
328
+ RIE-based guidance for respectful parenting with presence.
329
+
330
+ #### 📖 Emily Oster
331
+ *Expecting Better, Cribsheet, The Family Firm*
332
+ [Website](https://www.parentdata.org)
333
+ Evidence-based support empowering informed parenting choices.
334
+
335
+ #### 🌀 Dr. Gabor Maté
336
+ *The Myth of Normal, Scattered Minds*
337
+ [Website](https://drgabormate.com)
338
+ Compassionate perspective on trauma, attachment, and healing.
339
+
340
+ ### Crisis Support
341
+ - [Find a Therapist](https://www.psychologytoday.com/us/therapists)
342
+ - [Parent Support Groups](https://www.postpartum.net/get-help/psi-online-support-meetings/)
343
+ - [Crisis Resources](https://www.samhsa.gov/find-help/national-helpline)
344
+ """)
345
 
346
  # Main content area
347
  st.markdown("""
348
+ # NurtureNest
349
+
350
+ This is not a "parenting fix-it" tool. It is a pause. A breath. A quiet turning inward.
351
+
352
+ This space holds what feels messy, tangled, or painful—and trusts in your capacity to transform it. Here, guilt becomes a sign of care. Rupture becomes an opening for reconnection. Your presence, not your perfection, is what heals.
353
 
354
+ ---
355
+ """)
356
+
357
+ # Crisis support notice
358
+ st.markdown("""
359
+ <div class="alert">
360
+ <strong>⚠️ Important:</strong> This app does not provide crisis support. If you need immediate help, please reach out to emergency services or click <a href="https://www.samhsa.gov/find-help/national-helpline" target="_blank">here</a> for support resources.
361
  </div>
362
  """, unsafe_allow_html=True)
363
 
 
471
  """, unsafe_allow_html=True)
472
  st.markdown(reflection['content'])
473
 
474
+ # Display saved reflections if any
475
+ if st.session_state.journal_entries:
476
+ with st.expander("📔 Your Saved Reflections", expanded=False):
477
+ for entry in reversed(st.session_state.journal_entries):
478
+ st.markdown(f"""
479
+ **{entry['timestamp']}**
480
+
481
+ *Your reflection:*
482
+ {entry['content']}
483
+
484
+ *Response:*
485
+ {entry['reflection']}
486
+
487
+ ---
488
+ """)