-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgressive_Muscle_Relaxation.html
More file actions
517 lines (474 loc) Β· 18.5 KB
/
Copy pathProgressive_Muscle_Relaxation.html
File metadata and controls
517 lines (474 loc) Β· 18.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Progressive Muscle Relaxation - Mental Health Resources</title>
<style>
:root {
--pk-500: #ec4899;
--pk-700: #be185d;
--pk-900: #500724;
--surface-0: #0f0f0f;
--surface-1: #1a1a1a;
--surface-2: #262626;
--surface-3: #3a3a3a;
--text-1: #ffffff;
--text-2: #a3a3a3;
--text-3: #737373;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, var(--surface-0) 0%, #0f1a1a 100%);
color: var(--text-1);
min-height: 100vh;
}
.crisis-banner {
background: linear-gradient(90deg, #dc2626 0%, #991b1b 100%);
color: white;
padding: 1rem;
text-align: center;
border-bottom: 4px solid #7f1d1d;
}
.crisis-banner h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.crisis-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.crisis-links a {
padding: 0.5rem 1rem;
background: rgba(255,255,255,0.2);
border: 1px solid rgba(255,255,255,0.3);
border-radius: 0.5rem;
color: white;
text-decoration: none;
transition: background 0.3s;
}
.crisis-links a:hover { background: rgba(255,255,255,0.3); }
header {
padding: 3rem 1.5rem;
text-align: center;
background: linear-gradient(180deg, var(--pk-900) 0%, transparent 100%);
}
header h1 { font-size: 2.5rem; margin-bottom: 1rem; }
header p { color: var(--text-2); max-width: 600px; margin: 0 auto; }
.container { max-width: 800px; margin: 0 auto; padding: 2rem 1rem; }
.pmr-container {
background: var(--surface-1);
border-radius: 1rem;
padding: 2rem;
border: 1px solid rgba(255,255,255,0.1);
}
.progress-bar {
height: 8px;
background: var(--surface-3);
border-radius: 4px;
margin-bottom: 2rem;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--pk-500) 0%, var(--pk-700) 100%);
border-radius: 4px;
transition: width 0.5s;
}
.step-indicator {
text-align: center;
color: var(--text-3);
font-size: 0.875rem;
margin-bottom: 1rem;
}
.body-visual {
display: flex;
justify-content: center;
margin: 2rem 0;
}
.body-part {
font-size: 4rem;
transition: all 0.3s;
}
.body-part.active {
transform: scale(1.2);
filter: drop-shadow(0 0 20px var(--pk-500));
}
.instruction-card {
background: var(--surface-2);
border-radius: 0.75rem;
padding: 2rem;
text-align: center;
margin: 2rem 0;
}
.muscle-group {
font-size: 1.5rem;
font-weight: bold;
color: var(--pk-500);
margin-bottom: 1rem;
}
.action {
font-size: 1.25rem;
color: var(--text-1);
margin-bottom: 1rem;
}
.action.tense { color: #f59e0b; }
.action.relax { color: #22c55e; }
.description {
color: var(--text-2);
line-height: 1.6;
}
.timer {
font-size: 3rem;
font-weight: bold;
color: var(--pk-500);
margin: 1rem 0;
}
.controls {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin-top: 2rem;
}
.btn {
padding: 1rem 2rem;
font-size: 1rem;
font-weight: bold;
border: none;
border-radius: 0.75rem;
cursor: pointer;
transition: all 0.3s;
}
.btn-primary { background: var(--pk-500); color: white; }
.btn-primary:hover { background: var(--pk-700); }
.btn-secondary {
background: var(--surface-2);
color: var(--text-1);
border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover { background: var(--surface-3); }
.muscle-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 0.5rem;
margin-top: 2rem;
}
.muscle-item {
padding: 0.75rem;
background: var(--surface-2);
border-radius: 0.5rem;
text-align: center;
font-size: 0.875rem;
color: var(--text-2);
transition: all 0.3s;
}
.muscle-item.completed {
background: rgba(34, 197, 94, 0.2);
color: #22c55e;
}
.muscle-item.current {
background: var(--pk-500);
color: white;
}
.info {
margin-top: 2rem;
padding: 1.5rem;
background: var(--surface-2);
border-radius: 0.75rem;
}
.info h3 { margin-bottom: 1rem; color: var(--pk-500); }
.info p { color: var(--text-2); line-height: 1.6; margin-bottom: 0.5rem; }
.back-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 2rem;
color: var(--text-2);
text-decoration: none;
margin-top: 2rem;
transition: all 0.3s;
}
.back-link:hover { background: rgba(255,255,255,0.1); color: white; }
footer {
text-align: center;
padding: 2rem;
color: var(--text-3);
font-size: 0.75rem;
}
.info-banner {
background: linear-gradient(90deg, #1e40af 0%, #3730a3 100%);
color: white;
padding: 0.75rem 1rem;
border-bottom: 2px solid #1e3a8a;
}
.info-content {
max-width: 900px;
margin: 0 auto;
display: flex;
align-items: center;
gap: 0.75rem;
}
.info-icon { font-size: 1.25rem; }
.info-text { font-size: 0.875rem; line-height: 1.4; }
.info-text strong { color: #fbbf24; }
.recommended-resources {
background: var(--surface-2);
border-radius: 0.75rem;
padding: 1.5rem;
margin-top: 2rem;
border: 1px solid rgba(255,255,255,0.1);
}
.recommended-resources h3 {
color: var(--pk-500);
margin-bottom: 1rem;
font-size: 1.25rem;
}
.resources-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
}
.resource-category h4 {
color: var(--text-1);
margin-bottom: 0.75rem;
font-size: 1rem;
}
.resource-category ul {
list-style: none;
padding: 0;
}
.resource-category li {
margin-bottom: 0.5rem;
font-size: 0.875rem;
}
.resource-category a {
color: var(--text-2);
text-decoration: none;
transition: color 0.3s;
}
.resource-category a:hover {
color: var(--pk-500);
text-decoration: underline;
}
</style>
</head>
<body>
<section class="crisis-banner">
<h2>π¨ In Crisis? Get Help Now</h2>
<div class="crisis-links">
<a href="tel:18334564566">βοΈ Call 1-833-456-4566</a>
<a href="sms:741741&body=HOME">π¬ Text HOME to 741741</a>
<a href="tel:911">π Emergency: 911</a>
</div>
</section>
<section class="info-banner">
<div class="info-content">
<span class="info-icon">βΉοΈ</span>
<div class="info-text">
<strong>Note:</strong> Save features use your browser's local storage and are for personal reflection only.
Data is stored on your device and not on our servers. These tools are designed for self-reflection and are not a substitute for professional help.
</div>
</div>
</section>
<header>
<h1>πͺ Progressive Muscle Relaxation</h1>
<p>Release physical tension through systematic muscle tensing and relaxing. A proven technique for reducing anxiety and stress.</p>
</header>
<div class="container">
<div class="pmr-container">
<div class="progress-bar">
<div class="progress-fill" id="progressFill" style="width: 0%"></div>
</div>
<div class="step-indicator" id="stepIndicator">Step 0 of 8</div>
<div class="body-visual">
<span class="body-part" id="bodyPart">π§</span>
</div>
<div class="instruction-card">
<div class="muscle-group" id="muscleGroup">Ready to Begin</div>
<div class="action" id="action">Press Start to begin the relaxation exercise</div>
<div class="timer" id="timer">0</div>
<div class="description" id="description">Find a comfortable position, either sitting or lying down. Close your eyes and take a few deep breaths.</div>
</div>
<div class="controls">
<button class="btn btn-primary" id="startBtn" onclick="togglePMR()">Start Exercise</button>
<button class="btn btn-secondary" onclick="resetPMR()">Reset</button>
</div>
<div class="muscle-list" id="muscleList"></div>
<div class="info">
<h3>About Progressive Muscle Relaxation</h3>
<p>PMR was developed by Dr. Edmund Jacobson in the 1920s. It involves systematically tensing and then relaxing muscle groups throughout your body.</p>
<p><strong>Benefits:</strong> Reduces physical tension, decreases anxiety, improves sleep, and increases body awareness.</p>
<p><strong>Tip:</strong> Tense muscles for about 5 seconds, then relax for 10 seconds. Focus on the contrast between tension and relaxation.</p>
</div>
</div>
<div class="recommended-resources">
<h3>π Recommended Resources</h3>
<div class="resources-grid">
<div class="resource-category">
<h4>π Books</h4>
<ul>
<li><a href="https://www.amazon.com/Feeling-Good-New-Mood-Therapy/dp/0380810336" target="_blank" rel="noopener noreferrer">"Feeling Good" by David D. Burns</a> - CBT classic</li>
<li><a href="https://www.amazon.com/Body-Keeps-Score-Healing-Trauma/dp/0143127748" target="_blank" rel="noopener noreferrer">"The Body Keeps the Score" by Bessel van der Kolk</a> - Trauma & healing</li>
<li><a href="https://www.amazon.com/Atomic-Habits-Proven-Build-Break/dp/0735211299" target="_blank" rel="noopener noreferrer">"Atomic Habits" by James Clear</a> - Building better habits</li>
<li><a href="https://www.amazon.com/Mans-Search-Meaning-Viktor-Frankl/dp/0807014273" target="_blank" rel="noopener noreferrer">"Man's Search for Meaning" by Viktor Frankl</a> - Finding purpose</li>
</ul>
</div>
<div class="resource-category">
<h4>π¬ Videos & Channels</h4>
<ul>
<li><a href="https://www.youtube.com/@hubaboratoryermanlab" target="_blank" rel="noopener noreferrer">Huberman Lab</a> - Neuroscience-based mental health</li>
<li><a href="https://www.youtube.com/@HealthyGamerGG" target="_blank" rel="noopener noreferrer">HealthyGamer GG</a> - Mental health for modern life</li>
<li><a href="https://www.youtube.com/@TherapyinaNutshell" target="_blank" rel="noopener noreferrer">Therapy in a Nutshell</a> - CBT & DBT techniques</li>
<li><a href="https://www.ted.com/topics/mental+health" target="_blank" rel="noopener noreferrer">TED Talks: Mental Health</a> - Expert insights</li>
</ul>
</div>
<div class="resource-category">
<h4>π§ Apps & Podcasts</h4>
<ul>
<li><a href="https://www.headspace.com" target="_blank" rel="noopener noreferrer">Headspace</a> - Guided meditation</li>
<li><a href="https://www.calm.com" target="_blank" rel="noopener noreferrer">Calm</a> - Sleep & relaxation</li>
<li><a href="https://www.wysa.io" target="_blank" rel="noopener noreferrer">Wysa</a> - AI mental health companion</li>
<li><a href="https://podcasts.apple.com/us/podcast/the-happiness-lab-with-dr-laurie-santos/id1474245040" target="_blank" rel="noopener noreferrer">The Happiness Lab Podcast</a></li>
</ul>
</div>
</div>
</div>
<div style="text-align: center;">
<a href="/MENTALHEALTHRESOURCES/" class="back-link">β Back to Mental Health Resources</a>
</div>
</div>
<footer>
<p>Mental health resources curated for global access. If you're in crisis, please reach out to local emergency services.</p>
</footer>
<script>
const muscleGroups = [
{ name: 'Hands & Forearms', emoji: 'β', tense: 'Make tight fists and bend your wrists toward your forearms', relax: 'Let your hands fall open and loose' },
{ name: 'Biceps', emoji: 'πͺ', tense: 'Bend your elbows and flex your biceps as hard as you can', relax: 'Let your arms drop and hang loosely' },
{ name: 'Shoulders', emoji: 'π€·', tense: 'Raise your shoulders up toward your ears', relax: 'Let your shoulders drop down and relax' },
{ name: 'Face', emoji: 'π€', tense: 'Scrunch up your face - squeeze eyes, wrinkle nose, clench jaw', relax: 'Let your face go completely slack' },
{ name: 'Chest & Back', emoji: 'π«', tense: 'Take a deep breath and hold it while arching your back slightly', relax: 'Exhale slowly and let your body sink into support' },
{ name: 'Stomach', emoji: 'π―', tense: 'Tighten your stomach muscles as if bracing for a punch', relax: 'Release and let your stomach become soft' },
{ name: 'Legs & Thighs', emoji: 'π¦΅', tense: 'Squeeze your thighs together and lift your legs slightly', relax: 'Let your legs fall apart and become heavy' },
{ name: 'Feet & Calves', emoji: 'π¦Ά', tense: 'Point your toes down and curl them, tensing your calves', relax: 'Let your feet fall naturally and feel warmth spread' }
];
let currentStep = -1;
let isRunning = false;
let phase = 'ready'; // ready, tense, relax
let timer = 0;
let intervalId = null;
function initMuscleList() {
const list = document.getElementById('muscleList');
list.innerHTML = muscleGroups.map((group, i) =>
`<div class="muscle-item" id="muscle-${i}">${group.emoji} ${group.name}</div>`
).join('');
}
function togglePMR() {
if (isRunning) {
pausePMR();
} else {
startPMR();
}
}
function startPMR() {
isRunning = true;
document.getElementById('startBtn').textContent = 'Pause';
if (currentStep === -1) {
currentStep = 0;
}
runPhase();
}
function pausePMR() {
isRunning = false;
document.getElementById('startBtn').textContent = 'Resume';
if (intervalId) clearInterval(intervalId);
}
function resetPMR() {
isRunning = false;
if (intervalId) clearInterval(intervalId);
currentStep = -1;
phase = 'ready';
document.getElementById('startBtn').textContent = 'Start Exercise';
document.getElementById('progressFill').style.width = '0%';
document.getElementById('stepIndicator').textContent = 'Step 0 of 8';
document.getElementById('bodyPart').textContent = 'π§';
document.getElementById('bodyPart').classList.remove('active');
document.getElementById('muscleGroup').textContent = 'Ready to Begin';
document.getElementById('action').textContent = 'Press Start to begin the relaxation exercise';
document.getElementById('action').className = 'action';
document.getElementById('timer').textContent = '0';
document.getElementById('description').textContent = 'Find a comfortable position, either sitting or lying down. Close your eyes and take a few deep breaths.';
document.querySelectorAll('.muscle-item').forEach(el => {
el.classList.remove('completed', 'current');
});
}
function runPhase() {
if (!isRunning) return;
if (currentStep >= muscleGroups.length) {
completePMR();
return;
}
const group = muscleGroups[currentStep];
document.getElementById('progressFill').style.width = `${((currentStep + 0.5) / muscleGroups.length) * 100}%`;
document.getElementById('stepIndicator').textContent = `Step ${currentStep + 1} of ${muscleGroups.length}`;
document.getElementById('bodyPart').textContent = group.emoji;
document.getElementById('bodyPart').classList.add('active');
document.getElementById('muscleGroup').textContent = group.name;
document.querySelectorAll('.muscle-item').forEach((el, i) => {
el.classList.remove('current');
if (i < currentStep) el.classList.add('completed');
if (i === currentStep) el.classList.add('current');
});
if (phase === 'ready' || phase === 'relax') {
// Start tense phase
phase = 'tense';
timer = 5;
document.getElementById('action').textContent = 'TENSE';
document.getElementById('action').className = 'action tense';
document.getElementById('description').textContent = group.tense;
runTimer(() => {
// Move to relax phase
phase = 'relax';
timer = 10;
document.getElementById('action').textContent = 'RELAX';
document.getElementById('action').className = 'action relax';
document.getElementById('description').textContent = group.relax;
document.getElementById('bodyPart').classList.remove('active');
runTimer(() => {
currentStep++;
phase = 'ready';
runPhase();
});
});
}
}
function runTimer(callback) {
document.getElementById('timer').textContent = timer;
intervalId = setInterval(() => {
timer--;
document.getElementById('timer').textContent = timer;
if (timer <= 0) {
clearInterval(intervalId);
if (isRunning) callback();
}
}, 1000);
}
function completePMR() {
isRunning = false;
document.getElementById('startBtn').textContent = 'Start Again';
document.getElementById('progressFill').style.width = '100%';
document.getElementById('stepIndicator').textContent = 'Complete!';
document.getElementById('bodyPart').textContent = 'π';
document.getElementById('muscleGroup').textContent = 'Well Done!';
document.getElementById('action').textContent = '';
document.getElementById('action').className = 'action';
document.getElementById('timer').textContent = 'β';
document.getElementById('description').textContent = 'You\'ve completed the full body relaxation. Notice how your body feels now compared to when you started. Take a moment to enjoy this calm state.';
document.querySelectorAll('.muscle-item').forEach(el => {
el.classList.add('completed');
el.classList.remove('current');
});
currentStep = -1;
}
initMuscleList();
</script>
</body>
</html>