MindCheck Bot commited on
Commit ·
85bcd03
1
Parent(s): 9cf72a7
Fix mobile navbar layout
Browse files- mindcheck-web/src/app/page.tsx +26 -16
mindcheck-web/src/app/page.tsx
CHANGED
|
@@ -6,17 +6,27 @@ export default function Home() {
|
|
| 6 |
{/* TopNavBar */}
|
| 7 |
<nav className="w-full top-0 sticky bg-surface dark:bg-on-background border-b border-outline-variant z-50">
|
| 8 |
<div className="flex justify-between items-center h-16 px-gutter max-w-container-max mx-auto">
|
| 9 |
-
|
|
|
|
| 10 |
<span className="material-symbols-outlined text-primary font-bold text-2xl" data-icon="psychology">psychology</span>
|
| 11 |
-
<span className="
|
| 12 |
</div>
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
<a className="font-body-md text-body-md text-on-surface-variant hover:text-primary transition-colors" href="#how-it-works">How it works</a>
|
| 15 |
<Link className="font-body-md text-body-md text-on-surface-variant hover:text-primary transition-colors" href="/history">History</Link>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
</div>
|
| 17 |
-
<Link href="/chat" className="font-body-md text-body-md bg-primary-container text-on-primary px-5 py-3 rounded active:scale-95 duration-150 hover:opacity-90">
|
| 18 |
-
Start Screening
|
| 19 |
-
</Link>
|
| 20 |
</div>
|
| 21 |
</nav>
|
| 22 |
|
|
@@ -32,7 +42,7 @@ export default function Home() {
|
|
| 32 |
<p className="font-body-md text-body-md text-on-surface-variant max-w-lg">
|
| 33 |
8 short PHQ-8 based questions. Anonymous, free, and does not replace professional diagnosis.
|
| 34 |
</p>
|
| 35 |
-
<div className="flex items-center gap-4 mt-4">
|
| 36 |
<Link href="/chat" className="font-body-md text-body-md bg-primary-container text-on-primary px-5 py-3 rounded active:scale-95 duration-150 hover:opacity-90">
|
| 37 |
Start Screening
|
| 38 |
</Link>
|
|
@@ -43,14 +53,14 @@ export default function Home() {
|
|
| 43 |
</div>
|
| 44 |
|
| 45 |
{/* Right: Abstract Decorative Block (40%) */}
|
| 46 |
-
<div className="md:col-span-5 relative h-
|
| 47 |
{/* Stacked Cards */}
|
| 48 |
-
<div className="absolute bg-surface w-4/5 h-48 border border-outline-variant rounded-lg rotate-6 opacity-60"></div>
|
| 49 |
-
<div className="absolute bg-surface w-4/5 h-48 border border-outline-variant rounded-lg -rotate-3 opacity-80"></div>
|
| 50 |
{/* Main Foreground Card */}
|
| 51 |
-
<div className="relative bg-surface w-4/5 h-48 border border-outline-variant rounded-lg p-6 flex flex-col justify-center items-center shadow-sm">
|
| 52 |
<span className="font-label-uppercase text-label-uppercase text-secondary mb-2">PHQ-8 SCORE</span>
|
| 53 |
-
<span className="text-5xl font-bold text-primary mb-4">14</span>
|
| 54 |
{/* Fake Bar Chart Snippet */}
|
| 55 |
<div className="w-full flex gap-2 h-10 items-end px-4">
|
| 56 |
<div className="w-1/4 bg-surface-variant h-1/2 rounded-t"></div>
|
|
@@ -83,8 +93,8 @@ export default function Home() {
|
|
| 83 |
|
| 84 |
{/* PHQ-8 Educational Section */}
|
| 85 |
<section id="about-phq8" className="w-full mt-16 scroll-mt-24">
|
| 86 |
-
<div className="bg-surface-container-low border border-outline-variant rounded-2xl p-
|
| 87 |
-
<div className="flex flex-col md:flex-row gap-12 items-center">
|
| 88 |
<div className="flex-1 flex flex-col gap-4">
|
| 89 |
<div className="inline-flex items-center gap-2 px-3 py-1 bg-primary-container text-on-primary-container rounded-full w-max mb-2">
|
| 90 |
<span className="material-symbols-outlined text-sm" data-icon="school">school</span>
|
|
@@ -140,7 +150,7 @@ export default function Home() {
|
|
| 140 |
{/* How It Works Steps */}
|
| 141 |
<section className="w-full mt-12">
|
| 142 |
<h2 className="font-section-heading text-section-heading text-on-surface mb-8 text-center">How It Works</h2>
|
| 143 |
-
<div className="grid grid-cols-
|
| 144 |
{[
|
| 145 |
{ icon: "chat_bubble", title: "Answer 8 Questions", desc: "Our chatbot asks 8 PHQ-8 interview questions — answer via quick chips or type freely." },
|
| 146 |
{ icon: "psychology", title: "AI Analysis", desc: "Your responses are analyzed using a trained MPNet deep learning model from DAIC-WOZ research." },
|
|
@@ -167,7 +177,7 @@ export default function Home() {
|
|
| 167 |
<p className="font-caption-sm text-caption-sm text-on-surface-variant max-w-2xl">
|
| 168 |
MindCheck is not a replacement for professional medical diagnosis. Please contact mental health professionals if you are in an emergency.
|
| 169 |
</p>
|
| 170 |
-
<p className="font-caption-sm text-caption-sm text-on-surface-variant opacity-60">©
|
| 171 |
</div>
|
| 172 |
</footer>
|
| 173 |
</>
|
|
|
|
| 6 |
{/* TopNavBar */}
|
| 7 |
<nav className="w-full top-0 sticky bg-surface dark:bg-on-background border-b border-outline-variant z-50">
|
| 8 |
<div className="flex justify-between items-center h-16 px-gutter max-w-container-max mx-auto">
|
| 9 |
+
{/* Logo */}
|
| 10 |
+
<div className="flex items-center gap-1 md:gap-2">
|
| 11 |
<span className="material-symbols-outlined text-primary font-bold text-2xl" data-icon="psychology">psychology</span>
|
| 12 |
+
<span className="text-xl md:text-hero-lg md:font-hero-lg font-bold text-primary dark:text-inverse-primary">MindCheck</span>
|
| 13 |
</div>
|
| 14 |
+
|
| 15 |
+
{/* Desktop Links */}
|
| 16 |
+
<div className="hidden md:flex items-center gap-8">
|
| 17 |
<a className="font-body-md text-body-md text-on-surface-variant hover:text-primary transition-colors" href="#how-it-works">How it works</a>
|
| 18 |
<Link className="font-body-md text-body-md text-on-surface-variant hover:text-primary transition-colors" href="/history">History</Link>
|
| 19 |
+
<Link href="/chat" className="font-body-md text-body-md bg-primary-container text-on-primary px-5 py-3 rounded active:scale-95 duration-150 hover:opacity-90 whitespace-nowrap">
|
| 20 |
+
Start Screening
|
| 21 |
+
</Link>
|
| 22 |
+
</div>
|
| 23 |
+
|
| 24 |
+
{/* Mobile Links */}
|
| 25 |
+
<div className="flex md:hidden items-center gap-4">
|
| 26 |
+
<Link href="/history" className="text-on-surface-variant hover:text-primary p-2 flex items-center">
|
| 27 |
+
<span className="material-symbols-outlined text-2xl" data-icon="history">history</span>
|
| 28 |
+
</Link>
|
| 29 |
</div>
|
|
|
|
|
|
|
|
|
|
| 30 |
</div>
|
| 31 |
</nav>
|
| 32 |
|
|
|
|
| 42 |
<p className="font-body-md text-body-md text-on-surface-variant max-w-lg">
|
| 43 |
8 short PHQ-8 based questions. Anonymous, free, and does not replace professional diagnosis.
|
| 44 |
</p>
|
| 45 |
+
<div className="flex flex-wrap items-center gap-4 mt-4">
|
| 46 |
<Link href="/chat" className="font-body-md text-body-md bg-primary-container text-on-primary px-5 py-3 rounded active:scale-95 duration-150 hover:opacity-90">
|
| 47 |
Start Screening
|
| 48 |
</Link>
|
|
|
|
| 53 |
</div>
|
| 54 |
|
| 55 |
{/* Right: Abstract Decorative Block (40%) */}
|
| 56 |
+
<div className="md:col-span-5 relative h-48 md:h-80 w-full flex justify-center items-center">
|
| 57 |
{/* Stacked Cards */}
|
| 58 |
+
<div className="absolute bg-surface w-4/5 h-36 md:h-48 border border-outline-variant rounded-lg rotate-6 opacity-60"></div>
|
| 59 |
+
<div className="absolute bg-surface w-4/5 h-36 md:h-48 border border-outline-variant rounded-lg -rotate-3 opacity-80"></div>
|
| 60 |
{/* Main Foreground Card */}
|
| 61 |
+
<div className="relative bg-surface w-4/5 h-36 md:h-48 border border-outline-variant rounded-lg p-6 flex flex-col justify-center items-center shadow-sm">
|
| 62 |
<span className="font-label-uppercase text-label-uppercase text-secondary mb-2">PHQ-8 SCORE</span>
|
| 63 |
+
<span className="text-4xl md:text-5xl font-bold text-primary mb-4">14</span>
|
| 64 |
{/* Fake Bar Chart Snippet */}
|
| 65 |
<div className="w-full flex gap-2 h-10 items-end px-4">
|
| 66 |
<div className="w-1/4 bg-surface-variant h-1/2 rounded-t"></div>
|
|
|
|
| 93 |
|
| 94 |
{/* PHQ-8 Educational Section */}
|
| 95 |
<section id="about-phq8" className="w-full mt-16 scroll-mt-24">
|
| 96 |
+
<div className="bg-surface-container-low border border-outline-variant rounded-2xl p-5 md:p-12 shadow-sm">
|
| 97 |
+
<div className="flex flex-col md:flex-row gap-6 md:gap-12 items-center">
|
| 98 |
<div className="flex-1 flex flex-col gap-4">
|
| 99 |
<div className="inline-flex items-center gap-2 px-3 py-1 bg-primary-container text-on-primary-container rounded-full w-max mb-2">
|
| 100 |
<span className="material-symbols-outlined text-sm" data-icon="school">school</span>
|
|
|
|
| 150 |
{/* How It Works Steps */}
|
| 151 |
<section className="w-full mt-12">
|
| 152 |
<h2 className="font-section-heading text-section-heading text-on-surface mb-8 text-center">How It Works</h2>
|
| 153 |
+
<div className="grid grid-cols-2 md:grid-cols-4 gap-6">
|
| 154 |
{[
|
| 155 |
{ icon: "chat_bubble", title: "Answer 8 Questions", desc: "Our chatbot asks 8 PHQ-8 interview questions — answer via quick chips or type freely." },
|
| 156 |
{ icon: "psychology", title: "AI Analysis", desc: "Your responses are analyzed using a trained MPNet deep learning model from DAIC-WOZ research." },
|
|
|
|
| 177 |
<p className="font-caption-sm text-caption-sm text-on-surface-variant max-w-2xl">
|
| 178 |
MindCheck is not a replacement for professional medical diagnosis. Please contact mental health professionals if you are in an emergency.
|
| 179 |
</p>
|
| 180 |
+
<p className="font-caption-sm text-caption-sm text-on-surface-variant opacity-60">© {new Date().getFullYear()} MindCheck. All rights reserved.</p>
|
| 181 |
</div>
|
| 182 |
</footer>
|
| 183 |
</>
|