60aacbf65a
- Font: Inter → Nunito (warm, rounded, friendly) - Glassmorphism: frosted-glass on all cards (question, dim, resource, audience, overall) - Floating gradient blobs: 4 animated pastel blobs in background (CSS-only) - Direction-aware question slides: left/right based on prev/next - Staggered reveal: dim cards, resource cards, audience cards animate in sequence - Completion badge pop-in, progress bar shimmer, wheel float animation - Button polish: lift + glow on hover, smooth cubic-bezier transitions - Option hover: slide right + tint, CTA active press-down - Results wheel: drop-shadow glow on hover - Print-safe: glass removed, blobs hidden in print - Mobile: reduced blur/opacity for perf, blob 4 hidden
1155 lines
72 KiB
HTML
1155 lines
72 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Wheel of Wellness Assessment</title>
|
|
<meta name="description" content="Find the resources your family needs in 5 minutes. A wellness assessment across six dimensions.">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
<style>
|
|
:root{--primary:#C08B8B;--primary-dark:#A66E6E;--primary-light:#D4A5A5;--secondary:#E8A87C;--cream:#FFF9F5;--charcoal:#3D3232;--gray-100:#FBF7F7;--gray-200:#F0E6E6;--gray-300:#E0D0D0;--gray-400:#B8A0A0;--gray-500:#8C7878;--green:#7FB98C;--green-light:#EFF7F1;--yellow:#E8C46C;--yellow-light:#FDF8EC;--red:#D4857E;--red-light:#FDF0EF;--blue:#7EACB9;--blue-light:#EFF5F7;--lavender:#B8A4CC;--lavender-light:#F3EFF7;--shadow-sm:0 1px 3px rgba(0,0,0,.05);--shadow-md:0 4px 12px rgba(0,0,0,.07);--shadow-lg:0 8px 30px rgba(0,0,0,.09)}
|
|
*{margin:0;padding:0;box-sizing:border-box}
|
|
body{font-family:'Nunito',-apple-system,BlinkMacSystemFont,sans-serif;background:var(--cream);color:var(--charcoal);-webkit-font-smoothing:antialiased;min-height:100vh;display:flex;flex-direction:column;overflow-x:hidden}
|
|
a{color:var(--primary);text-decoration:none}
|
|
|
|
/* Header */
|
|
.site-header{background:linear-gradient(135deg,#D4A5A5 0%,#E8C4B8 100%);padding:12px 24px;display:flex;align-items:center;justify-content:space-between;color:white;position:sticky;top:0;z-index:50}
|
|
.site-header .brand{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:700;letter-spacing:.3px}
|
|
.site-header .logo-icon{width:32px;height:32px;background:rgba(255,255,255,.2);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:18px}
|
|
.site-header .nav-links{display:flex;gap:20px;font-size:13px;font-weight:500;opacity:.9}
|
|
.site-header .nav-links a{color:white;text-decoration:none;padding:4px 0}
|
|
.site-header .nav-links a:hover{opacity:1}
|
|
|
|
/* Footer */
|
|
.site-footer{background:#E8C4B8;color:rgba(255,255,255,.85);text-align:center;padding:16px 20px;font-size:11px;letter-spacing:.3px;margin-top:auto}
|
|
.site-footer a{color:rgba(255,255,255,.9)}
|
|
|
|
/* Container */
|
|
.container{max-width:900px;margin:0 auto;padding:24px 20px}
|
|
|
|
/* Screens */
|
|
.screen{display:none}
|
|
.screen.active{display:block}
|
|
|
|
/* Landing */
|
|
.landing{text-align:center;padding:40px 20px 60px}
|
|
.landing .eyebrow{font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:var(--secondary);margin-bottom:8px}
|
|
.landing h1{font-size:clamp(28px,5vw,42px);font-weight:800;color:var(--primary-dark);line-height:1.15;margin-bottom:12px}
|
|
.landing .subtitle{font-size:17px;color:var(--secondary);font-weight:600;margin-bottom:16px}
|
|
.landing .intro{font-size:14px;color:var(--gray-500);line-height:1.7;max-width:560px;margin:0 auto 32px}
|
|
.feature-pills{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-bottom:32px}
|
|
.feature-pill{display:flex;align-items:center;gap:6px;background:white;border:1px solid var(--gray-200);border-radius:20px;padding:6px 14px;font-size:12px;color:var(--gray-500);font-weight:500;box-shadow:var(--shadow-sm)}
|
|
|
|
/* Saved results banner */
|
|
.saved-banner{display:none;background:var(--blue-light);border:1px solid #90CAF9;border-radius:10px;padding:10px 16px;margin-bottom:20px;font-size:13px;color:var(--blue);font-weight:500;cursor:pointer}
|
|
.saved-banner.visible{display:block}
|
|
.saved-banner:hover{background:#BBDEFB}
|
|
|
|
.wheel-svg{width:240px;height:240px;margin:0 auto 28px}
|
|
|
|
/* Audience selector */
|
|
.audience-section{margin-bottom:32px}
|
|
.audience-section h2{font-size:16px;font-weight:700;color:var(--primary-dark);margin-bottom:12px}
|
|
.audience-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;max-width:700px;margin:0 auto}
|
|
.audience-card{background:white;border:2px solid var(--gray-200);border-radius:12px;padding:16px 12px;cursor:pointer;transition:all .15s;text-align:center}
|
|
.audience-card:hover{border-color:var(--primary);box-shadow:var(--shadow-md)}
|
|
.audience-card.selected{border-color:var(--primary);background:rgba(46,125,111,.05)}
|
|
.audience-card .aud-icon{font-size:28px;margin-bottom:6px}
|
|
.audience-card .aud-title{font-size:13px;font-weight:700;color:var(--charcoal)}
|
|
.audience-card .aud-desc{font-size:11px;color:var(--gray-400);margin-top:4px;line-height:1.4}
|
|
|
|
/* CTA */
|
|
.cta-button{display:inline-flex;align-items:center;gap:10px;background:linear-gradient(135deg,#D4A5A5 0%,#C08B8B 100%);color:white;font-size:16px;font-weight:700;padding:14px 36px;border-radius:50px;border:none;cursor:pointer;box-shadow:0 4px 16px rgba(192,139,139,.3);letter-spacing:.3px;transition:transform .15s}
|
|
.cta-button:hover{transform:translateY(-1px)}
|
|
.cta-button:disabled{opacity:.5;cursor:not-allowed;transform:none}
|
|
.cta-subtext{font-size:11px;color:var(--gray-400);margin-top:10px}
|
|
|
|
/* Questions */
|
|
.questions-screen{padding-bottom:40px}
|
|
.progress-section{margin-bottom:20px}
|
|
.progress-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
|
|
.progress-header .label{font-size:13px;font-weight:600;color:var(--primary)}
|
|
.progress-header .count{font-size:12px;color:var(--gray-400);font-weight:500}
|
|
.progress-bar-track{width:100%;height:8px;background:var(--gray-200);border-radius:4px;overflow:hidden}
|
|
.progress-bar-fill{height:100%;background:linear-gradient(90deg,#C08B8B 0%,#D4A5A5 100%);border-radius:4px;transition:width .3s ease}
|
|
.dim-indicator{display:flex;gap:6px;margin-bottom:20px;flex-wrap:wrap}
|
|
.dim-dot{width:10px;height:10px;border-radius:50%;transition:all .2s}
|
|
.dim-dot.active{transform:scale(1.4)}
|
|
|
|
.question-card{background:white;border-radius:14px;padding:24px 28px;box-shadow:var(--shadow-md);border:1px solid var(--gray-200);position:relative;animation:fadeIn .3s ease}
|
|
@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
|
|
.question-card .q-dim-label{font-size:10px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;margin-bottom:8px}
|
|
.question-card .q-text{font-size:16px;font-weight:600;color:var(--charcoal);line-height:1.5;margin-bottom:20px}
|
|
.question-card .q-number{font-size:11px;color:var(--gray-300);font-weight:600;position:absolute;top:24px;right:28px}
|
|
|
|
.options-list{display:flex;flex-direction:column;gap:10px}
|
|
.option-item{display:flex;align-items:center;gap:14px;padding:14px 18px;background:var(--gray-100);border:2px solid var(--gray-200);border-radius:10px;font-size:14px;color:var(--gray-500);cursor:pointer;transition:all .15s;font-weight:500}
|
|
.option-item:hover{border-color:var(--gray-300);background:white}
|
|
.option-item.selected{background:#F5E8E8;border-color:var(--primary);color:var(--primary-dark)}
|
|
.option-item .opt-emoji{font-size:20px;width:28px;text-align:center}
|
|
.radio-circle{width:20px;height:20px;border-radius:50%;border:2px solid var(--gray-300);flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:all .15s}
|
|
.option-item.selected .radio-circle{border-color:var(--primary);background:var(--primary)}
|
|
.option-item.selected .radio-circle::after{content:'';width:8px;height:8px;background:white;border-radius:50%}
|
|
|
|
/* Nav buttons */
|
|
.q-nav{display:flex;justify-content:space-between;margin-top:24px}
|
|
.q-nav button{padding:10px 28px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:all .15s}
|
|
.btn-prev{background:var(--gray-100);color:var(--gray-500);border:1px solid var(--gray-200)}
|
|
.btn-prev:hover{background:var(--gray-200)}
|
|
.btn-next{background:var(--primary);color:white}
|
|
.btn-next:hover{background:var(--primary-dark)}
|
|
.btn-next:disabled{opacity:.4;cursor:not-allowed}
|
|
.btn-submit{background:#D4A5A5;color:white;font-size:16px;padding:14px 36px;border-radius:50px}
|
|
.btn-submit:hover{background:#C08B8B}
|
|
|
|
/* Results */
|
|
.results-screen{padding-bottom:40px}
|
|
.results-header{text-align:center;margin-bottom:28px}
|
|
.results-header .completion-badge{display:inline-flex;align-items:center;gap:6px;background:var(--green-light);color:var(--green);font-size:11px;font-weight:600;padding:4px 14px;border-radius:16px;margin-bottom:8px}
|
|
.results-header h2{font-size:28px;font-weight:800;color:var(--primary-dark);margin-bottom:6px}
|
|
.results-header .summary{font-size:14px;color:var(--gray-500);max-width:520px;margin:0 auto;line-height:1.6}
|
|
|
|
.results-body{display:flex;gap:32px;align-items:flex-start;flex-wrap:wrap}
|
|
.results-wheel-wrap{flex-shrink:0;width:280px;height:280px;margin:0 auto}
|
|
|
|
.dimensions-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:1;min-width:280px}
|
|
.dim-card{background:white;border-radius:12px;padding:16px 18px;box-shadow:var(--shadow-sm);border:1px solid var(--gray-200)}
|
|
.dim-card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
|
|
.dim-card-name{font-size:13px;font-weight:700;color:var(--charcoal);display:flex;align-items:center;gap:6px}
|
|
.dim-card-name .dim-icon{font-size:16px}
|
|
.dim-card .dim-score-text{font-size:24px;font-weight:800;margin-bottom:4px}
|
|
.dim-card .dim-desc{font-size:11px;color:var(--gray-400);line-height:1.4}
|
|
|
|
.status-badge{font-size:10px;font-weight:700;padding:3px 10px;border-radius:10px;letter-spacing:.3px}
|
|
.status-badge.strong{background:var(--green-light);color:var(--green)}
|
|
.status-badge.moderate{background:var(--yellow-light);color:#F9A825}
|
|
.status-badge.needs-attention{background:var(--red-light);color:var(--red)}
|
|
|
|
.overall-card{background:white;border-radius:14px;padding:20px 24px;box-shadow:var(--shadow-md);border:1px solid var(--gray-200);text-align:center;margin-top:20px}
|
|
.overall-card .overall-score{font-size:48px;font-weight:800;color:var(--primary-dark)}
|
|
.overall-card .overall-label{font-size:13px;color:var(--gray-400);font-weight:600}
|
|
|
|
.disclaimer{margin-top:24px;padding:16px 20px;background:rgba(46,125,111,.06);border-radius:10px;font-size:12px;color:var(--gray-500);line-height:1.6;text-align:center}
|
|
|
|
/* Resource cards */
|
|
.resource-section{margin-top:28px}
|
|
.resource-section h3{font-size:18px;font-weight:700;color:var(--primary-dark);margin-bottom:6px}
|
|
.resource-section .resource-intro{font-size:13px;color:var(--gray-500);margin-bottom:16px;line-height:1.5}
|
|
.resource-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}
|
|
.resource-card{background:white;border-radius:12px;padding:18px 20px;box-shadow:var(--shadow-sm);border:1px solid var(--gray-200);border-left:4px solid var(--primary);transition:all .15s}
|
|
.resource-card:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}
|
|
.resource-card .res-dim{font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase;margin-bottom:4px}
|
|
.resource-card .res-name{font-size:14px;font-weight:700;color:var(--charcoal);margin-bottom:4px}
|
|
.resource-card .res-desc{font-size:12px;color:var(--gray-500);line-height:1.5}
|
|
.resource-card .res-link{display:inline-flex;align-items:center;gap:4px;margin-top:8px;font-size:12px;font-weight:600;color:var(--primary)}
|
|
|
|
/* Actions bar */
|
|
.actions-bar{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:24px}
|
|
.actions-bar button{padding:12px 24px;border-radius:50px;font-size:14px;font-weight:600;cursor:pointer;border:2px solid var(--gray-200);background:white;color:var(--gray-500);transition:all .15s;display:inline-flex;align-items:center;gap:6px}
|
|
.actions-bar button:hover{border-color:var(--primary);color:var(--primary)}
|
|
.actions-bar .btn-print{background:#D4A5A5;color:white;border-color:#D4A5A5}
|
|
.actions-bar .btn-print:hover{background:#C08B8B;color:white}
|
|
.actions-bar .btn-reset{background:var(--gray-100)}
|
|
|
|
/* History section */
|
|
.history-section{margin-top:24px;text-align:center}
|
|
.history-section h4{font-size:13px;font-weight:600;color:var(--gray-400);margin-bottom:10px}
|
|
.history-item{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;margin:4px;background:white;border:1px solid var(--gray-200);border-radius:20px;font-size:12px;color:var(--gray-500);cursor:pointer;transition:all .15s}
|
|
.history-item:hover{border-color:var(--primary);color:var(--primary)}
|
|
.history-item .hist-date{color:var(--gray-400)}
|
|
.history-item .hist-score{font-weight:700;color:var(--primary)}
|
|
|
|
@media(max-width:640px){
|
|
.audience-grid{grid-template-columns:1fr 1fr}
|
|
.dimensions-grid{grid-template-columns:1fr}
|
|
.resource-list{grid-template-columns:1fr}
|
|
.results-body{flex-direction:column;align-items:center}
|
|
.q-nav{flex-direction:column;gap:10px}
|
|
.q-nav button{width:100%}
|
|
}
|
|
|
|
/* Print styles */
|
|
@media print{
|
|
.site-header,.site-footer,.actions-bar,.btn-reset,.history-section,.disclaimer,.bg-blobs{display:none!important}
|
|
body{background:white}
|
|
.screen{display:block!important}
|
|
.container{padding:0;max-width:100%}
|
|
.results-body{flex-direction:row;flex-wrap:nowrap}
|
|
.results-wheel-wrap{width:200px;height:200px}
|
|
.dim-card,.resource-card{break-inside:avoid;box-shadow:none;border:1px solid #ddd}
|
|
.overall-card{break-inside:avoid}
|
|
.resource-section{break-inside:avoid}
|
|
.question-card,.dim-card,.resource-card,.overall-card,.audience-card{background:white!important;backdrop-filter:none!important}
|
|
}
|
|
|
|
/* ═══════════════════════════════════════════
|
|
MODERN GLOW-UP
|
|
═══════════════════════════════════════════ */
|
|
|
|
/* Floating gradient blobs */
|
|
.bg-blobs{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
|
|
.bg-blobs .blob{position:absolute;border-radius:50%;filter:blur(80px);opacity:.25;animation:blobFloat 20s ease-in-out infinite}
|
|
.bg-blobs .blob:nth-child(1){width:400px;height:400px;background:#D4A5A5;top:-100px;left:-80px;animation-delay:0s}
|
|
.bg-blobs .blob:nth-child(2){width:350px;height:350px;background:#B8A4CC;top:40%;right:-100px;animation-delay:-5s}
|
|
.bg-blobs .blob:nth-child(3){width:300px;height:300px;background:#7FB98C;bottom:-60px;left:30%;animation-delay:-10s}
|
|
.bg-blobs .blob:nth-child(4){width:250px;height:250px;background:#7EACB9;top:20%;left:50%;animation-delay:-15s}
|
|
@keyframes blobFloat{
|
|
0%,100%{transform:translate(0,0) scale(1)}
|
|
25%{transform:translate(30px,-40px) scale(1.05)}
|
|
50%{transform:translate(-20px,30px) scale(.95)}
|
|
75%{transform:translate(40px,20px) scale(1.02)}
|
|
}
|
|
|
|
/* Ensure content sits above blobs */
|
|
.site-header,.screen,.site-footer{position:relative;z-index:1}
|
|
|
|
/* Glassmorphism mixin — applied to cards */
|
|
.question-card{background:rgba(255,255,255,.65);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.5);box-shadow:0 8px 32px rgba(61,50,50,.08)}
|
|
.audience-card{background:rgba(255,255,255,.5);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:2px solid rgba(255,255,255,.4);transition:all .25s cubic-bezier(.4,0,.2,1)}
|
|
.audience-card:hover{border-color:var(--primary);box-shadow:0 8px 24px rgba(192,139,139,.15);transform:translateY(-3px)}
|
|
.audience-card.selected{border-color:var(--primary);background:rgba(192,139,139,.12);box-shadow:0 4px 20px rgba(192,139,139,.2)}
|
|
.dim-card{background:rgba(255,255,255,.55);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.45);transition:all .2s}
|
|
.dim-card:hover{box-shadow:0 6px 20px rgba(61,50,50,.1);transform:translateY(-2px)}
|
|
.resource-card{background:rgba(255,255,255,.55);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.45);transition:all .25s}
|
|
.resource-card:hover{box-shadow:0 8px 24px rgba(61,50,50,.1);transform:translateY(-3px)}
|
|
.overall-card{background:rgba(255,255,255,.6);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.5)}
|
|
.history-item{background:rgba(255,255,255,.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
|
|
|
|
/* Animated screen transitions */
|
|
.screen{display:none}
|
|
.screen.active{display:block;animation:screenIn .4s cubic-bezier(.4,0,.2,1) both}
|
|
@keyframes screenIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
|
|
|
|
/* Question slide animation — direction-aware */
|
|
#question-area{position:relative;min-height:200px}
|
|
.question-card.slide-left{animation:slideLeft .3s cubic-bezier(.4,0,.2,1) both}
|
|
.question-card.slide-right{animation:slideRight .3s cubic-bezier(.4,0,.2,1) both}
|
|
@keyframes slideLeft{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:translateX(0)}}
|
|
@keyframes slideRight{from{opacity:0;transform:translateX(-40px)}to{opacity:1;transform:translateX(0)}}
|
|
|
|
/* Dimension cards stagger reveal */
|
|
.dim-card{opacity:0;animation:fadeUp .4s cubic-bezier(.4,0,.2,1) both}
|
|
.dim-card:nth-child(1){animation-delay:.05s}
|
|
.dim-card:nth-child(2){animation-delay:.1s}
|
|
.dim-card:nth-child(3){animation-delay:.15s}
|
|
.dim-card:nth-child(4){animation-delay:.2s}
|
|
.dim-card:nth-child(5){animation-delay:.25s}
|
|
.dim-card:nth-child(6){animation-delay:.3s}
|
|
@keyframes fadeUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
|
|
|
|
/* Resource cards stagger */
|
|
.resource-card{opacity:0;animation:fadeUp .4s cubic-bezier(.4,0,.2,1) both}
|
|
.resource-card:nth-child(1){animation-delay:.35s}
|
|
.resource-card:nth-child(2){animation-delay:.4s}
|
|
.resource-card:nth-child(3){animation-delay:.45s}
|
|
.resource-card:nth-child(4){animation-delay:.5s}
|
|
.resource-card:nth-child(5){animation-delay:.55s}
|
|
.resource-card:nth-child(6){animation-delay:.6s}
|
|
.resource-card:nth-child(7){animation-delay:.65s}
|
|
.resource-card:nth-child(8){animation-delay:.7s}
|
|
|
|
/* Completion badge pop */
|
|
.completion-badge{animation:badgePop .5s cubic-bezier(.175,.885,.32,1.275) .1s both}
|
|
@keyframes badgePop{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}
|
|
|
|
/* Overall score count-up shimmer */
|
|
.overall-card{animation:fadeUp .5s cubic-bezier(.4,0,.2,1) .35s both}
|
|
|
|
/* Progress bar shimmer */
|
|
.progress-bar-fill{position:relative;overflow:hidden}
|
|
.progress-bar-fill::after{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.3),transparent);animation:shimmer 2s ease-in-out infinite}
|
|
@keyframes shimmer{0%{left:-100%}100%{left:100%}}
|
|
|
|
/* Option item hover micro-interaction */
|
|
.option-item{transition:all .2s cubic-bezier(.4,0,.2,1)}
|
|
.option-item:hover{transform:translateX(4px);border-color:var(--primary-light);background:rgba(212,165,165,.06)}
|
|
.option-item.selected{transform:translateX(0)}
|
|
|
|
/* CTA button glow */
|
|
.cta-button{transition:all .25s cubic-bezier(.4,0,.2,1)}
|
|
.cta-button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 28px rgba(192,139,139,.35)}
|
|
.cta-button:active:not(:disabled){transform:translateY(0)}
|
|
|
|
/* Nav button polish */
|
|
.btn-next,.btn-submit{transition:all .2s cubic-bezier(.4,0,.2,1)}
|
|
.btn-next:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px rgba(192,139,139,.25)}
|
|
.btn-submit:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(192,139,139,.3)}
|
|
|
|
/* Wheel SVG subtle float */
|
|
.wheel-svg{animation:wheelFloat 6s ease-in-out infinite}
|
|
@keyframes wheelFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
|
|
|
|
/* Results wheel glow on hover */
|
|
.results-wheel-wrap svg{transition:filter .3s}
|
|
.results-wheel-wrap:hover svg{filter:drop-shadow(0 4px 16px rgba(192,139,139,.25))}
|
|
|
|
/* Audience grid stagger on load */
|
|
.audience-card{opacity:0;animation:fadeUp .35s cubic-bezier(.4,0,.2,1) both}
|
|
.audience-card:nth-child(1){animation-delay:.05s}
|
|
.audience-card:nth-child(2){animation-delay:.1s}
|
|
.audience-card:nth-child(3){animation-delay:.15s}
|
|
.audience-card:nth-child(4){animation-delay:.2s}
|
|
.audience-card:nth-child(5){animation-delay:.25s}
|
|
.audience-card:nth-child(6){animation-delay:.3s}
|
|
.audience-card:nth-child(7){animation-delay:.35s}
|
|
|
|
/* Button polish */
|
|
.actions-bar button{transition:all .2s cubic-bezier(.4,0,.2,1)}
|
|
.actions-bar button:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(61,50,50,.08)}
|
|
|
|
/* Mobile: disable blobs for perf */
|
|
@media(max-width:640px){
|
|
.bg-blobs .blob{filter:blur(60px);opacity:.15}
|
|
.bg-blobs .blob:nth-child(4){display:none}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="bg-blobs" aria-hidden="true">
|
|
<div class="blob"></div><div class="blob"></div><div class="blob"></div><div class="blob"></div>
|
|
</div>
|
|
|
|
<header class="site-header">
|
|
<div class="brand">
|
|
<div class="logo-icon">♿</div>
|
|
<span>Wheel of Wellness</span>
|
|
</div>
|
|
<nav class="nav-links">
|
|
<a href="#" onclick="showScreen('landing');return false">Home</a>
|
|
</nav>
|
|
</header>
|
|
|
|
<!-- Landing -->
|
|
<div id="screen-landing" class="screen active">
|
|
<div class="container landing">
|
|
<div class="eyebrow">A Free Wellness Check-In</div>
|
|
<h1>Wheel of Wellness</h1>
|
|
<p class="subtitle">Find the resources your family needs — in 5 minutes</p>
|
|
<p class="intro">Whether you are a parent, caregiver, or individual navigating disability, this quick assessment identifies your needs across six wellness areas and connects you to resources.</p>
|
|
|
|
<svg class="wheel-svg" viewBox="0 0 240 240" id="landing-wheel"></svg>
|
|
|
|
<div class="saved-banner" id="saved-banner" onclick="resumeAssessment()">
|
|
📋 You have a saved assessment in progress. Click here to continue.
|
|
</div>
|
|
|
|
<div class="audience-section">
|
|
<h2>Who are you?</h2>
|
|
<div class="audience-grid" id="audience-grid"></div>
|
|
</div>
|
|
|
|
<button class="cta-button" id="btn-start" disabled onclick="startAssessment()">
|
|
Start Your Assessment <span style="font-size:20px">→</span>
|
|
</button>
|
|
<p class="cta-subtext">18 questions · About 5 minutes · Private & anonymous</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Questions -->
|
|
<div id="screen-questions" class="screen">
|
|
<div class="container questions-screen">
|
|
<div class="progress-section">
|
|
<div class="progress-header">
|
|
<span class="label" id="dim-label"></span>
|
|
<span class="count" id="q-count"></span>
|
|
</div>
|
|
<div class="progress-bar-track">
|
|
<div class="progress-bar-fill" id="progress-fill"></div>
|
|
</div>
|
|
</div>
|
|
<div class="dim-indicator" id="dim-indicator"></div>
|
|
<div id="question-area"></div>
|
|
<div class="q-nav">
|
|
<button class="btn-prev" id="btn-prev" onclick="prevQuestion()">← Back</button>
|
|
<button class="btn-next" id="btn-next" onclick="nextQuestion()" disabled>Next →</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Results -->
|
|
<div id="screen-results" class="screen">
|
|
<div class="container results-screen">
|
|
<div class="results-header">
|
|
<div class="completion-badge">✓ Assessment Complete</div>
|
|
<h2>Your Wellness Results</h2>
|
|
<p class="summary" id="results-summary"></p>
|
|
</div>
|
|
<div class="results-body">
|
|
<div class="results-wheel-wrap">
|
|
<svg viewBox="0 0 280 280" id="results-wheel"></svg>
|
|
</div>
|
|
<div class="dimensions-grid" id="results-grid"></div>
|
|
</div>
|
|
<div class="overall-card">
|
|
<div class="overall-score" id="overall-score">--</div>
|
|
<div class="overall-label">Overall Wellness Score</div>
|
|
</div>
|
|
|
|
<!-- Resource recommendations -->
|
|
<div class="resource-section" id="resource-section">
|
|
<h3>🧭 Resources for You</h3>
|
|
<p class="resource-intro">Based on your results, here are resources that may help in the areas where you scored lower.</p>
|
|
<div class="resource-list" id="resource-list"></div>
|
|
</div>
|
|
|
|
<div class="actions-bar">
|
|
<button class="btn-print" onclick="window.print()">🖨 Print Results</button>
|
|
<button onclick="shareResults()">📤 Share Results</button>
|
|
<button class="btn-reset" onclick="retake()">↺ Take Again</button>
|
|
</div>
|
|
|
|
<div class="history-section" id="history-section">
|
|
<h4>Your Past Assessments</h4>
|
|
<div id="history-list"></div>
|
|
</div>
|
|
|
|
<div class="disclaimer">
|
|
This is a screening tool for self-reflection, not a diagnosis. If you have concerns about your wellbeing, please talk to a qualified professional.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="site-footer">
|
|
<div>Wheel of Wellness · <a href="https://wheel.lobotomylabs.dev/" target="_blank">wheel.lobotomylabs.dev</a></div>
|
|
</footer>
|
|
|
|
<script>
|
|
// ═══════════════════════════════════════════
|
|
// DATA LAYER
|
|
// ═══════════════════════════════════════════
|
|
|
|
const QUESTIONS = {
|
|
"generalized": {
|
|
"title": "General",
|
|
"subtitle": "For anyone who wants to check in on their wellness",
|
|
"scale": ["Almost all the time", "More than half the time", "Some of the time", "Once in a while"],
|
|
"emoji": null,
|
|
"items": [
|
|
{"id":"G1","dim":"physical","text":"In the past month, how often have you felt tired or worn out?","reverse":true},
|
|
{"id":"G2","dim":"physical","text":"How would you rate your overall physical health right now?","reverse":false},
|
|
{"id":"G3","dim":"physical","text":"In a typical week, how often do you move your body in a way that feels good (walking, stretching, playing)?","reverse":false},
|
|
{"id":"G4","dim":"emotional","text":"In the past two weeks, how often have you felt calm and at ease?","reverse":false},
|
|
{"id":"G5","dim":"emotional","text":"In the past two weeks, how often have you felt cheerful or in good spirits?","reverse":false},
|
|
{"id":"G6","dim":"emotional","text":"How often have you felt worried, sad, or upset in a way that was hard to shake?","reverse":true},
|
|
{"id":"G7","dim":"social","text":"Do you have people in your life you can count on when things get hard?","reverse":false},
|
|
{"id":"G8","dim":"social","text":"How satisfied are you with how you get along with the people closest to you?","reverse":false},
|
|
{"id":"G9","dim":"social","text":"In the past month, how often have you felt alone even when other people were around?","reverse":true},
|
|
{"id":"G10","dim":"daily-life","text":"How confident are you that you can handle everyday tasks like bills, forms, and schedules?","reverse":false},
|
|
{"id":"G11","dim":"daily-life","text":"In the past two weeks, how often has your sleep been restful?","reverse":false},
|
|
{"id":"G12","dim":"daily-life","text":"How safe do you feel in your home and neighborhood?","reverse":false},
|
|
{"id":"G13","dim":"purpose","text":"In the past two weeks, how often has your daily life been filled with things that interest you?","reverse":false},
|
|
{"id":"G14","dim":"purpose","text":"How would you rate your quality of life right now?","reverse":false},
|
|
{"id":"G15","dim":"purpose","text":"Do you feel like your life has meaning or direction?","reverse":false},
|
|
{"id":"G16","dim":"growth","text":"In the past two weeks, how often have you felt active and full of energy?","reverse":false},
|
|
{"id":"G17","dim":"growth","text":"Are you learning or trying anything new right now?","reverse":false},
|
|
{"id":"G18","dim":"growth","text":"How often do you make time for things that help you grow (reading, classes, hobbies)?","reverse":false}
|
|
]
|
|
},
|
|
"parent-caregiver": {
|
|
"title": "Parent / Caregiver",
|
|
"subtitle": "For parents and caregivers of people with disabilities",
|
|
"scale": ["Almost every day", "More days than not", "Once in a while", "Rarely"],
|
|
"emoji": null,
|
|
"items": [
|
|
{"id":"P1","dim":"physical","text":"When did you last see a doctor for YOUR own health check?","reverse":false},
|
|
{"id":"P2","dim":"physical","text":"In the past month, how often have you felt tired or worn out from caregiving?","reverse":true},
|
|
{"id":"P3","dim":"physical","text":"In a typical week, how often do you get enough sleep?","reverse":false},
|
|
{"id":"P4","dim":"emotional","text":"How often do you feel worn out or weighed down by all you have to do?","reverse":true},
|
|
{"id":"P5","dim":"emotional","text":"In the past two weeks, how often have you been bothered by not being able to stop or control worrying?","reverse":true},
|
|
{"id":"P6","dim":"emotional","text":"How often do you feel like you are doing a good job as a caregiver?","reverse":false},
|
|
{"id":"P7","dim":"social","text":"Do you have someone who can watch your kids so you can take a break?","reverse":false},
|
|
{"id":"P8","dim":"social","text":"Is there someone you can talk to honestly about how hard caregiving can be?","reverse":false},
|
|
{"id":"P9","dim":"social","text":"How often do you spend time with friends or do something fun for yourself?","reverse":false},
|
|
{"id":"P10","dim":"daily-life","text":"How confident are you about handling school meetings, doctor visits, and paperwork for your family?","reverse":false},
|
|
{"id":"P11","dim":"daily-life","text":"Does your family have the money and resources to cover your basic needs?","reverse":false},
|
|
{"id":"P12","dim":"daily-life","text":"Are you able to get the services and supports your family member with a disability needs?","reverse":false},
|
|
{"id":"P13","dim":"purpose","text":"Do you feel accepted and respected by the professionals who work with your family?","reverse":false},
|
|
{"id":"P14","dim":"purpose","text":"How often do you feel like your role as a caregiver gives your life meaning?","reverse":false},
|
|
{"id":"P15","dim":"purpose","text":"Is there anything outside of caregiving that is important to who you are?","reverse":false},
|
|
{"id":"P16","dim":"growth","text":"Are you learning new things about how to support your family member?","reverse":false},
|
|
{"id":"P17","dim":"growth","text":"How often do you feel stuck or like nothing you do makes a difference?","reverse":true},
|
|
{"id":"P18","dim":"growth","text":"In the past month, have you done anything just for you (a class, a hobby, time with a friend)?","reverse":false}
|
|
]
|
|
},
|
|
"family-member": {
|
|
"title": "Family Member",
|
|
"subtitle": "For household members of people with disabilities",
|
|
"scale": ["Very satisfied", "Satisfied", "Neither satisfied nor dissatisfied", "Dissatisfied"],
|
|
"emoji": null,
|
|
"items": [
|
|
{"id":"F1","dim":"physical","text":"Do members of your family get the medical care they need when they need it?","reverse":false},
|
|
{"id":"F2","dim":"physical","text":"Does your family feel safe at home, work, school, and in the neighborhood?","reverse":false},
|
|
{"id":"F3","dim":"physical","text":"Does your family have transportation to get to the places you need to be?","reverse":false},
|
|
{"id":"F4","dim":"emotional","text":"Does your family have the support you need to handle stress?","reverse":false},
|
|
{"id":"F5","dim":"emotional","text":"Do family members have some time to pursue their own interests?","reverse":false},
|
|
{"id":"F6","dim":"emotional","text":"Do family members have outside help available for special needs?","reverse":false},
|
|
{"id":"F7","dim":"social","text":"Do family members have friends or others outside the home they can lean on?","reverse":false},
|
|
{"id":"F8","dim":"social","text":"Does your family enjoy spending time together?","reverse":false},
|
|
{"id":"F9","dim":"social","text":"Do family members show that they love and care for each other?","reverse":false},
|
|
{"id":"F10","dim":"daily-life","text":"Are you able to get the services and supports your family member with a disability needs?","reverse":false},
|
|
{"id":"F11","dim":"daily-life","text":"Does your family have a way to take care of expenses?","reverse":false},
|
|
{"id":"F12","dim":"daily-life","text":"Does your family have a good relationship with the service providers who work with your family member?","reverse":false},
|
|
{"id":"F13","dim":"purpose","text":"Does your family solve problems together?","reverse":false},
|
|
{"id":"F14","dim":"purpose","text":"Do family members support each other to accomplish goals?","reverse":false},
|
|
{"id":"F15","dim":"purpose","text":"Does your family feel like it is handling life's ups and downs well?","reverse":false},
|
|
{"id":"F16","dim":"growth","text":"Do family members help the children learn to be independent?","reverse":false},
|
|
{"id":"F17","dim":"growth","text":"Do adults in the family know other people in the children's lives (friends, teachers)?","reverse":false},
|
|
{"id":"F18","dim":"growth","text":"Do family members talk openly with each other?","reverse":false}
|
|
]
|
|
},
|
|
"professional": {
|
|
"title": "Professional",
|
|
"subtitle": "For therapists, counselors, educators, and healthcare workers",
|
|
"scale": ["Almost every day", "Several days a week", "Once in a while", "Rarely"],
|
|
"emoji": null,
|
|
"items": [
|
|
{"id":"PR1","dim":"physical","text":"How often do you feel physically drained after your workday?","reverse":true},
|
|
{"id":"PR2","dim":"physical","text":"In the past month, how often have you lost sleep over the experiences of people you help?","reverse":true},
|
|
{"id":"PR3","dim":"physical","text":"How often do you feel on edge or jumpy because of things you hear at work?","reverse":true},
|
|
{"id":"PR4","dim":"emotional","text":"I find my work as a helper to be deeply satisfying.","reverse":false},
|
|
{"id":"PR5","dim":"emotional","text":"How often do you feel depressed because of the experiences of people you help?","reverse":true},
|
|
{"id":"PR6","dim":"emotional","text":"How often do you feel overwhelmed because your workload seems endless?","reverse":true},
|
|
{"id":"PR7","dim":"social","text":"Do you have colleagues or peers you can talk with honestly about difficult cases?","reverse":false},
|
|
{"id":"PR8","dim":"social","text":"How often do you feel connected to the people around you at work?","reverse":false},
|
|
{"id":"PR9","dim":"social","text":"How often do you feel trapped by your job?","reverse":true},
|
|
{"id":"PR10","dim":"daily-life","text":"How well do you maintain a boundary between your work and your personal life?","reverse":false},
|
|
{"id":"PR11","dim":"daily-life","text":"I am pleased with how I keep up with professional techniques and protocols.","reverse":false},
|
|
{"id":"PR12","dim":"daily-life","text":"How often do you feel bogged down by the systems and rules at work?","reverse":true},
|
|
{"id":"PR13","dim":"purpose","text":"I believe I can make a difference through my work.","reverse":false},
|
|
{"id":"PR14","dim":"purpose","text":"How often do you have happy thoughts about the people you help?","reverse":false},
|
|
{"id":"PR15","dim":"purpose","text":"Are you happy that you chose this line of work?","reverse":false},
|
|
{"id":"PR16","dim":"growth","text":"I am pleased with how I am able to keep up with helping techniques and protocols.","reverse":false},
|
|
{"id":"PR17","dim":"growth","text":"How often do you avoid situations that remind you of frightening things people you help have told you?","reverse":true},
|
|
{"id":"PR18","dim":"growth","text":"Are you the person you always wanted to be in this work?","reverse":false}
|
|
]
|
|
},
|
|
"transition-youth": {
|
|
"title": "Transition-Age Youth",
|
|
"subtitle": "For young people ages 16-24 navigating independence and identity",
|
|
"scale": ["Almost all the time", "More than half the time", "Some of the time", "Once in a while"],
|
|
"emoji": null,
|
|
"items": [
|
|
{"id":"TY1","dim":"physical","text":"In the past month, how often have you made time to take care of your body (eating well, moving, sleeping enough)?","reverse":false},
|
|
{"id":"TY2","dim":"physical","text":"How often do you feel tired or worn out?","reverse":true},
|
|
{"id":"TY3","dim":"physical","text":"Do you feel confident managing your own health needs (scheduling appointments, understanding your body)?","reverse":false},
|
|
{"id":"TY4","dim":"emotional","text":"When something stressful happens, how often do you have ways to cope that work for you?","reverse":false},
|
|
{"id":"TY5","dim":"emotional","text":"In the past two weeks, how often have you felt hopeful about your future?","reverse":false},
|
|
{"id":"TY6","dim":"emotional","text":"How often do you feel overwhelmed by the changes and pressures in your life right now?","reverse":true},
|
|
{"id":"TY7","dim":"social","text":"Do you feel like you matter to the people in your life?","reverse":false},
|
|
{"id":"TY8","dim":"social","text":"Can you speak up for what you need in situations that matter to you?","reverse":false},
|
|
{"id":"TY9","dim":"social","text":"Do you feel able to build and keep the kind of relationships you want (friendships, romantic, or otherwise)?","reverse":false},
|
|
{"id":"TY10","dim":"daily-life","text":"How confident are you handling everyday responsibilities like money, transportation, and schedules?","reverse":false},
|
|
{"id":"TY11","dim":"daily-life","text":"Do you feel you have a say in the decisions that affect your daily life?","reverse":false},
|
|
{"id":"TY12","dim":"daily-life","text":"How often does your current situation (school, work, living arrangement) feel like a good fit for you?","reverse":false},
|
|
{"id":"TY13","dim":"purpose","text":"Do you have a sense of what you want your life to look like in the next few years?","reverse":false},
|
|
{"id":"TY14","dim":"purpose","text":"How often do you feel like you are working toward something that matters to you?","reverse":false},
|
|
{"id":"TY15","dim":"purpose","text":"Do you feel like your life has a direction, even if you are not sure exactly where it is going?","reverse":false},
|
|
{"id":"TY16","dim":"growth","text":"Are you learning or developing skills that feel useful for your future?","reverse":false},
|
|
{"id":"TY17","dim":"growth","text":"How often do you try new things or step outside your comfort zone?","reverse":false},
|
|
{"id":"TY18","dim":"growth","text":"Do you feel like you are becoming the person you want to be?","reverse":false}
|
|
]
|
|
},
|
|
"sibling": {
|
|
"title": "Sibling",
|
|
"subtitle": "For brothers and sisters of people with disabilities or special needs",
|
|
"scale": ["Strongly agree", "Agree", "Not sure", "Disagree", "Strongly disagree"],
|
|
"emoji": null,
|
|
"items": [
|
|
{"id":"SB1","dim":"physical","text":"I take care of my own health needs (sleep, eating, exercise) even when things are hectic at home.","reverse":false},
|
|
{"id":"SB2","dim":"physical","text":"Stress related to my sibling's needs affects my body (headaches, trouble sleeping, feeling worn out).","reverse":true},
|
|
{"id":"SB3","dim":"physical","text":"I have enough energy for my own activities and interests.","reverse":false},
|
|
{"id":"SB4","dim":"emotional","text":"I feel invisible or overlooked in my family because of my sibling's needs.","reverse":true},
|
|
{"id":"SB5","dim":"emotional","text":"I worry about what will happen to my sibling when my parents or current caregivers can no longer provide care.","reverse":true},
|
|
{"id":"SB6","dim":"emotional","text":"I have mixed feelings about my sibling (love and frustration, pride and sadness) sometimes at the same time.","reverse":true},
|
|
{"id":"SB7","dim":"emotional","text":"I feel proud of my sibling and the relationship we share.","reverse":false},
|
|
{"id":"SB8","dim":"social","text":"I have people in my life I can talk to honestly about what it is like to be a sibling.","reverse":false},
|
|
{"id":"SB9","dim":"social","text":"I sometimes hold back from making plans or going out because of responsibilities related to my sibling.","reverse":true},
|
|
{"id":"SB10","dim":"social","text":"Other people understand what my life is like as a sibling of someone with a disability.","reverse":false},
|
|
{"id":"SB11","dim":"daily-life","text":"My daily routine is shaped by my sibling's needs more than I would like.","reverse":true},
|
|
{"id":"SB12","dim":"daily-life","text":"I have enough time and space for my own goals, hobbies, or work.","reverse":false},
|
|
{"id":"SB13","dim":"daily-life","text":"I feel comfortable asking for help or saying I cannot do something right now when my family needs me.","reverse":false},
|
|
{"id":"SB14","dim":"purpose","text":"My relationship with my sibling gives my life a sense of meaning or purpose.","reverse":false},
|
|
{"id":"SB15","dim":"purpose","text":"I feel prepared or am preparing for what my role in my sibling's life might look like in the future.","reverse":false},
|
|
{"id":"SB16","dim":"purpose","text":"I understand my sibling's disability or condition well enough to explain it to others.","reverse":false},
|
|
{"id":"SB17","dim":"growth","text":"Being a sibling has made me more understanding or empathetic toward other people.","reverse":false},
|
|
{"id":"SB18","dim":"growth","text":"I have a strong sense of who I am outside of my role as a sibling.","reverse":false},
|
|
{"id":"SB19","dim":"growth","text":"I feel capable of handling difficult situations because of what I have learned from my experiences.","reverse":false}
|
|
]
|
|
},
|
|
"special-needs": {
|
|
"title": "Accessible",
|
|
"subtitle": "For people with disabilities (a support person may help you read)",
|
|
"scale": ["Not Good", "Okay", "Pretty Good", "Good", "Very Good"],
|
|
"emoji": ["😟", "😐", "🙂", "😊", "😄"],
|
|
"items": [
|
|
{"id":"SN1","dim":"physical","text":"How do you feel about your health?","reverse":false},
|
|
{"id":"SN2","dim":"physical","text":"How do you feel about how safe you feel?","reverse":false},
|
|
{"id":"SN3","dim":"emotional","text":"In the past two weeks, how often have you felt happy?","reverse":false},
|
|
{"id":"SN4","dim":"emotional","text":"In the past two weeks, how often have you felt calm?","reverse":false},
|
|
{"id":"SN5","dim":"social","text":"How do you feel about how you get along with people? Like your family and friends.","reverse":false},
|
|
{"id":"SN6","dim":"social","text":"How do you feel about doing things outside your home? Like in your community or neighborhood.","reverse":false},
|
|
{"id":"SN7","dim":"daily-life","text":"How do you feel about the things you have? Like your money and the things you own.","reverse":false},
|
|
{"id":"SN8","dim":"daily-life","text":"How do you feel about how your day goes? Like your routine and what you do.","reverse":false},
|
|
{"id":"SN9","dim":"purpose","text":"How do you feel about the things you do or make?","reverse":false},
|
|
{"id":"SN10","dim":"purpose","text":"How do you feel about your life as a whole?","reverse":false},
|
|
{"id":"SN11","dim":"growth","text":"How do you feel about what will happen to you later in your life?","reverse":false},
|
|
{"id":"SN12","dim":"growth","text":"In the past two weeks, how often have you felt like doing things?","reverse":false}
|
|
]
|
|
}
|
|
};
|
|
|
|
const DIMS = [
|
|
{"key":"physical","label":"Physical","icon":"💪","color":"#7EACB9","bg":"#EFF5F7","desc":"rest, movement, nutrition, medical care"},
|
|
{"key":"emotional","label":"Emotional","icon":"💗","color":"#C08B8B","bg":"#F5E8E8","desc":"naming feelings, coping, support"},
|
|
{"key":"social","label":"Social","icon":"🤝","color":"#7FB98C","bg":"#EFF7F1","desc":"connection, understanding, community"},
|
|
{"key":"daily-life","label":"Daily Life","icon":"📋","color":"#E8A87C","bg":"#FDF3EC","desc":"home, finances, schedules, advocacy"},
|
|
{"key":"purpose","label":"Purpose","icon":"⭐","color":"#E8C46C","bg":"#FDF8EC","desc":"meaning, values, identity, hope"},
|
|
{"key":"growth","label":"Growth","icon":"🌱","color":"#B8A4CC","bg":"#F3EFF7","desc":"learning, creativity, becoming"}
|
|
];
|
|
|
|
// Resource connector database
|
|
// Maps dimension → array of {name, desc, url, audiences (null=all)}
|
|
const RESOURCES = {
|
|
"physical": [
|
|
{"name":"MedlinePlus","desc":"Trusted health information from the National Library of Medicine — conditions, treatments, and wellness.","url":"https://medlineplus.gov/","audiences":null},
|
|
{"name":"DisabilityInfo.gov","desc":"Federal resource connecting people with disabilities to health, housing, and transportation services.","url":"https://www.disabilityinfo.gov/","audiences":null},
|
|
{"name":"NCHPAD — Inclusive Fitness","desc":"National Center on Health, Physical Activity and Disability — exercise programs, adaptive recreation guides, and movement tips.","url":"https://www.nchpad.org/","audiences":["special-needs","generalized"]},
|
|
{"name":"ARCH National Respite Network","desc":"Find respite care providers and caregiver support services near you.","url":"https://archrespite.org/respitelocator","audiences":["parent-caregiver","family-member"]},
|
|
{"name":"Sleep Foundation","desc":"Evidence-based guides to improve sleep quality, manage fatigue, and build better rest habits.","url":"https://www.sleepfoundation.org/","audiences":null},
|
|
{"name":"Special Olympics Unified Sports","desc":"Inclusive sports programs bringing together people with and without disabilities on the same team.","url":"https://www.specialolympics.org/what-we-do/sports/unified-sports","audiences":["transition-youth","special-needs"]},
|
|
{"name":"Find a Center for Independent Living","desc":"Locate your nearest CIL for peer support, skills training, and advocacy for independent living.","url":"https://ncil.org/about/find-your-cil-list/","audiences":["transition-youth"]},
|
|
{"name":"Sibling Support Project","desc":"Programs and resources for siblings of people with disabilities at every stage of life.","url":"https://siblingsupport.org/","audiences":["sibling"]}
|
|
],
|
|
"emotional": [
|
|
{"name":"Psychology Today Therapist Finder","desc":"Search for licensed therapists by location, specialty, insurance, and issue area.","url":"https://www.psychologytoday.com/us/therapists","audiences":null},
|
|
{"name":"NAMI Helpline & Support Groups","desc":"National Alliance on Mental Illness — free support groups, crisis resources, and caregiver education.","url":"https://www.nami.org/support-education","audiences":null},
|
|
{"name":"988 Suicide & Crisis Lifeline","desc":"Free 24/7 support by call or text at 988 for anyone in emotional distress.","url":"https://988lifeline.org/","audiences":null},
|
|
{"name":"Caregiver Action Network","desc":"Peer support, education, and practical tips for family caregivers managing stress and burnout.","url":"https://www.caregiveraction.org/","audiences":["parent-caregiver","family-member"]},
|
|
{"name":"SAMHSA Treatment Locator","desc":"Find mental health and substance use treatment facilities and services near you.","url":"https://findtreatment.gov/","audiences":null},
|
|
{"name":"Youth.gov — Adolescent Health","desc":"Federal resources on physical and emotional wellness for young people, including those with disabilities.","url":"https://youth.gov/youth-topics/adolescent-health","audiences":["transition-youth"]},
|
|
{"name":"Sibshops — Find a Workshop","desc":"Peer support workshops for siblings of people with disabilities — connect with others who understand.","url":"https://siblingsupport.org/sibshops/find-a-sibshop-near-you/","audiences":["sibling"]}
|
|
],
|
|
"social": [
|
|
{"name":"The Arc — Local Chapters","desc":"Connect with local disability advocacy chapters for community events, peer support, and family networking.","url":"https://thearc.org/find-a-chapter/","audiences":null},
|
|
{"name":"Family Voices","desc":"National family-led organization connecting parents of children with special health care needs.","url":"https://familyvoices.org/","audiences":["parent-caregiver","family-member"]},
|
|
{"name":"Easterseals Community Services","desc":"Local programs for disability support, social connection, and community inclusion.","url":"https://www.easterseals.com/find-services/","audiences":["special-needs","generalized"]},
|
|
{"name":"Eldercare Locator","desc":"Find local aging and caregiver support services, including social programs and respite.","url":"https://eldercare.acl.gov/","audiences":null},
|
|
{"name":"Parent to Parent USA","desc":"Get matched with an experienced parent mentor who has walked a similar path.","url":"https://www.p2pusa.org/","audiences":["parent-caregiver","family-member"]},
|
|
{"name":"Self Advocates Becoming Empowered","desc":"National organization run by and for people with disabilities — leadership, connection, and self-advocacy.","url":"https://sabeusa.com/","audiences":["transition-youth","special-needs"]},
|
|
{"name":"Sibling Leadership Network","desc":"National network connecting siblings of people with disabilities for peer support, research, and advocacy.","url":"https://www.siblingleadership.org/","audiences":["sibling"]}
|
|
],
|
|
"daily-life": [
|
|
{"name":"Center for Parent Information & Resources","desc":"Navigate IEPs, 504 plans, special education rights, and advocacy for your child.","url":"https://www.parentcenterhub.org/","audiences":["parent-caregiver","family-member"]},
|
|
{"name":"Benefits.gov","desc":"Official benefits screening tool — find out which federal and state programs you qualify for.","url":"https://www.benefits.gov/","audiences":null},
|
|
{"name":"National Disability Rights Network","desc":"Find your state's protection and advocacy agency for legal help with disability rights and services.","url":"https://ndrn.org/about/ndrn-member-agencies/","audiences":null},
|
|
{"name":"ABLE National Resource Center","desc":"Tax-advantaged ABLE savings accounts for people with disabilities — preserve benefits while saving.","url":"https://www.ablenrc.org/","audiences":null},
|
|
{"name":"ADA National Network","desc":"Free guidance on the Americans with Disabilities Act — your rights, accommodations, and compliance.","url":"https://adata.org/","audiences":null},
|
|
{"name":"JAN — Job Accommodation Network","desc":"Free expert guidance on workplace accommodations and employment for people with disabilities.","url":"https://askjan.org/","audiences":["transition-youth"]},
|
|
{"name":"Charting the LifeCourse","desc":"Tools and frameworks for planning a good life — work, school, relationships, and independence.","url":"https://www.lifecoursetools.com/","audiences":["transition-youth","sibling"]},
|
|
{"name":"Think College","desc":"National center helping people with intellectual disabilities access college and post-secondary education.","url":"https://thinkcollege.net/","audiences":["transition-youth"]}
|
|
],
|
|
"purpose": [
|
|
{"name":"Disability Belongs","desc":"Celebrating disability identity, culture, and community — advocacy, storytelling, and leadership programs.","url":"https://disabilitybelongs.org/","audiences":["special-needs","generalized"]},
|
|
{"name":"Self Advocacy Online","desc":"Resources and networks for people with intellectual and developmental disabilities to speak up and lead.","url":"https://selfadvocacyonline.org/","audiences":["special-needs","generalized"]},
|
|
{"name":"ARCHANGELS","desc":"Recognizing and supporting the invisible army of caregivers — tools, community, and purpose.","url":"https://www.archangels.me/","audiences":["parent-caregiver","family-member"]},
|
|
{"name":"StoryCorps Disability Stories","desc":"Voices from the disability community — listen, share, and connect through personal narrative.","url":"https://storycorps.org/","audiences":null},
|
|
{"name":"Yale Center for Faith & Culture","desc":"Resources on meaning, vocation, and flourishing from Yale's faith and public life center.","url":"https://faith.yale.edu/","audiences":null},
|
|
{"name":"ASAN — Autistic Self Advocacy Network","desc":"Autistic-led organization providing resources on identity, self-advocacy, and community for autistic people.","url":"https://autisticadvocacy.org/","audiences":["transition-youth"]},
|
|
{"name":"Family Voices YASA","desc":"Youth Adult Synergy Alliance — empowering young people with disabilities and their families through peer leadership.","url":"https://familyvoices.org/","audiences":["transition-youth","sibling"]}
|
|
],
|
|
"growth": [
|
|
{"name":"Coursera — Free Courses","desc":"Thousands of free online courses in health, education, advocacy, and personal development.","url":"https://www.coursera.org/","audiences":null},
|
|
{"name":"IRIS Center — Vanderbilt","desc":"Free online resources for educators and professionals on disability-related topics and evidence-based practices.","url":"https://iris.peabody.vanderbilt.edu/","audiences":["professional"]},
|
|
{"name":"Art Beyond Sight","desc":"Inclusive arts programs and creative expression resources for people with disabilities.","url":"https://www.artbeyondsight.org/","audiences":["special-needs","generalized"]},
|
|
{"name":"NTACT:C Transition Resources","desc":"National Technical Assistance Center on Transition — tools for planning life transitions at any age.","url":"https://transitionta.org/","audiences":null},
|
|
{"name":"Disability After Dark Podcast","desc":"A podcast amplifying disability stories, culture, and lived experience.","url":"https://disabilityafterdark.com/","audiences":null},
|
|
{"name":"NCWD Youth — Workforce Development","desc":"National Collaborative on Workforce and Disability — helping young people navigate employment and careers.","url":"https://www.ncwd-youth.info/","audiences":["transition-youth"]}
|
|
]
|
|
};
|
|
|
|
// ═══════════════════════════════════════════
|
|
// STATE
|
|
// ═══════════════════════════════════════════
|
|
|
|
let selectedAudience = null;
|
|
let currentQ = 0;
|
|
let lastQ = -1; // ponytail: track direction for slide animation
|
|
let answers = {};
|
|
let lastResults = null;
|
|
|
|
const STORAGE_KEY_PROGRESS = 'wow_progress';
|
|
const STORAGE_KEY_HISTORY = 'wow_history';
|
|
|
|
// ═══════════════════════════════════════════
|
|
// PERSISTENCE
|
|
// ═══════════════════════════════════════════
|
|
|
|
function saveProgress() {
|
|
if (!selectedAudience) return;
|
|
const data = {audience: selectedAudience, currentQ, answers, ts: Date.now()};
|
|
try { localStorage.setItem(STORAGE_KEY_PROGRESS, JSON.stringify(data)); } catch(e) {}
|
|
}
|
|
|
|
function loadProgress() {
|
|
try {
|
|
const raw = localStorage.getItem(STORAGE_KEY_PROGRESS);
|
|
if (!raw) return null;
|
|
const data = JSON.parse(raw);
|
|
if (Date.now() - data.ts > 24 * 60 * 60 * 1000) { clearProgress(); return null; }
|
|
if (data.answers && Object.keys(data.answers).length > 0) return data;
|
|
} catch(e) {}
|
|
return null;
|
|
}
|
|
|
|
function clearProgress() {
|
|
try { localStorage.removeItem(STORAGE_KEY_PROGRESS); } catch(e) {}
|
|
}
|
|
|
|
function saveResultsToHistory(results, overall, audience) {
|
|
try {
|
|
const raw = localStorage.getItem(STORAGE_KEY_HISTORY);
|
|
const history = raw ? JSON.parse(raw) : [];
|
|
history.unshift({
|
|
audience, overall,
|
|
results: results.map(r => ({key: r.key, label: r.label, score: r.score, status: r.status})),
|
|
date: new Date().toISOString(),
|
|
ts: Date.now()
|
|
});
|
|
if (history.length > 10) history.length = 10;
|
|
localStorage.setItem(STORAGE_KEY_HISTORY, JSON.stringify(history));
|
|
} catch(e) {}
|
|
}
|
|
|
|
function loadHistory() {
|
|
try {
|
|
const raw = localStorage.getItem(STORAGE_KEY_HISTORY);
|
|
return raw ? JSON.parse(raw) : [];
|
|
} catch(e) { return []; }
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// RESOURCE MATCHING
|
|
// ═══════════════════════════════════════════
|
|
|
|
function getRecommendedResources(results, audience) {
|
|
// Pick dimensions scoring below 60, sorted lowest first
|
|
const needsHelp = results
|
|
.filter(r => r.score < 60)
|
|
.sort((a, b) => a.score - b.score);
|
|
|
|
const matched = [];
|
|
const seen = new Set();
|
|
|
|
needsHelp.forEach(r => {
|
|
const pool = RESOURCES[r.key] || [];
|
|
pool.forEach(res => {
|
|
if (seen.has(res.name)) return;
|
|
if (res.audiences && !res.audiences.includes(audience)) return;
|
|
seen.add(res.name);
|
|
matched.push({...res, dimKey: r.key, dimLabel: r.label, dimColor: r.color, score: r.score});
|
|
});
|
|
});
|
|
|
|
// If we have room, add some from moderate dimensions too
|
|
if (matched.length < 4) {
|
|
const moderate = results.filter(r => r.score >= 60 && r.score < 75);
|
|
moderate.forEach(r => {
|
|
const pool = RESOURCES[r.key] || [];
|
|
pool.forEach(res => {
|
|
if (seen.has(res.name)) return;
|
|
if (res.audiences && !res.audiences.includes(audience)) return;
|
|
seen.add(res.name);
|
|
matched.push({...res, dimKey: r.key, dimLabel: r.label, dimColor: r.color, score: r.score});
|
|
});
|
|
});
|
|
}
|
|
|
|
return matched.slice(0, 8);
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// AUDIENCE SELECTOR
|
|
// ═══════════════════════════════════════════
|
|
|
|
const icons = {'generalized':'👤','parent-caregiver':'👨👩👧','family-member':'🏠','professional':'🩺','transition-youth':'🚀','sibling':'💛','special-needs':'♿'};
|
|
|
|
function buildAudienceGrid() {
|
|
const grid = document.getElementById('audience-grid');
|
|
grid.innerHTML = '';
|
|
Object.entries(QUESTIONS).forEach(([key, q]) => {
|
|
const card = document.createElement('div');
|
|
card.className = 'audience-card';
|
|
card.dataset.key = key;
|
|
card.innerHTML = `<div class="aud-icon">${icons[key]||'👤'}</div><div class="aud-title">${q.title}</div><div class="aud-desc">${q.subtitle}</div>`;
|
|
card.onclick = () => selectAudience(key);
|
|
grid.appendChild(card);
|
|
});
|
|
}
|
|
|
|
function selectAudience(key) {
|
|
selectedAudience = key;
|
|
document.querySelectorAll('.audience-card').forEach(c => c.classList.toggle('selected', c.dataset.key === key));
|
|
document.getElementById('btn-start').disabled = false;
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// LANDING WHEEL SVG
|
|
// ═══════════════════════════════════════════
|
|
|
|
function drawLandingWheel() {
|
|
const svg = document.getElementById('landing-wheel');
|
|
const cx = 120, cy = 120, r = 90, inner = 40;
|
|
let paths = '';
|
|
DIMS.forEach((d, i) => {
|
|
const a1 = (i * 60 - 90) * Math.PI / 180;
|
|
const a2 = ((i + 1) * 60 - 90) * Math.PI / 180;
|
|
const x1 = cx + r * Math.cos(a1), y1 = cy + r * Math.sin(a1);
|
|
const x2 = cx + r * Math.cos(a2), y2 = cy + r * Math.sin(a2);
|
|
const ix1 = cx + inner * Math.cos(a1), iy1 = cy + inner * Math.sin(a1);
|
|
const ix2 = cx + inner * Math.cos(a2), iy2 = cy + inner * Math.sin(a2);
|
|
paths += `<path d="M${ix1},${iy1} L${x1},${y1} A${r},${r} 0 0,1 ${x2},${y2} L${ix2},${iy2} A${inner},${inner} 0 0,0 ${ix1},${iy1}" fill="${d.color}" opacity=".8"/>`;
|
|
const mx = cx + (r + inner) / 2 * Math.cos((a1 + a2) / 2);
|
|
const my = cy + (r + inner) / 2 * Math.sin((a1 + a2) / 2);
|
|
paths += `<text x="${mx}" y="${my}" text-anchor="middle" dominant-baseline="central" fill="white" font-size="12" font-weight="700">${d.icon}</text>`;
|
|
});
|
|
svg.innerHTML = paths + `<circle cx="${cx}" cy="${cy}" r="${inner - 4}" fill="var(--cream)"/><text x="${cx}" y="${cy}" text-anchor="middle" dominant-baseline="central" font-size="20">☸</text>`;
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// NAVIGATION
|
|
// ═══════════════════════════════════════════
|
|
|
|
function showScreen(name) {
|
|
document.querySelectorAll('.screen').forEach(s => s.classList.remove('active'));
|
|
document.getElementById('screen-' + name).classList.add('active');
|
|
window.scrollTo(0, 0);
|
|
}
|
|
|
|
function startAssessment() {
|
|
if (!selectedAudience) return;
|
|
currentQ = 0;
|
|
lastQ = -1;
|
|
answers = {};
|
|
showScreen('questions');
|
|
renderQuestion();
|
|
saveProgress();
|
|
}
|
|
|
|
function resumeAssessment() {
|
|
const saved = loadProgress();
|
|
if (!saved) return;
|
|
selectedAudience = saved.audience;
|
|
currentQ = saved.currentQ;
|
|
lastQ = -1;
|
|
answers = saved.answers || {};
|
|
document.getElementById('btn-start').disabled = false;
|
|
showScreen('questions');
|
|
renderQuestion();
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// QUESTION RENDERING
|
|
// ═══════════════════════════════════════════
|
|
|
|
function renderQuestion() {
|
|
const items = QUESTIONS[selectedAudience].items;
|
|
const item = items[currentQ];
|
|
const dim = DIMS.find(d => d.key === item.dim);
|
|
const total = items.length;
|
|
const scale = QUESTIONS[selectedAudience].scale;
|
|
const emojis = QUESTIONS[selectedAudience].emoji;
|
|
|
|
document.getElementById('dim-label').textContent = dim.icon + ' ' + dim.label;
|
|
document.getElementById('q-count').textContent = `Question ${currentQ + 1} of ${total}`;
|
|
document.getElementById('progress-fill').style.width = `${((currentQ + 1) / total) * 100}%`;
|
|
|
|
const di = document.getElementById('dim-indicator');
|
|
di.innerHTML = '';
|
|
DIMS.forEach(d => {
|
|
const dot = document.createElement('div');
|
|
dot.className = 'dim-dot' + (d.key === item.dim ? ' active' : '');
|
|
dot.style.background = d.color;
|
|
dot.title = d.label;
|
|
di.appendChild(dot);
|
|
});
|
|
|
|
const area = document.getElementById('question-area');
|
|
let optionsHtml = scale.map((s, i) => {
|
|
const selected = answers[item.id] === i ? ' selected' : '';
|
|
const emoji = emojis ? `<span class="opt-emoji">${emojis[i]}</span>` : '';
|
|
return `<div class="option-item${selected}" onclick="selectOption('${item.id}',${i})"><div class="radio-circle"></div>${emoji}<span>${s}</span></div>`;
|
|
}).join('');
|
|
|
|
const slideClass = lastQ < 0 ? '' : (currentQ > lastQ ? ' slide-left' : ' slide-right');
|
|
area.innerHTML = `<div class="question-card${slideClass}"><div class="q-dim-label" style="color:${dim.color}">${dim.label}</div><div class="q-number">${item.id}</div><div class="q-text">${item.text}</div><div class="options-list">${optionsHtml}</div></div>`;
|
|
lastQ = currentQ;
|
|
|
|
document.getElementById('btn-prev').style.visibility = currentQ === 0 ? 'hidden' : 'visible';
|
|
const nextBtn = document.getElementById('btn-next');
|
|
if (currentQ === total - 1) {
|
|
nextBtn.outerHTML = `<button class="btn-submit" id="btn-next" onclick="submitAssessment()" ${answers[item.id] === undefined ? 'disabled' : ''}>See My Results →</button>`;
|
|
} else {
|
|
nextBtn.disabled = answers[item.id] === undefined;
|
|
}
|
|
|
|
saveProgress();
|
|
}
|
|
|
|
function selectOption(qId, val) {
|
|
answers[qId] = val;
|
|
renderQuestion();
|
|
}
|
|
|
|
function nextQuestion() {
|
|
const items = QUESTIONS[selectedAudience].items;
|
|
if (currentQ < items.length - 1) { currentQ++; renderQuestion(); }
|
|
}
|
|
|
|
function prevQuestion() {
|
|
if (currentQ > 0) { currentQ--; renderQuestion(); }
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// SCORING
|
|
// ═══════════════════════════════════════════
|
|
|
|
function scoreAssessment() {
|
|
const items = QUESTIONS[selectedAudience].items;
|
|
const scaleLen = QUESTIONS[selectedAudience].scale.length;
|
|
const dimScores = {};
|
|
DIMS.forEach(d => { dimScores[d.key] = {sum: 0, count: 0}; });
|
|
|
|
items.forEach(item => {
|
|
const val = answers[item.id];
|
|
if (val === undefined) return;
|
|
const score = item.reverse ? (scaleLen - 1 - val) : val;
|
|
dimScores[item.dim].sum += score;
|
|
dimScores[item.dim].count += 1;
|
|
});
|
|
|
|
const results = DIMS.map(d => {
|
|
const {sum, count} = dimScores[d.key];
|
|
const raw = count > 0 ? (sum / count) / (scaleLen - 1) * 100 : 0;
|
|
const score = Math.round(raw);
|
|
let status = 'strong';
|
|
if (score < 40) status = 'needs-attention';
|
|
else if (score < 60) status = 'moderate';
|
|
return {...d, score, status};
|
|
});
|
|
|
|
const overall = Math.round(results.reduce((s, r) => s + r.score, 0) / results.length);
|
|
let overallStatus = 'Strong';
|
|
if (overall < 40) overallStatus = 'Needs Attention';
|
|
else if (overall < 60) overallStatus = 'Moderate';
|
|
return {results, overall, overallStatus};
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// RESULTS RENDERING
|
|
// ═══════════════════════════════════════════
|
|
|
|
function submitAssessment() {
|
|
const {results, overall, overallStatus} = scoreAssessment();
|
|
lastResults = {results, overall, overallStatus, audience: selectedAudience};
|
|
|
|
clearProgress();
|
|
saveResultsToHistory(results, overall, selectedAudience);
|
|
renderResults(results, overall, overallStatus, selectedAudience);
|
|
showScreen('results');
|
|
}
|
|
|
|
function renderResults(results, overall, overallStatus, audience) {
|
|
// Summary
|
|
const countNeedsAttention = results.filter(r => r.status === 'needs-attention').length;
|
|
const countModerate = results.filter(r => r.status === 'moderate').length;
|
|
let summaryText = `Your overall wellness score is ${overall}/100 (${overallStatus}). `;
|
|
if (countNeedsAttention > 0) {
|
|
summaryText += `${countNeedsAttention} area${countNeedsAttention > 1 ? 's' : ''} could use attention. `;
|
|
}
|
|
if (countModerate > 0) {
|
|
summaryText += `${countModerate} area${countModerate > 1 ? 's are' : ' is'} in the moderate range. `;
|
|
}
|
|
summaryText += 'Scroll down for resources matched to your needs.';
|
|
document.getElementById('results-summary').textContent = summaryText;
|
|
|
|
// Dim cards
|
|
const grid = document.getElementById('results-grid');
|
|
grid.innerHTML = results.map(r => `
|
|
<div class="dim-card" style="border-left:3px solid ${r.color}">
|
|
<div class="dim-card-header">
|
|
<span class="dim-card-name"><span class="dim-icon">${r.icon}</span> ${r.label}</span>
|
|
<span class="status-badge ${r.status}">${r.status.replace('-', ' ')}</span>
|
|
</div>
|
|
<div class="dim-score-text" style="color:${r.color}">${r.score}</div>
|
|
<div class="dim-desc">${r.desc}</div>
|
|
</div>
|
|
`).join('');
|
|
|
|
// Overall
|
|
const oc = document.getElementById('overall-score');
|
|
oc.textContent = overall;
|
|
oc.style.color = overall >= 60 ? 'var(--green)' : overall >= 40 ? 'var(--yellow)' : 'var(--red)';
|
|
|
|
// Results wheel
|
|
drawResultsWheel(results);
|
|
|
|
// Resource recommendations
|
|
const resources = getRecommendedResources(results, audience);
|
|
const resSection = document.getElementById('resource-section');
|
|
const resList = document.getElementById('resource-list');
|
|
|
|
if (resources.length > 0) {
|
|
resSection.style.display = 'block';
|
|
const dim = DIMS.find(d => d.key === resources[0].dimKey);
|
|
resList.innerHTML = resources.map(r => `
|
|
<div class="resource-card" style="border-left-color:${r.dimColor}">
|
|
<div class="res-dim" style="color:${r.dimColor}">${r.dimLabel} · Score: ${r.score}</div>
|
|
<div class="res-name">${r.name}</div>
|
|
<div class="res-desc">${r.desc}</div>
|
|
<a class="res-link" href="${r.url}" target="_blank" rel="noopener">Visit resource →</a>
|
|
</div>
|
|
`).join('');
|
|
} else {
|
|
resSection.style.display = 'none';
|
|
}
|
|
|
|
// History
|
|
renderHistory();
|
|
}
|
|
|
|
function drawResultsWheel(results) {
|
|
const svg = document.getElementById('results-wheel');
|
|
const cx = 140, cy = 140, maxR = 120, inner = 30;
|
|
let paths = '';
|
|
|
|
// Background rings
|
|
let rings = '';
|
|
[25, 50, 75, 100].forEach(pct => {
|
|
const rr = inner + (maxR - inner) * pct / 100;
|
|
rings += `<circle cx="${cx}" cy="${cy}" r="${rr}" fill="none" stroke="var(--gray-200)" stroke-width="1" opacity=".5"/>`;
|
|
});
|
|
|
|
results.forEach((r, i) => {
|
|
const a1 = (i * 60 - 90) * Math.PI / 180;
|
|
const a2 = ((i + 1) * 60 - 90) * Math.PI / 180;
|
|
const segR = inner + (maxR - inner) * (r.score / 100);
|
|
const x1 = cx + segR * Math.cos(a1), y1 = cy + segR * Math.sin(a1);
|
|
const x2 = cx + segR * Math.cos(a2), y2 = cy + segR * Math.sin(a2);
|
|
const ix1 = cx + inner * Math.cos(a1), iy1 = cy + inner * Math.sin(a1);
|
|
const ix2 = cx + inner * Math.cos(a2), iy2 = cy + inner * Math.sin(a2);
|
|
paths += `<path d="M${ix1},${iy1} L${x1},${y1} A${segR},${segR} 0 0,1 ${x2},${y2} L${ix2},${iy2} A${inner},${inner} 0 0,0 ${ix1},${iy1}" fill="${r.color}" opacity=".85"/>`;
|
|
// Label
|
|
const labelR = maxR + 16;
|
|
const mx = cx + labelR * Math.cos((a1 + a2) / 2);
|
|
const my = cy + labelR * Math.sin((a1 + a2) / 2);
|
|
paths += `<text x="${mx}" y="${my}" text-anchor="middle" dominant-baseline="central" font-size="11" font-weight="600" fill="var(--charcoal)">${r.icon} ${r.score}</text>`;
|
|
});
|
|
|
|
svg.innerHTML = rings + paths + `<circle cx="${cx}" cy="${cy}" r="${inner}" fill="var(--cream)"/>`;
|
|
}
|
|
|
|
function renderHistory() {
|
|
const history = loadHistory();
|
|
const section = document.getElementById('history-section');
|
|
const list = document.getElementById('history-list');
|
|
|
|
if (history.length === 0) {
|
|
section.style.display = 'none';
|
|
return;
|
|
}
|
|
section.style.display = 'block';
|
|
list.innerHTML = history.map((h, i) => {
|
|
const d = new Date(h.date);
|
|
const dateStr = d.toLocaleDateString('en-US', {month:'short', day:'numeric', year:'numeric'});
|
|
const audienceName = QUESTIONS[h.audience] ? QUESTIONS[h.audience].title : h.audience;
|
|
return `<div class="history-item" onclick="viewHistoryItem(${i})">
|
|
<span class="hist-date">${dateStr}</span>
|
|
<span>${audienceName}</span>
|
|
<span class="hist-score">${h.overall}/100</span>
|
|
</div>`;
|
|
}).join('');
|
|
}
|
|
|
|
function viewHistoryItem(index) {
|
|
const history = loadHistory();
|
|
const h = history[index];
|
|
if (!h) return;
|
|
|
|
// Reconstruct full DIMS data for rendering
|
|
const results = h.results.map(r => {
|
|
const dim = DIMS.find(d => d.key === r.key);
|
|
return {...dim, score: r.score, status: r.status};
|
|
});
|
|
|
|
lastResults = {results, overall: h.overall, audience: h.audience};
|
|
renderResults(results, h.overall,
|
|
h.overall >= 60 ? 'Strong' : h.overall >= 40 ? 'Moderate' : 'Needs Attention',
|
|
h.audience);
|
|
showScreen('results');
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// SHARE / EXPORT
|
|
// ═══════════════════════════════════════════
|
|
|
|
function shareResults() {
|
|
if (!lastResults) return;
|
|
const {results, overall, audience} = lastResults;
|
|
const audienceName = QUESTIONS[audience] ? QUESTIONS[audience].title : audience;
|
|
const dimSummary = results.map(r => `${r.icon} ${r.label}: ${r.score}/100 (${r.status.replace('-',' ')})`).join('\n');
|
|
const text = `Wheel of Wellness Results\nAudience: ${audienceName}\nOverall: ${overall}/100\n\n${dimSummary}\n\nTake the assessment: ${window.location.href}`;
|
|
|
|
if (navigator.share) {
|
|
navigator.share({title: 'My Wheel of Wellness Results', text}).catch(() => {});
|
|
} else {
|
|
navigator.clipboard.writeText(text).then(() => {
|
|
alert('Results copied to clipboard!');
|
|
}).catch(() => {
|
|
prompt('Copy your results:', text);
|
|
});
|
|
}
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// RETAKING
|
|
// ═══════════════════════════════════════════
|
|
|
|
function retake() {
|
|
answers = {};
|
|
currentQ = 0;
|
|
lastQ = -1;
|
|
selectedAudience = null;
|
|
lastResults = null;
|
|
clearProgress();
|
|
document.querySelectorAll('.audience-card').forEach(c => c.classList.remove('selected'));
|
|
document.getElementById('btn-start').disabled = true;
|
|
showScreen('landing');
|
|
}
|
|
|
|
// ═══════════════════════════════════════════
|
|
// INIT
|
|
// ═══════════════════════════════════════════
|
|
|
|
function init() {
|
|
buildAudienceGrid();
|
|
drawLandingWheel();
|
|
|
|
// Check for saved progress
|
|
const saved = loadProgress();
|
|
if (saved && saved.audience && saved.answers && Object.keys(saved.answers).length > 0) {
|
|
const banner = document.getElementById('saved-banner');
|
|
banner.classList.add('visible');
|
|
// Pre-select the audience
|
|
const q = QUESTIONS[saved.audience];
|
|
if (q) {
|
|
banner.innerHTML = `📋 You have a saved ${q.title} assessment in progress (${Object.keys(saved.answers).length} questions answered). Click here to continue.`;
|
|
}
|
|
}
|
|
}
|
|
|
|
init();
|
|
</script>
|
|
</body>
|
|
</html> |