adhd-app / index.html
afarouk79's picture
Add 3 files
65490c6 verified
Raw History Blame Contribute Delete
44.3 kB
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NeuroMind - ADHD/OCD/TICS Guide</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.rtl {
direction: rtl;
text-align: right;
}
.ltr {
direction: ltr;
text-align: left;
}
.slide-in {
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from { transform: translateY(20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.tab-active {
border-bottom: 3px solid #3b82f6;
color: #3b82f6;
font-weight: 600;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.flip-card {
perspective: 1000px;
}
.flip-card-inner {
transition: transform 0.6s;
transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner {
transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
backface-visibility: hidden;
}
.flip-card-back {
transform: rotateY(180deg);
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<div id="app" class="min-h-screen max-w-md mx-auto bg-white shadow-lg overflow-hidden">
<!-- Header -->
<header class="bg-gradient-to-r from-blue-500 to-purple-600 text-white p-4 shadow-md">
<div class="flex justify-between items-center">
<div class="flex items-center">
<i class="fas fa-brain text-2xl mr-2"></i>
<h1 id="app-title" class="text-xl font-bold">NeuroMind</h1>
</div>
<button id="lang-toggle" class="bg-white bg-opacity-20 px-3 py-1 rounded-full text-sm flex items-center">
<span id="current-lang">EN</span>
<i class="fas fa-exchange-alt ml-1"></i>
</button>
</div>
<p id="app-subtitle" class="text-sm opacity-90 mt-1">Understanding Neurodiversity</p>
</header>
<!-- Main Content -->
<main class="p-4 pb-20">
<!-- Language Toggle -->
<div class="mb-6 flex justify-center">
<div class="inline-flex rounded-md shadow-sm" role="group">
<button type="button" data-disorder="adhd" class="disorder-tab py-2 px-4 text-sm font-medium rounded-l-lg border border-gray-200 bg-white hover:bg-gray-50 focus:z-10 focus:ring-2 focus:ring-blue-500 tab-active">
<i class="fas fa-bolt mr-1 text-yellow-500"></i>
<span id="adhd-tab">ADHD</span>
</button>
<button type="button" data-disorder="ocd" class="disorder-tab py-2 px-4 text-sm font-medium border-t border-b border-gray-200 bg-white hover:bg-gray-50 focus:z-10 focus:ring-2 focus:ring-blue-500">
<i class="fas fa-sync-alt mr-1 text-purple-500"></i>
<span id="ocd-tab">OCD</span>
</button>
<button type="button" data-disorder="tics" class="disorder-tab py-2 px-4 text-sm font-medium rounded-r-md border border-gray-200 bg-white hover:bg-gray-50 focus:z-10 focus:ring-2 focus:ring-blue-500">
<i class="fas fa-hand-paper mr-1 text-green-500"></i>
<span id="tics-tab">Tics</span>
</button>
</div>
</div>
<!-- Disorder Content -->
<div id="content-area" class="slide-in">
<!-- ADHD Content (Default) -->
<div id="adhd-content" class="disorder-content">
<div class="bg-blue-50 rounded-lg p-4 mb-4 border border-blue-100">
<h2 class="text-lg font-semibold text-blue-800 mb-2" id="adhd-definition-title">What is ADHD?</h2>
<p class="text-blue-900" id="adhd-definition">ADHD (Attention-Deficit/Hyperactivity Disorder) is a neurodevelopmental disorder characterized by inattention, hyperactivity, and impulsivity that interferes with functioning or development.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100 card-hover transition-all duration-200">
<h3 class="font-medium text-gray-800 mb-2 flex items-center">
<i class="fas fa-exclamation-circle text-red-500 mr-2"></i>
<span id="adhd-symptoms-title">Symptoms</span>
</h3>
<ul class="text-sm text-gray-600 list-disc pl-5 space-y-1" id="adhd-symptoms">
<li>Difficulty sustaining attention</li>
<li>Excessive fidgeting or restlessness</li>
<li>Impulsive decision-making</li>
<li>Forgetfulness in daily activities</li>
<li>Difficulty organizing tasks</li>
</ul>
</div>
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100 card-hover transition-all duration-200">
<h3 class="font-medium text-gray-800 mb-2 flex items-center">
<i class="fas fa-lightbulb text-yellow-500 mr-2"></i>
<span id="adhd-management-title">Management</span>
</h3>
<ul class="text-sm text-gray-600 list-disc pl-5 space-y-1" id="adhd-management">
<li>Behavioral therapy</li>
<li>Medication (stimulants/non-stimulants)</li>
<li>Organizational strategies</li>
<li>Regular exercise</li>
<li>Mindfulness techniques</li>
</ul>
</div>
</div>
<div class="mb-6">
<h3 class="text-lg font-semibold mb-3 text-gray-800" id="adhd-myths-title">Common Myths</h3>
<div class="space-y-3">
<div class="flip-card w-full h-32">
<div class="flip-card-inner w-full h-full">
<div class="flip-card-front bg-white p-4 rounded-lg shadow-sm border border-gray-200 h-full flex items-center">
<p class="text-gray-700 font-medium" id="adhd-myth1">ADHD is just laziness</p>
</div>
<div class="flip-card-back bg-blue-50 p-4 rounded-lg shadow-sm border border-blue-200 h-full flex items-center">
<p class="text-blue-800" id="adhd-truth1">ADHD is a neurobiological condition, not a choice or character flaw.</p>
</div>
</div>
</div>
<div class="flip-card w-full h-32">
<div class="flip-card-inner w-full h-full">
<div class="flip-card-front bg-white p-4 rounded-lg shadow-sm border border-gray-200 h-full flex items-center">
<p class="text-gray-700 font-medium" id="adhd-myth2">Only children have ADHD</p>
</div>
<div class="flip-card-back bg-blue-50 p-4 rounded-lg shadow-sm border border-blue-200 h-full flex items-center">
<p class="text-blue-800" id="adhd-truth2">ADHD often persists into adulthood, though symptoms may change.</p>
</div>
</div>
</div>
</div>
</div>
<div class="bg-yellow-50 rounded-lg p-4 border border-yellow-100">
<h3 class="text-lg font-semibold mb-2 text-yellow-800" id="adhd-resources-title">Resources</h3>
<div class="space-y-2">
<a href="#" class="flex items-center text-yellow-900 hover:text-yellow-700">
<i class="fas fa-book mr-2"></i>
<span id="adhd-resource1">ADHD Self-Assessment Tool</span>
</a>
<a href="#" class="flex items-center text-yellow-900 hover:text-yellow-700">
<i class="fas fa-video mr-2"></i>
<span id="adhd-resource2">Expert Talks on ADHD</span>
</a>
<a href="#" class="flex items-center text-yellow-900 hover:text-yellow-700">
<i class="fas fa-users mr-2"></i>
<span id="adhd-resource3">Support Groups Near You</span>
</a>
</div>
</div>
</div>
<!-- OCD Content (Hidden by default) -->
<div id="ocd-content" class="disorder-content hidden">
<div class="bg-purple-50 rounded-lg p-4 mb-4 border border-purple-100">
<h2 class="text-lg font-semibold text-purple-800 mb-2" id="ocd-definition-title">What is OCD?</h2>
<p class="text-purple-900" id="ocd-definition">OCD (Obsessive-Compulsive Disorder) is a mental health disorder characterized by unwanted recurring thoughts (obsessions) and repetitive behaviors (compulsions) that the person feels driven to perform.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100 card-hover transition-all duration-200">
<h3 class="font-medium text-gray-800 mb-2 flex items-center">
<i class="fas fa-exclamation-circle text-red-500 mr-2"></i>
<span id="ocd-symptoms-title">Symptoms</span>
</h3>
<ul class="text-sm text-gray-600 list-disc pl-5 space-y-1" id="ocd-symptoms">
<li>Intrusive, unwanted thoughts</li>
<li>Excessive cleaning or hand-washing</li>
<li>Checking things repeatedly</li>
<li>Counting or repeating words silently</li>
<li>Need for symmetry or exactness</li>
</ul>
</div>
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100 card-hover transition-all duration-200">
<h3 class="font-medium text-gray-800 mb-2 flex items-center">
<i class="fas fa-lightbulb text-purple-500 mr-2"></i>
<span id="ocd-management-title">Management</span>
</h3>
<ul class="text-sm text-gray-600 list-disc pl-5 space-y-1" id="ocd-management">
<li>Cognitive Behavioral Therapy (CBT)</li>
<li>Exposure and Response Prevention (ERP)</li>
<li>Medication (SSRIs)</li>
<li>Mindfulness and relaxation techniques</li>
<li>Support groups</li>
</ul>
</div>
</div>
<div class="mb-6">
<h3 class="text-lg font-semibold mb-3 text-gray-800" id="ocd-myths-title">Common Myths</h3>
<div class="space-y-3">
<div class="flip-card w-full h-32">
<div class="flip-card-inner w-full h-full">
<div class="flip-card-front bg-white p-4 rounded-lg shadow-sm border border-gray-200 h-full flex items-center">
<p class="text-gray-700 font-medium" id="ocd-myth1">OCD is just about being neat</p>
</div>
<div class="flip-card-back bg-purple-50 p-4 rounded-lg shadow-sm border border-purple-200 h-full flex items-center">
<p class="text-purple-800" id="ocd-truth1">OCD involves distressing obsessions and compulsions that go beyond preference for cleanliness.</p>
</div>
</div>
</div>
<div class="flip-card w-full h-32">
<div class="flip-card-inner w-full h-full">
<div class="flip-card-front bg-white p-4 rounded-lg shadow-sm border border-gray-200 h-full flex items-center">
<p class="text-gray-700 font-medium" id="ocd-myth2">People with OCD can stop if they want</p>
</div>
<div class="flip-card-back bg-purple-50 p-4 rounded-lg shadow-sm border border-purple-200 h-full flex items-center">
<p class="text-purple-800" id="ocd-truth2">OCD is a mental health disorder that requires professional treatment, not just willpower.</p>
</div>
</div>
</div>
</div>
</div>
<div class="bg-purple-50 rounded-lg p-4 border border-purple-100">
<h3 class="text-lg font-semibold mb-2 text-purple-800" id="ocd-resources-title">Resources</h3>
<div class="space-y-2">
<a href="#" class="flex items-center text-purple-900 hover:text-purple-700">
<i class="fas fa-book mr-2"></i>
<span id="ocd-resource1">OCD Self-Assessment Tool</span>
</a>
<a href="#" class="flex items-center text-purple-900 hover:text-purple-700">
<i class="fas fa-video mr-2"></i>
<span id="ocd-resource2">Expert Talks on OCD</span>
</a>
<a href="#" class="flex items-center text-purple-900 hover:text-purple-700">
<i class="fas fa-users mr-2"></i>
<span id="ocd-resource3">Support Groups Near You</span>
</a>
</div>
</div>
</div>
<!-- Tics Content (Hidden by default) -->
<div id="tics-content" class="disorder-content hidden">
<div class="bg-green-50 rounded-lg p-4 mb-4 border border-green-100">
<h2 class="text-lg font-semibold text-green-800 mb-2" id="tics-definition-title">What are Tic Disorders?</h2>
<p class="text-green-900" id="tics-definition">Tic disorders involve sudden, rapid, recurrent, non-rhythmic motor movements or vocalizations. Tourette Syndrome is the most well-known tic disorder, involving both motor and vocal tics.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100 card-hover transition-all duration-200">
<h3 class="font-medium text-gray-800 mb-2 flex items-center">
<i class="fas fa-exclamation-circle text-red-500 mr-2"></i>
<span id="tics-symptoms-title">Symptoms</span>
</h3>
<ul class="text-sm text-gray-600 list-disc pl-5 space-y-1" id="tics-symptoms">
<li>Simple motor tics (eye blinking, head jerking)</li>
<li>Complex motor tics (jumping, touching objects)</li>
<li>Simple vocal tics (throat clearing, sniffing)</li>
<li>Complex vocal tics (words or phrases)</li>
<li>Tics that change over time</li>
</ul>
</div>
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100 card-hover transition-all duration-200">
<h3 class="font-medium text-gray-800 mb-2 flex items-center">
<i class="fas fa-lightbulb text-green-500 mr-2"></i>
<span id="tics-management-title">Management</span>
</h3>
<ul class="text-sm text-gray-600 list-disc pl-5 space-y-1" id="tics-management">
<li>Comprehensive Behavioral Intervention for Tics (CBIT)</li>
<li>Medication in some cases</li>
<li>Stress management techniques</li>
<li>Education and awareness</li>
<li>Support groups</li>
</ul>
</div>
</div>
<div class="mb-6">
<h3 class="text-lg font-semibold mb-3 text-gray-800" id="tics-myths-title">Common Myths</h3>
<div class="space-y-3">
<div class="flip-card w-full h-32">
<div class="flip-card-inner w-full h-full">
<div class="flip-card-front bg-white p-4 rounded-lg shadow-sm border border-gray-200 h-full flex items-center">
<p class="text-gray-700 font-medium" id="tics-myth1">Tics are always swearing</p>
</div>
<div class="flip-card-back bg-green-50 p-4 rounded-lg shadow-sm border border-green-200 h-full flex items-center">
<p class="text-green-800" id="tics-truth1">Coprolalia (involuntary swearing) affects only about 10% of people with Tourette's.</p>
</div>
</div>
</div>
<div class="flip-card w-full h-32">
<div class="flip-card-inner w-full h-full">
<div class="flip-card-front bg-white p-4 rounded-lg shadow-sm border border-gray-200 h-full flex items-center">
<p class="text-gray-700 font-medium" id="tics-myth2">People can control tics if they try</p>
</div>
<div class="flip-card-back bg-green-50 p-4 rounded-lg shadow-sm border border-green-200 h-full flex items-center">
<p class="text-green-800" id="tics-truth2">Tics are involuntary, though some people can suppress them temporarily with effort.</p>
</div>
</div>
</div>
</div>
</div>
<div class="bg-green-50 rounded-lg p-4 border border-green-100">
<h3 class="text-lg font-semibold mb-2 text-green-800" id="tics-resources-title">Resources</h3>
<div class="space-y-2">
<a href="#" class="flex items-center text-green-900 hover:text-green-700">
<i class="fas fa-book mr-2"></i>
<span id="tics-resource1">Tic Disorders Guide</span>
</a>
<a href="#" class="flex items-center text-green-900 hover:text-green-700">
<i class="fas fa-video mr-2"></i>
<span id="tics-resource2">Living with Tics: Personal Stories</span>
</a>
<a href="#" class="flex items-center text-green-900 hover:text-green-700">
<i class="fas fa-users mr-2"></i>
<span id="tics-resource3">Support Groups Near You</span>
</a>
</div>
</div>
</div>
</div>
</main>
<!-- Bottom Navigation -->
<nav class="fixed bottom-0 left-0 right-0 bg-white shadow-lg border-t border-gray-200 max-w-md mx-auto">
<div class="flex justify-around">
<a href="#" class="p-3 text-blue-500 flex flex-col items-center">
<i class="fas fa-home text-lg"></i>
<span class="text-xs mt-1" id="nav-home">Home</span>
</a>
<a href="#" class="p-3 text-gray-500 flex flex-col items-center">
<i class="fas fa-book text-lg"></i>
<span class="text-xs mt-1" id="nav-resources">Resources</span>
</a>
<a href="#" class="p-3 text-gray-500 flex flex-col items-center">
<i class="fas fa-question-circle text-lg"></i>
<span class="text-xs mt-1" id="nav-faq">FAQ</span>
</a>
<a href="#" class="p-3 text-gray-500 flex flex-col items-center">
<i class="fas fa-user text-lg"></i>
<span class="text-xs mt-1" id="nav-profile">Profile</span>
</a>
</div>
</nav>
</div>
<script>
// Language toggle functionality
const langToggle = document.getElementById('lang-toggle');
const currentLang = document.getElementById('current-lang');
const appTitle = document.getElementById('app-title');
const appSubtitle = document.getElementById('app-subtitle');
const body = document.body;
// Disorder tabs
const disorderTabs = document.querySelectorAll('.disorder-tab');
const disorderContents = document.querySelectorAll('.disorder-content');
// English content
const englishContent = {
appTitle: "NeuroMind",
appSubtitle: "Understanding Neurodiversity",
adhdTab: "ADHD",
ocdTab: "OCD",
ticsTab: "Tics",
adhdDefinitionTitle: "What is ADHD?",
adhdDefinition: "ADHD (Attention-Deficit/Hyperactivity Disorder) is a neurodevelopmental disorder characterized by inattention, hyperactivity, and impulsivity that interferes with functioning or development.",
adhdSymptomsTitle: "Symptoms",
adhdSymptoms: [
"Difficulty sustaining attention",
"Excessive fidgeting or restlessness",
"Impulsive decision-making",
"Forgetfulness in daily activities",
"Difficulty organizing tasks"
],
adhdManagementTitle: "Management",
adhdManagement: [
"Behavioral therapy",
"Medication (stimulants/non-stimulants)",
"Organizational strategies",
"Regular exercise",
"Mindfulness techniques"
],
adhdMythsTitle: "Common Myths",
adhdMyth1: "ADHD is just laziness",
adhdTruth1: "ADHD is a neurobiological condition, not a choice or character flaw.",
adhdMyth2: "Only children have ADHD",
adhdTruth2: "ADHD often persists into adulthood, though symptoms may change.",
adhdResourcesTitle: "Resources",
adhdResource1: "ADHD Self-Assessment Tool",
adhdResource2: "Expert Talks on ADHD",
adhdResource3: "Support Groups Near You",
ocdDefinitionTitle: "What is OCD?",
ocdDefinition: "OCD (Obsessive-Compulsive Disorder) is a mental health disorder characterized by unwanted recurring thoughts (obsessions) and repetitive behaviors (compulsions) that the person feels driven to perform.",
ocdSymptomsTitle: "Symptoms",
ocdSymptoms: [
"Intrusive, unwanted thoughts",
"Excessive cleaning or hand-washing",
"Checking things repeatedly",
"Counting or repeating words silently",
"Need for symmetry or exactness"
],
ocdManagementTitle: "Management",
ocdManagement: [
"Cognitive Behavioral Therapy (CBT)",
"Exposure and Response Prevention (ERP)",
"Medication (SSRIs)",
"Mindfulness and relaxation techniques",
"Support groups"
],
ocdMythsTitle: "Common Myths",
ocdMyth1: "OCD is just about being neat",
ocdTruth1: "OCD involves distressing obsessions and compulsions that go beyond preference for cleanliness.",
ocdMyth2: "People with OCD can stop if they want",
ocdTruth2: "OCD is a mental health disorder that requires professional treatment, not just willpower.",
ocdResourcesTitle: "Resources",
ocdResource1: "OCD Self-Assessment Tool",
ocdResource2: "Expert Talks on OCD",
ocdResource3: "Support Groups Near You",
ticsDefinitionTitle: "What are Tic Disorders?",
ticsDefinition: "Tic disorders involve sudden, rapid, recurrent, non-rhythmic motor movements or vocalizations. Tourette Syndrome is the most well-known tic disorder, involving both motor and vocal tics.",
ticsSymptomsTitle: "Symptoms",
ticsSymptoms: [
"Simple motor tics (eye blinking, head jerking)",
"Complex motor tics (jumping, touching objects)",
"Simple vocal tics (throat clearing, sniffing)",
"Complex vocal tics (words or phrases)",
"Tics that change over time"
],
ticsManagementTitle: "Management",
ticsManagement: [
"Comprehensive Behavioral Intervention for Tics (CBIT)",
"Medication in some cases",
"Stress management techniques",
"Education and awareness",
"Support groups"
],
ticsMythsTitle: "Common Myths",
ticsMyth1: "Tics are always swearing",
ticsTruth1: "Coprolalia (involuntary swearing) affects only about 10% of people with Tourette's.",
ticsMyth2: "People can control tics if they try",
ticsTruth2: "Tics are involuntary, though some people can suppress them temporarily with effort.",
ticsResourcesTitle: "Resources",
ticsResource1: "Tic Disorders Guide",
ticsResource2: "Living with Tics: Personal Stories",
ticsResource3: "Support Groups Near You",
navHome: "Home",
navResources: "Resources",
navFaq: "FAQ",
navProfile: "Profile"
};
// Arabic content
const arabicContent = {
appTitle: "نيورومايند",
appSubtitle: "فهم التنوع العصبي",
adhdTab: "اضطراب فرط الحركة ونقص الانتباه",
ocdTab: "الوسواس القهري",
ticsTab: "العرات",
adhdDefinitionTitle: "ما هو اضطراب فرط الحركة ونقص الانتباه؟",
adhdDefinition: "اضطراب فرط الحركة ونقص الانتباه هو اضطراب في النمو العصبي يتميز بعدم الانتباه وفرط الحركة والاندفاع الذي يتعارض مع الأداء أو النمو.",
adhdSymptomsTitle: "الأعراض",
adhdSymptoms: [
"صعوبة في الحفاظ على الانتباه",
"التململ المفرط أو عدم القدرة على الجلوس",
"اتخاذ قرارات متهورة",
"النسيان في الأنشطة اليومية",
"صعوبة في تنظيم المهام"
],
adhdManagementTitle: "الإدارة",
adhdManagement: [
"العلاج السلوكي",
"الأدوية (منبهات/غير منبهات)",
"استراتيجيات تنظيمية",
"ممارسة الرياضة بانتظام",
"تقنيات اليقظة"
],
adhdMythsTitle: "أساطير شائعة",
adhdMyth1: "اضطراب فرط الحركة ونقص الانتباه هو مجرد كسل",
adhdTruth1: "اضطراب فرط الحركة ونقص الانتباه هو حالة عصبية بيولوجية، وليس خيارًا أو عيبًا في الشخصية.",
adhdMyth2: "الأطفال فقط هم من يعانون من اضطراب فرط الحركة ونقص الانتباه",
adhdTruth2: "غالبًا ما يستمر اضطراب فرط الحركة ونقص الانتباه حتى مرحلة البلوغ، على الرغم من أن الأعراض قد تتغير.",
adhdResourcesTitle: "الموارد",
adhdResource1: "أداة التقييم الذاتي لاضطراب فرط الحركة ونقص الانتباه",
adhdResource2: "محاضرات الخبراء حول اضطراب فرط الحركة ونقص الانتباه",
adhdResource3: "مجموعات الدعم بالقرب منك",
ocdDefinitionTitle: "ما هو الوسواس القهري؟",
ocdDefinition: "الوسواس القهري هو اضطراب في الصحة العقلية يتميز بالأفكار المتكررة غير المرغوب فيها (الهواجس) والسلوكيات المتكررة (الطقوس) التي يشعر الشخص بأنه مضطر لأدائها.",
ocdSymptomsTitle: "الأعراض",
ocdSymptoms: [
"أفكار متطفلة وغير مرغوب فيها",
"التنظيف المفرط أو غسل اليدين",
"التفقد المتكرر للأشياء",
"العد أو تكرار الكلمات بصمت",
"الحاجة إلى التناظر أو الدقة"
],
ocdManagementTitle: "الإدارة",
ocdManagement: [
"العلاج السلوكي المعرفي (CBT)",
"الوقاية من التعرض والاستجابة (ERP)",
"الأدوية (مثبطات استرداد السيروتونين الانتقائية)",
"تقنيات اليقظة والاسترخاء",
"مجموعات الدعم"
],
ocdMythsTitle: "أساطير شائعة",
ocdMyth1: "الوسواس القهري هو مجرد الرغبة في النظافة",
ocdTruth1: "الوسواس القهري يتضمن هواجس وطقوس مزعجة تتجاوز مجرد تفضيل النظافة.",
ocdMyth2: "يمكن للأشخاص المصابين بالوسواس القهري التوقف إذا أرادوا",
ocdTruth2: "الوسواس القهري هو اضطراب في الصحة العقلية يتطلب علاجًا احترافيًا، وليس مجرد قوة إرادة.",
ocdResourcesTitle: "الموارد",
ocdResource1: "أداة التقييم الذاتي للوسواس القهري",
ocdResource2: "محاضرات الخبراء حول الوسواس القهري",
ocdResource3: "مجموعات الدعم بالقرب منك",
ticsDefinitionTitle: "ما هي اضطرابات العرات؟",
ticsDefinition: "تشمل اضطرابات العرات حركات أو أصوات مفاجئة وسريعة ومتكررة وغير إيقاعية. متلازمة توريت هي أشهر اضطرابات العرات، وتشمل كلاً من العرات الحركية والصوتية.",
ticsSymptomsTitle: "الأعراض",
ticsSymptoms: [
"عرات حركية بسيطة (طرف العين، هز الرأس)",
"عرات حركية معقدة (القفز، لمس الأشياء)",
"عرات صوتية بسيطة (تنظيف الحلق، الشم)",
"عرات صوتية معقدة (كلمات أو عبارات)",
"عرات تتغير مع الوقت"
],
ticsManagementTitle: "الإدارة",
ticsManagement: [
"التدخل السلوكي الشامل للعرات (CBIT)",
"الأدوية في بعض الحالات",
"تقنيات إدارة الإجهاد",
"التوعية والتعليم",
"مجموعات الدعم"
],
ticsMythsTitle: "أساطير شائعة",
ticsMyth1: "العرات دائمًا تتضمن الشتائم",
ticsTruth1: "الكوبرولاليا (الشتائم اللاإرادية) تصيب حوالي 10% فقط من المصابين بمتلازمة توريت.",
ticsMyth2: "يمكن للأشخاص التحكم في العرات إذا حاولوا",
ticsTruth2: "العرات لا إرادية، على الرغم من أن بعض الأشخاص يمكنهم كبحها مؤقتًا بجهد.",
ticsResourcesTitle: "الموارد",
ticsResource1: "دليل اضطرابات العرات",
ticsResource2: "العيش مع العرات: قصص شخصية",
ticsResource3: "مجموعات الدعم بالقرب منك",
navHome: "الرئيسية",
navResources: "الموارد",
navFaq: "الأسئلة الشائعة",
navProfile: "الملف الشخصي"
};
let isEnglish = true;
// Function to update content based on language
function updateContent(lang) {
const content = lang === 'en' ? englishContent : arabicContent;
// Update app header
appTitle.textContent = content.appTitle;
appSubtitle.textContent = content.appSubtitle;
currentLang.textContent = lang === 'en' ? 'EN' : 'AR';
// Update direction
body.className = lang === 'en' ? 'ltr' : 'rtl';
// Update disorder tabs
document.getElementById('adhd-tab').textContent = content.adhdTab;
document.getElementById('ocd-tab').textContent = content.ocdTab;
document.getElementById('tics-tab').textContent = content.ticsTab;
// Update ADHD content
document.getElementById('adhd-definition-title').textContent = content.adhdDefinitionTitle;
document.getElementById('adhd-definition').textContent = content.adhdDefinition;
document.getElementById('adhd-symptoms-title').textContent = content.adhdSymptomsTitle;
document.getElementById('adhd-management-title').textContent = content.adhdManagementTitle;
document.getElementById('adhd-myths-title').textContent = content.adhdMythsTitle;
document.getElementById('adhd-myth1').textContent = content.adhdMyth1;
document.getElementById('adhd-truth1').textContent = content.adhdTruth1;
document.getElementById('adhd-myth2').textContent = content.adhdMyth2;
document.getElementById('adhd-truth2').textContent = content.adhdTruth2;
document.getElementById('adhd-resources-title').textContent = content.adhdResourcesTitle;
document.getElementById('adhd-resource1').textContent = content.adhdResource1;
document.getElementById('adhd-resource2').textContent = content.adhdResource2;
document.getElementById('adhd-resource3').textContent = content.adhdResource3;
// Update symptoms and management lists
const adhdSymptomsList = document.querySelectorAll('#adhd-symptoms li');
content.adhdSymptoms.forEach((item, index) => {
if (adhdSymptomsList[index]) adhdSymptomsList[index].textContent = item;
});
const adhdManagementList = document.querySelectorAll('#adhd-management li');
content.adhdManagement.forEach((item, index) => {
if (adhdManagementList[index]) adhdManagementList[index].textContent = item;
});
// Update OCD content
document.getElementById('ocd-definition-title').textContent = content.ocdDefinitionTitle;
document.getElementById('ocd-definition').textContent = content.ocdDefinition;
document.getElementById('ocd-symptoms-title').textContent = content.ocdSymptomsTitle;
document.getElementById('ocd-management-title').textContent = content.ocdManagementTitle;
document.getElementById('ocd-myths-title').textContent = content.ocdMythsTitle;
document.getElementById('ocd-myth1').textContent = content.ocdMyth1;
document.getElementById('ocd-truth1').textContent = content.ocdTruth1;
document.getElementById('ocd-myth2').textContent = content.ocdMyth2;
document.getElementById('ocd-truth2').textContent = content.ocdTruth2;
document.getElementById('ocd-resources-title').textContent = content.ocdResourcesTitle;
document.getElementById('ocd-resource1').textContent = content.ocdResource1;
document.getElementById('ocd-resource2').textContent = content.ocdResource2;
document.getElementById('ocd-resource3').textContent = content.ocdResource3;
const ocdSymptomsList = document.querySelectorAll('#ocd-symptoms li');
content.ocdSymptoms.forEach((item, index) => {
if (ocdSymptomsList[index]) ocdSymptomsList[index].textContent = item;
});
const ocdManagementList = document.querySelectorAll('#ocd-management li');
content.ocdManagement.forEach((item, index) => {
if (ocdManagementList[index]) ocdManagementList[index].textContent = item;
});
// Update Tics content
document.getElementById('tics-definition-title').textContent = content.ticsDefinitionTitle;
document.getElementById('tics-definition').textContent = content.ticsDefinition;
document.getElementById('tics-symptoms-title').textContent = content.ticsSymptomsTitle;
document.getElementById('tics-management-title').textContent = content.ticsManagementTitle;
document.getElementById('tics-myths-title').textContent = content.ticsMythsTitle;
document.getElementById('tics-myth1').textContent = content.ticsMyth1;
document.getElementById('tics-truth1').textContent = content.ticsTruth1;
document.getElementById('tics-myth2').textContent = content.ticsMyth2;
document.getElementById('tics-truth2').textContent = content.ticsTruth2;
document.getElementById('tics-resources-title').textContent = content.ticsResourcesTitle;
document.getElementById('tics-resource1').textContent = content.ticsResource1;
document.getElementById('tics-resource2').textContent = content.ticsResource2;
document.getElementById('tics-resource3').textContent = content.ticsResource3;
const ticsSymptomsList = document.querySelectorAll('#tics-symptoms li');
content.ticsSymptoms.forEach((item, index) => {
if (ticsSymptomsList[index]) ticsSymptomsList[index].textContent = item;
});
const ticsManagementList = document.querySelectorAll('#tics-management li');
content.ticsManagement.forEach((item, index) => {
if (ticsManagementList[index]) ticsManagementList[index].textContent = item;
});
// Update navigation
document.getElementById('nav-home').textContent = content.navHome;
document.getElementById('nav-resources').textContent = content.navResources;
document.getElementById('nav-faq').textContent = content.navFaq;
document.getElementById('nav-profile').textContent = content.navProfile;
}
// Toggle language
langToggle.addEventListener('click', () => {
isEnglish = !isEnglish;
updateContent(isEnglish ? 'en' : 'ar');
});
// Tab switching functionality
disorderTabs.forEach(tab => {
tab.addEventListener('click', () => {
// Remove active class from all tabs
disorderTabs.forEach(t => t.classList.remove('tab-active'));
// Add active class to clicked tab
tab.classList.add('tab-active');
// Hide all content
disorderContents.forEach(content => content.classList.add('hidden'));
// Show selected content
const disorder = tab.getAttribute('data-disorder');
document.getElementById(`${disorder}-content`).classList.remove('hidden');
// Add slide-in animation
const contentArea = document.getElementById('content-area');
contentArea.classList.remove('slide-in');
void contentArea.offsetWidth; // Trigger reflow
contentArea.classList.add('slide-in');
});
});
// Initialize with English content
updateContent('en');
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=afarouk79/adhd-app" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>