abc / index.html
Abdu-GH's picture
Create a thought-provoking project idea that presents you with questions to determine your personality, strengths, weaknesses, and how to improve upon them. The project should offer the choice to answer in either Arabic or English and consist of 15 questions. The results should be displayed on the same page rather than in a PDF file, providing immediate feedback for self-reflection and personal development. The questions should delve into various aspects of the participant's life, such as their values, aspirations, decision-making process, problem-solving skills, emotional intelligence, and communication style. Each question should be designed to elicit introspection and self-awareness, guiding the individual towards a deeper understanding of themselves and actionable steps for growth and improvement. - Initial Deployment
7042638 verified
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Self-Discovery Journey | رحلة الاكتشاف الذاتي</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>
.fade-in {
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.rtl {
direction: rtl;
text-align: right;
}
.progress-bar {
transition: width 0.5s ease-in-out;
}
.flip-card {
perspective: 1000px;
}
.flip-card-inner {
transition: transform 0.6s;
transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
backface-visibility: hidden;
position: absolute;
width: 100%;
height: 100%;
}
.flip-card-back {
transform: rotateY(180deg);
}
</style>
</head>
<body class="bg-gradient-to-br from-indigo-50 to-blue-50 min-h-screen font-sans">
<div class="container mx-auto px-4 py-8 max-w-4xl">
<!-- Language Selection -->
<div id="language-selection" class="bg-white rounded-xl shadow-lg p-6 mb-8 text-center fade-in">
<h1 class="text-3xl font-bold text-indigo-700 mb-6">Self-Discovery Journey</h1>
<h2 class="text-xl text-gray-600 mb-8">Choose your preferred language / اختر لغتك المفضلة</h2>
<div class="flex flex-col sm:flex-row justify-center gap-4">
<button onclick="setLanguage('en')" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-6 rounded-lg transition flex items-center justify-center gap-2">
<i class="fas fa-language"></i> English
</button>
<button onclick="setLanguage('ar')" class="bg-emerald-600 hover:bg-emerald-700 text-white font-medium py-3 px-6 rounded-lg transition flex items-center justify-center gap-2">
<i class="fas fa-language"></i> العربية
</button>
</div>
</div>
<!-- Introduction (English) -->
<div id="intro-en" class="hidden bg-white rounded-xl shadow-lg p-6 mb-8 fade-in">
<h1 class="text-3xl font-bold text-indigo-700 mb-4">Self-Discovery Journey</h1>
<p class="text-gray-600 mb-4">Welcome to your personal growth assessment. This tool will help you gain deeper insights into your personality, strengths, and areas for improvement.</p>
<p class="text-gray-600 mb-6">You'll answer 15 thought-provoking questions designed to promote self-reflection. Be honest with yourself - this is for your personal development.</p>
<div class="flex justify-between items-center">
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="progress-bar bg-indigo-600 h-2.5 rounded-full" style="width: 0%"></div>
</div>
<span class="text-sm font-medium text-gray-500 ml-4">0/15</span>
</div>
<button onclick="startAssessment('en')" class="mt-6 bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-6 rounded-lg transition w-full sm:w-auto">
Begin Assessment <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
<!-- Introduction (Arabic) -->
<div id="intro-ar" class="hidden bg-white rounded-xl shadow-lg p-6 mb-8 rtl fade-in">
<h1 class="text-3xl font-bold text-emerald-700 mb-4">رحلة الاكتشاف الذاتي</h1>
<p class="text-gray-600 mb-4">مرحبًا بك في أداة التقييم الشخصي للنمو. ستساعدك هذه الأداة في الحصول على رؤى أعمق حول شخصيتك، نقاط قوتك، والمجالات التي تحتاج إلى تحسين.</p>
<p class="text-gray-600 mb-6">ستجيب على 15 سؤالًا محفزًا للتفكير مصممًا لتعزيز التأمل الذاتي. كن صادقًا مع نفسك - هذا من أجل تطورك الشخصي.</p>
<div class="flex justify-between items-center">
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="progress-bar bg-emerald-600 h-2.5 rounded-full" style="width: 0%"></div>
</div>
<span class="text-sm font-medium text-gray-500 ml-4">0/15</span>
</div>
<button onclick="startAssessment('ar')" class="mt-6 bg-emerald-600 hover:bg-emerald-700 text-white font-medium py-2 px-6 rounded-lg transition w-full sm:w-auto">
ابدأ التقييم <i class="fas fa-arrow-left ml-2"></i>
</button>
</div>
<!-- Assessment Questions -->
<div id="assessment-container" class="hidden">
<div id="question-container" class="bg-white rounded-xl shadow-lg p-6 mb-4 fade-in"></div>
<div class="flex justify-between items-center bg-white rounded-xl shadow-lg p-4">
<button id="prev-btn" class="bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-2 px-4 rounded-lg transition flex items-center gap-2">
<i class="fas fa-arrow-left"></i>
<span class="hidden sm:inline">Previous</span>
</button>
<div class="flex items-center gap-2">
<span id="progress-text" class="text-sm font-medium text-gray-500">0/15</span>
<div class="w-32 sm:w-64 bg-gray-200 rounded-full h-2.5">
<div id="progress-bar" class="progress-bar h-2.5 rounded-full" style="width: 0%"></div>
</div>
</div>
<button id="next-btn" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-lg transition flex items-center gap-2">
<span class="hidden sm:inline">Next</span>
<i class="fas fa-arrow-right"></i>
</button>
</div>
</div>
<!-- Results Section -->
<div id="results-container" class="hidden bg-white rounded-xl shadow-lg p-6 fade-in">
<div class="text-center mb-8">
<h1 id="results-title" class="text-3xl font-bold mb-2"></h1>
<p id="results-subtitle" class="text-gray-600"></p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-indigo-50 rounded-lg p-4">
<h3 class="font-semibold text-indigo-700 mb-2 flex items-center gap-2">
<i class="fas fa-star"></i>
<span id="strengths-title"></span>
</h3>
<ul id="strengths-list" class="list-disc pl-5 text-gray-700"></ul>
</div>
<div class="bg-amber-50 rounded-lg p-4">
<h3 class="font-semibold text-amber-700 mb-2 flex items-center gap-2">
<i class="fas fa-lightbulb"></i>
<span id="growth-title"></span>
</h3>
<ul id="growth-list" class="list-disc pl-5 text-gray-700"></ul>
</div>
<div class="bg-emerald-50 rounded-lg p-4">
<h3 class="font-semibold text-emerald-700 mb-2 flex items-center gap-2">
<i class="fas fa-bullseye"></i>
<span id="actions-title"></span>
</h3>
<ul id="actions-list" class="list-disc pl-5 text-gray-700"></ul>
</div>
</div>
<div class="flip-card w-full h-64 mb-6">
<div class="flip-card-inner w-full h-full">
<div class="flip-card-front bg-gradient-to-r from-indigo-500 to-purple-600 rounded-xl p-6 text-white flex flex-col justify-center items-center">
<h3 class="text-xl font-bold mb-2" id="quote-title">Your Personality Archetype</h3>
<p id="archetype" class="text-2xl font-bold mb-4"></p>
<p id="archetype-desc" class="text-center mb-6"></p>
<button onclick="flipCard()" class="bg-white text-indigo-600 font-medium py-2 px-4 rounded-lg transition">
<i class="fas fa-sync-alt mr-2"></i> <span id="flip-text">See Details</span>
</button>
</div>
<div class="flip-card-back bg-gradient-to-r from-emerald-500 to-teal-600 rounded-xl p-6 text-white flex flex-col justify-center items-center">
<h3 class="text-xl font-bold mb-4" id="details-title">Key Characteristics</h3>
<div id="archetype-details" class="text-center"></div>
<button onclick="flipCard()" class="mt-4 bg-white text-emerald-600 font-medium py-2 px-4 rounded-lg transition">
<i class="fas fa-sync-alt mr-2"></i> <span id="flip-back-text">Back</span>
</button>
</div>
</div>
</div>
<div class="flex flex-col sm:flex-row justify-center gap-4">
<button onclick="restartAssessment()" class="bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-2 px-6 rounded-lg transition flex items-center justify-center gap-2">
<i class="fas fa-redo"></i> <span id="restart-text">Start Over</span>
</button>
<button onclick="downloadResults()" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-6 rounded-lg transition flex items-center justify-center gap-2">
<i class="fas fa-download"></i> <span id="download-text">Download Summary</span>
</button>
</div>
</div>
</div>
<script>
// Language and content variables
let currentLanguage = '';
const questions = {
en: [
{
question: "When faced with a difficult decision, what influences you the most?",
options: [
"Logical analysis of pros and cons",
"How it aligns with my core values",
"How it will affect others emotionally",
"My intuition or gut feeling"
]
},
{
question: "How do you typically respond to stress or pressure?",
options: [
"I create a plan to address the situation systematically",
"I seek support from friends or family",
"I take time to reflect and understand my emotions",
"I look for creative solutions outside conventional methods"
]
},
{
question: "What best describes your approach to achieving goals?",
options: [
"I set clear, measurable objectives and track progress",
"I focus on personal growth and learning throughout the process",
"I adapt my approach based on changing circumstances",
"I'm motivated by helping others through my achievements"
]
},
{
question: "How do you handle criticism?",
options: [
"I analyze it for valid points to improve",
"I consider the source and their intentions",
"I reflect on how it makes me feel and why",
"I often take it personally at first, then process it later"
]
},
{
question: "What's most important to you in personal relationships?",
options: [
"Honesty and direct communication",
"Emotional connection and understanding",
"Shared values and mutual growth",
"Freedom to be myself without judgment"
]
},
{
question: "When learning something new, you prefer:",
options: [
"Structured lessons with clear objectives",
"Hands-on experience and experimentation",
"Understanding the broader context first",
"Connecting it to personal experiences or emotions"
]
},
{
question: "How do you contribute to group settings?",
options: [
"By organizing and providing structure",
"By encouraging and supporting others",
"By offering creative ideas and solutions",
"By analyzing problems and proposing logical solutions"
]
},
{
question: "What describes your relationship with time?",
options: [
"I'm punctual and like to plan my schedule",
"I focus on being present rather than strict schedules",
"I often lose track of time when engaged in something interesting",
"I struggle with time management but want to improve"
]
},
{
question: "When you experience failure, your first thought is typically:",
options: [
"What can I learn from this?",
"How can I do better next time?",
"Why does this always happen to me?",
"How can I prevent others from seeing my failure?"
]
},
{
question: "What energizes you the most?",
options: [
"Solving complex problems",
"Helping others grow or succeed",
"Creative expression or innovation",
"Deep conversations about meaningful topics"
]
},
{
question: "How do you make important life choices?",
options: [
"Research and careful consideration of facts",
"Discussion with trusted mentors or friends",
"Alignment with my long-term vision for myself",
"What feels right in my heart"
]
},
{
question: "What's your communication style?",
options: [
"Direct and to the point",
"Diplomatic and considerate of others' feelings",
"Expressive and animated",
"Thoughtful and measured"
]
},
{
question: "How do you recharge when feeling drained?",
options: [
"Alone time for reflection or hobbies",
"Quality time with close friends or family",
"Engaging in creative activities",
"Physical activity or being in nature"
]
},
{
question: "What's your attitude toward rules and traditions?",
options: [
"They exist for good reasons and should generally be followed",
"They should be questioned and adapted when necessary",
"They're important for maintaining social harmony",
"They're guidelines but personal judgment matters more"
]
},
{
question: "What legacy do you most want to leave?",
options: [
"Tangible achievements that improved systems or processes",
"Positive impact on individuals' lives",
"Creative works that inspire others",
"A life lived authentically according to my values"
]
}
],
ar: [
{
question: "عند مواجهة قرار صعب، ما الذي يؤثر عليك أكثر؟",
options: [
"التحليل المنطقي للإيجابيات والسلبيات",
"كيف يتوافق مع قيمي الأساسية",
"كيف سيؤثر على الآخرين عاطفياً",
"حدسي أو شعوري الداخلي"
]
},
{
question: "كيف تتعامل عادة مع التوتر أو الضغط؟",
options: [
"أضع خطة لمعالجة الموقف بشكل منهجي",
"أبحث عن الدعم من الأصدقاء أو العائلة",
"آخذ وقتًا للتفكير وفهم مشاعري",
"أبحث عن حلول إبداعية خارج الطرق التقليدية"
]
},
{
question: "ما الذي يصف أفضل نهجك لتحقيق الأهداف؟",
options: [
"أضع أهدافًا واضحة وقابلة للقياس وأتابع التقدم",
"أركز على النمو الشخصي والتعلم خلال العملية",
"أعدل نهجي بناءً على الظروف المتغيرة",
"أتحفز من خلال مساعدة الآخرين بإنجازاتي"
]
},
{
question: "كيف تتعامل مع النقد؟",
options: [
"أحلله للعثور على نقاط صحيحة للتحسين",
"أعتبر المصدر ونواياهم",
"أفكر في كيف يجعلني أشعر ولماذا",
"غالبًا ما آخذه بشكل شخصي في البداية، ثم أعالجه لاحقًا"
]
},
{
question: "ما هو الأكثر أهمية بالنسبة لك في العلاقات الشخصية؟",
options: [
"الصراحة والتواصل المباشر",
"الارتباط العاطفي والتفاهم",
"القيم المشتركة والنمو المتبادل",
"الحرية في أن أكون نفسي دون حكم"
]
},
{
question: "عند تعلم شيء جديد، تفضل:",
options: [
"دروس منظمة بأهداف واضحة",
"التجربة العملية والتجريب",
"فهم السياق الأوسع أولاً",
"ربطه بالتجارب الشخصية أو المشاعر"
]
},
{
question: "كيف تساهم في الإعدادات الجماعية؟",
options: [
"عن طريق التنظيم وتوفير الهيكل",
"عن طريق التشجيع ودعم الآخرين",
"عن طريق تقديم أفكار وحلول إبداعية",
"عن طريق تحليل المشكلات واقتراح حلول منطقية"
]
},
{
question: "ما الذي يصف علاقتك مع الوقت؟",
options: [
"أكون دقيقًا وأحب التخطيط لجدولي",
"أركز على الحاضر بدلاً من الجداول الصارمة",
"غالبًا ما أفقد مسار الوقت عندما أكون منخرطًا في شيء مثير للاهتمام",
"أعاني من إدارة الوقت ولكنني أرغب في التحسين"
]
},
{
question: "عندما تواجه الفشل، فكرتك الأولى عادة ما تكون:",
options: [
"ماذا يمكنني أن أتعلم من هذا؟",
"كيف يمكنني أن أفعل أفضل في المرة القادمة؟",
"لماذا يحدث هذا لي دائمًا؟",
"كيف يمكنني منع الآخرين من رؤية فشلي؟"
]
},
{
question: "ما الذي يمنحك الطاقة أكثر؟",
options: [
"حل المشكلات المعقدة",
"مساعدة الآخرين على النجاح أو النمو",
"التعبير الإبداعي أو الابتكار",
"المحادثات العميقة حول مواضيع ذات معنى"
]
},
{
question: "كيف تتخذ خيارات الحياة المهمة؟",
options: [
"البحث والنظر الدقيق في الحقائق",
"المناقشة مع مرشدين أو أصدقاء موثوق بهم",
"التوافق مع رؤيتي طويلة المدى لنفسي",
"ما يشعر بأنه صحيح في قلبي"
]
},
{
question: "ما هو أسلوبك في التواصل؟",
options: [
"مباشر وإلى النقطة",
"دبلوماسي ومراعي لمشاعر الآخرين",
"معبر ومتحمس",
"مدروس ومقنن"
]
},
{
question: "كيف تستعيد طاقتك عندما تشعر بالإرهاق؟",
options: [
"وقت بمفردي للتفكير أو الهوايات",
"وقت مميز مع أصدقاء مقربين أو عائلة",
"الانخراط في أنشطة إبداعية",
"النشاط البدني أو التواجد في الطبيعة"
]
},
{
question: "ما هو موقفك تجاه القواعد والتقاليد؟",
options: [
"موجودة لأسباب جيدة ويجب اتباعها بشكل عام",
"يجب التشكيك فيها وتكييفها عند الضرورة",
"مهمة للحفاظ على الانسجام الاجتماعي",
"إرشادات ولكن الحكم الشخصي أكثر أهمية"
]
},
{
question: "ما هو الإرث الذي تريد تركه أكثر؟",
options: [
"إنجازات ملموسة حسنت الأنظمة أو العمليات",
"تأثير إيجابي على حياة الأفراد",
"أعمال إبداعية تلهم الآخرين",
"حياة عشتها بصدق وفقًا لقيمي"
]
}
]
};
const archetypes = {
en: [
{
name: "The Analyst",
description: "You thrive on logic, systems, and objective analysis. Your strength lies in your ability to dissect complex problems and find efficient solutions.",
strengths: [
"Exceptional problem-solving skills",
"Strong analytical thinking",
"Attention to detail",
"Objective decision-making"
],
growth: [
"Can sometimes overlook emotional aspects",
"May struggle with ambiguity",
"Tendency to overanalyze",
"Can be perceived as overly critical"
],
actions: [
"Practice incorporating emotional intelligence into decisions",
"Allow space for creative, non-linear thinking",
"Develop patience with less systematic approaches",
"Balance analysis with action"
],
details: "Analysts are the architects of progress. You see the world as a series of systems to be understood and optimized. Your challenge is to balance your natural inclination for analysis with the human elements that make systems meaningful."
},
{
name: "The Empath",
description: "You're deeply attuned to emotions - both your own and others'. Your strength lies in your ability to connect, understand, and nurture relationships.",
strengths: [
"High emotional intelligence",
"Strong interpersonal skills",
"Ability to mediate conflicts",
"Natural caretaker"
],
growth: [
"May neglect your own needs",
"Can take on others' emotional burdens",
"Sometimes avoid difficult truths",
"May struggle with boundaries"
],
actions: [
"Practice setting healthy boundaries",
"Develop objective decision-making skills",
"Learn to separate others' emotions from your own",
"Balance giving with self-care"
],
details: "Empaths are the heart of human connection. You feel deeply and create spaces where others feel understood. Your challenge is to maintain your compassionate nature while protecting your own emotional well-being."
},
{
name: "The Visionary",
description: "You see possibilities where others see limitations. Your strength lies in your creativity, innovation, and ability to think outside conventional frameworks.",
strengths: [
"Creative problem-solving",
"Big-picture thinking",
"Adaptability to change",
"Inspirational leadership"
],
growth: [
"Can struggle with implementation",
"May overlook practical details",
"Sometimes inconsistent focus",
"Can be impatient with routine"
],
actions: [
"Develop systems to bring ideas to fruition",
"Balance innovation with practical application",
"Practice sustained focus on key projects",
"Find value in routine processes"
],
details: "Visionaries are the catalysts of change. You imagine futures others can't see and inspire people to create them. Your challenge is to ground your visionary ideas in practical steps that make them achievable."
},
{
name: "The Pragmatist",
description: "You're grounded, practical, and results-oriented. Your strength lies in your ability to get things done efficiently and effectively.",
strengths: [
"Strong organizational skills",
"Reliable and consistent",
"Good at prioritizing",
"Practical problem-solving"
],
growth: [
"Can resist unconventional approaches",
"May undervalue theoretical thinking",
"Sometimes inflexible",
"Can overlook long-term implications"
],
actions: [
"Remain open to innovative solutions",
"Balance short-term results with long-term vision",
"Develop more flexibility in approaches",
"Appreciate the value of abstract thinking"
],
details: "Pragmatists are the engines of execution. You turn plans into reality through focused effort and practical know-how. Your challenge is to maintain your get-it-done attitude while remaining open to unconventional paths to success."
}
],
ar: [
{
name: "المحلل",
description: "تزدهر على المنطق والأنظمة والتحليل الموضوعي. تكمن قوتك في قدرتك على تشريح المشكلات المعقدة وإيجاد حلول فعالة.",
strengths: [
"مهارات استثنائية في حل المشكلات",
"تفكير تحليلي قوي",
"الانتباه إلى التفاصيل",
"اتخاذ قرارات موضوعية"
],
growth: [
"يمكن أحيانًا التغاضي عن الجوانب العاطفية",
"قد تواجه صعوبة مع الغموض",
"الميل إلى المبالغة في التحليل",
"يمكن أن يُنظر إليك على أنك شديد الانتقاد"
],
actions: [
"ممارسة دمج الذكاء العاطفي في القرارات",
"اسمح بمساحة للتفكير الإبداعي غير الخطي",
"طور الصبر مع الأساليب الأقل منهجية",
"وازن بين التحليل والعمل"
],
details: "المحللون هم مهندسو التقدم. ترى العالم كسلسلة من الأنظمة التي يجب فهمها وتحسينها. يكمن تحديك في موازنة ميلك الطبيعي للتحليل مع العناصر البشرية التي تجعل الأنظمة ذات معنى."
},
{
name: "المتعاطف",
description: "أنت متناغم بعمق مع المشاعر - سواء مشاعرك أو مشاعر الآخرين. تكمن قوتك في قدرتك على التواصل والفهم ورعاية العلاقات.",
strengths: [
"ذكاء عاطفي عالٍ",
"مهارات تواصل قوية",
"القدرة على التوسط في النزاعات",
"رعاية طبيعية للآخرين"
],
growth: [
"قد تهمل احتياجاتك الخاصة",
"يمكن أن تتحمل أعباء الآخرين العاطفية",
"أحيانًا تتجنب الحقائق الصعبة",
"قد تواجه صعوبة في وضع الحدود"
],
actions: [
"ممارسة وضع حدود صحية",
"تطوير مهارات اتخاذ القرار الموضوعي",
"تعلم فصل مشاعر الآخرين عن مشاعرك الخاصة",
"وازن بين العطاء ورعاية الذات"
],
details: "المتعاطفون هم قلب الاتصال الإنساني. تشعر بعمق وتخلق مساحات يشعر فيها الآخرون بالفهم. يكمن تحديك في الحفاظ على طبيعتك الرحيمة مع حماية رفاهيتك العاطفية."
},
{
name: "المبصر",
description: "ترى الاحتمالات حيث يرى الآخرون القيود. تكمن قوتك في إبداعك وابتكارك وقدرتك على التفكير خارج الأطر التقليدية.",
strengths: [
"حل المشكلات الإبداعي",
"التفكير الشمولي",
"القدرة على التكيف مع التغيير",
"القيادة الملهمة"
],
growth: [
"يمكن أن تواجه صعوبة في التنفيذ",
"قد تتغاضى عن التفاصيل العملية",
"أحيانًا تركيز غير متسق",
"يمكن أن تكون غير صبور مع الروتين"
],
actions: [
"تطوير أنظمة لتحقيق الأفكار",
"وازن بين الابتكار والتطبيق العملي",
"ممارسة التركيز المستمر على المشاريع الرئيسية",
"ابحث عن القيمة في العمليات الروتينية"
],
details: "المبصرون هم محفزات التغيير. تتخيل مستقبلاً لا يستطيع الآخرون رؤيته وتلهم الناس لإنشائه. يكمن تحديك في تأسيس أفكارك المبكرة في خطوات عملية تجعلها قابلة للتحقيق."
},
{
name: "العملي",
description: "أنت واقعي وعملي وموجه نحو النتائج. تكمن قوتك في قدرتك على إنجاز الأمور بكفاءة وفعالية.",
strengths: [
"مهارات تنظيمية قوية",
"موثوق ومتسق",
"جيد في تحديد الأولويات",
"حل المشكلات العملية"
],
growth: [
"يمكن أن تقاوم الأساليب غير التقليدية",
"قد تقلل من قيمة التفكير النظري",
"أحيانًا غير مرن",
"يمكن أن تتغاضى عن الآثار طويلة المدى"
],
actions: [
"كن منفتحًا على الحلول المبتكرة",
"وازن بين النتائج قصيرة المدى والرؤية طويلة المدى",
"طور المزيد من المرونة في الأساليب",
"قدّر قيمة التفكير المجرد"
],
details: "العمليون هم محركات التنفيذ. تحول الخطط إلى واقع من خلال الجهد المركز والمعرفة العملية. يكمن تحديك في الحفاظ على موقفك القائم على الإنجاز مع البقاء منفتحًا على المسارات غير التقليدية للنجاح."
}
]
};
// Assessment state
let currentQuestion = 0;
let answers = [];
let selectedLanguage = '';
// DOM elements
const languageSelection = document.getElementById('language-selection');
const introEn = document.getElementById('intro-en');
const introAr = document.getElementById('intro-ar');
const assessmentContainer = document.getElementById('assessment-container');
const questionContainer = document.getElementById('question-container');
const prevBtn = document.getElementById('prev-btn');
const nextBtn = document.getElementById('next-btn');
const progressText = document.getElementById('progress-text');
const progressBar = document.getElementById('progress-bar');
const resultsContainer = document.getElementById('results-container');
const resultsTitle = document.getElementById('results-title');
const resultsSubtitle = document.getElementById('results-subtitle');
const strengthsTitle = document.getElementById('strengths-title');
const strengthsList = document.getElementById('strengths-list');
const growthTitle = document.getElementById('growth-title');
const growthList = document.getElementById('growth-list');
const actionsTitle = document.getElementById('actions-title');
const actionsList = document.getElementById('actions-list');
const archetypeElement = document.getElementById('archetype');
const archetypeDesc = document.getElementById('archetype-desc');
const archetypeDetails = document.getElementById('archetype-details');
const flipText = document.getElementById('flip-text');
const flipBackText = document.getElementById('flip-back-text');
const quoteTitle = document.getElementById('quote-title');
const detailsTitle = document.getElementById('details-title');
const restartText = document.getElementById('restart-text');
const downloadText = document.getElementById('download-text');
// Set language and show appropriate intro
function setLanguage(lang) {
currentLanguage = lang;
selectedLanguage = lang;
languageSelection.classList.add('hidden');
if (lang === 'en') {
introEn.classList.remove('hidden');
introAr.classList.add('hidden');
} else {
introEn.classList.add('hidden');
introAr.classList.remove('hidden');
}
}
// Start assessment
function startAssessment(lang) {
currentLanguage = lang;
if (lang === 'en') {
introEn.classList.add('hidden');
prevBtn.innerHTML = `<i class="fas fa-arrow-left"></i><span class="hidden sm:inline">Previous</span>`;
nextBtn.innerHTML = `<span class="hidden sm:inline">Next</span><i class="fas fa-arrow-right"></i>`;
flipText.textContent = "See Details";
flipBackText.textContent = "Back";
quoteTitle.textContent = "Your Personality Archetype";
detailsTitle.textContent = "Key Characteristics";
restartText.textContent = "Start Over";
downloadText.textContent = "Download Summary";
} else {
introAr.classList.add('hidden');
prevBtn.innerHTML = `<i class="fas fa-arrow-right"></i><span class="hidden sm:inline">السابق</span>`;
nextBtn.innerHTML = `<span class="hidden sm:inline">التالي</span><i class="fas fa-arrow-left"></i>`;
flipText.textContent = "رؤية التفاصيل";
flipBackText.textContent = "عودة";
quoteTitle.textContent = "النمط الشخصي الخاص بك";
detailsTitle.textContent = "الخصائص الرئيسية";
restartText.textContent = "ابدأ من جديد";
downloadText.textContent = "تنزيل الملخص";
}
assessmentContainer.classList.remove('hidden');
answers = Array(questions[lang].length).fill(null);
showQuestion(0);
}
// Show current question
function showQuestion(index) {
currentQuestion = index;
const questionData = questions[currentLanguage][index];
let questionHTML = `
<h2 class="text-xl font-semibold text-gray-800 mb-6">${questionData.question}</h2>
<div class="space-y-3">`;
questionData.options.forEach((option, i) => {
const isSelected = answers[index] === i;
questionHTML += `
<div class="flex items-center">
<input type="radio" id="option-${i}" name="question" value="${i}"
${isSelected ? 'checked' : ''}
onclick="selectAnswer(${i})"
class="hidden peer">
<label for="option-${i}" class="w-full p-4 border ${isSelected ? 'border-indigo-500 bg-indigo-50' : 'border-gray-300'} rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 transition">
${option}
</label>
</div>`;
});
questionHTML += `</div>`;
questionContainer.innerHTML = questionHTML;
// Update progress
const progress = ((index + 1) / questions[currentLanguage].length) * 100;
progressText.textContent = `${index + 1}/${questions[currentLanguage].length}`;
progressBar.style.width = `${progress}%`;
progressBar.className = `progress-bar h-2.5 rounded-full ${currentLanguage === 'en' ? 'bg-indigo-600' : 'bg-emerald-600'}`;
// Update button states
prevBtn.disabled = index === 0;
nextBtn.disabled = answers[index] === null;
nextBtn.textContent = index === questions[currentLanguage].length - 1 ?
(currentLanguage === 'en' ? 'See Results' : 'رؤية النتائج') :
(currentLanguage === 'en' ? 'Next' : 'التالي');
}
// Select answer
function selectAnswer(answerIndex) {
answers[currentQuestion] = answerIndex;
nextBtn.disabled = false;
}
// Navigate questions
function nextQuestion() {
if (currentQuestion < questions[currentLanguage].length - 1) {
showQuestion(currentQuestion + 1);
} else {
showResults();
}
}
function prevQuestion() {
if (currentQuestion > 0) {
showQuestion(currentQuestion - 1);
}
}
// Event listeners for buttons
nextBtn.addEventListener('click', nextQuestion);
prevBtn.addEventListener('click', prevQuestion);
// Show results
function showResults() {
assessmentContainer.classList.add('hidden');
resultsContainer.classList.remove('hidden');
// Calculate archetype based on answers
const answerPattern = answers.join('');
let archetypeIndex;
// Simple scoring mechanism - in a real app this would be more sophisticated
const scores = [0, 0, 0, 0]; // Scores for each archetype
answers.forEach((answer, index) => {
scores[answer % 4]++; // Distribute answers among archetypes
});
archetypeIndex = scores.indexOf(Math.max(...scores));
const archetype = archetypes[currentLanguage][archetypeIndex];
// Display results
if (currentLanguage === 'en') {
resultsTitle.textContent = "Your Self-Discovery Results";
resultsSubtitle.textContent = "Based on your answers, here's what we've learned about you:";
strengthsTitle.textContent = "Strengths";
growthTitle.textContent = "Growth Areas";
actionsTitle.textContent = "Action Steps";
} else {
resultsTitle.textContent = "نتائج اكتشاف الذات الخاص بك";
resultsSubtitle.textContent = "بناءً على إجاباتك، إليك ما تعلمناه عنك:";
strengthsTitle.textContent = "نقاط القوة";
growthTitle.textContent = "مجالات النمو";
actionsTitle.textContent = "خطوات العمل";
}
archetypeElement.textContent = archetype.name;
archetypeDesc.textContent = archetype.description;
// Populate lists
strengthsList.innerHTML = '';
archetype.strengths.forEach(strength => {
const li = document.createElement('li');
li.textContent = strength;
strengthsList.appendChild(li);
});
growthList.innerHTML = '';
archetype.growth.forEach(area => {
const li = document.createElement('li');
li.textContent = area;
growthList.appendChild(li);
});
actionsList.innerHTML = '';
archetype.actions.forEach(action => {
const li = document.createElement('li');
li.textContent = action;
actionsList.appendChild(li);
});
archetypeDetails.textContent = archetype.details;
}
// Flip card for archetype details
function flipCard() {
const card = document.querySelector('.flip-card');
card.classList.toggle('flipped');
}
// Restart assessment
function restartAssessment() {
resultsContainer.classList.add('hidden');
if (currentLanguage === 'en') {
introEn.classList.remove('hidden');
} else {
introAr.classList.remove('hidden');
}
}
// Download results
function downloadResults() {
// In a real implementation, this would generate a PDF or text file
alert(currentLanguage === 'en' ?
"Download feature would generate a PDF summary in a real implementation." :
"ستقوم ميزة التنزيل بإنشاء ملخص PDF في التطبيق الفعلي.");
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
// Set up button event listeners
prevBtn.addEventListener('click', prevQuestion);
nextBtn.addEventListener('click', nextQuestion);
});
</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=Abdu-GH/abc" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>