Spaces:
Running

leadstyle / index.html
onlyoneritz's picture
Update index.html
eceeff4 verified
Raw History Blame Contribute Delete
34.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LeadStyle | Discover Your Leadership Potential</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.progress-bar {
transition: width 0.5s ease-in-out;
}
.scenario-card {
transform: perspective(1000px) rotateX(0deg);
transition: transform 0.5s, box-shadow 0.5s;
}
.scenario-card:hover {
transform: perspective(1000px) rotateX(5deg);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.result-chart {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: dash 1.5s ease-in-out forwards;
}
@keyframes dash {
to {
stroke-dashoffset: 0;
}
}
.floating {
animation: floating 3s ease-in-out infinite;
}
@keyframes floating {
0% { transform: translateY(0px); }
50% { transform: translateY(-15px); }
100% { transform: translateY(0px); }
}
.type-card {
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Hero Section -->
<div class="relative bg-gradient-to-br from-blue-600 to-indigo-800 text-white py-16">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0">
<h1 class="text-4xl md:text-5xl font-bold mb-6 animate__animated animate__fadeInDown">Discover Your <span class="text-yellow-300">Leadership Style</span></h1>
<p class="text-xl mb-8 opacity-90 animate__animated animate__fadeIn animate__delay-1s">Assessment that helps you uncover your unique approach to leadership with personalized guidance.</p>
<button onclick="startAssessment()" class="bg-yellow-400 hover:bg-yellow-500 text-blue-900 font-bold py-3 px-8 rounded-full shadow-lg transform hover:scale-105 transition duration-300 animate__animated animate__pulse animate__infinite">
<i class="fas fa-play mr-2"></i> Start Free Assessment
</button>
</div>
</div>
</div>
<div class="absolute bottom-0 left-0 w-full overflow-hidden">
<svg class="relative block h-16" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none">
<path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" class="fill-current text-gray-50"></path>
</svg>
</div>
</div>
<!-- Assessment Section (Initially Hidden) -->
<div id="assessmentSection" class="hidden container mx-auto px-4 py-12 max-w-3xl">
<div class="bg-white rounded-xl shadow-lg p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold text-gray-800" id="assessmentTitle">Leadership Style Assessment</h2>
<span class="text-gray-600 font-medium" id="questionCount">Question 1 of 12</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5 mb-8">
<div id="progressBar" class="progress-bar bg-blue-600 h-2.5 rounded-full" style="width: 0%"></div>
</div>
<div id="questionContainer" class="mb-8">
<p class="text-lg font-semibold text-gray-700 mb-6" id="questionText">How would you describe your approach when leading a team project?</p>
<div id="optionsContainer" class="space-y-4">
<button onclick="selectOption(0)" class="option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">I prefer to set clear expectations and let team members work independently</span>
</button>
<button onclick="selectOption(1)" class="option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">I enjoy brainstorming together and building consensus within the team</span>
</button>
<button onclick="selectOption(2)" class="option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">I focus on creating an inspiring vision that motivates the team</span>
</button>
<button onclick="selectOption(3)" class="option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">I analyze all data before making decisions and ensure logical processes</span>
</button>
</div>
</div>
<div id="scenarioContainer" class="hidden mb-8">
<p class="text-lg font-semibold text-gray-700 mb-6" id="scenarioTitle">Team Conflict Scenario</p>
<div class="scenario-card bg-gray-50 p-6 rounded-xl border border-gray-200 mb-6">
<p id="scenarioText" class="text-gray-700 mb-4">Two team members are having a dispute about the direction of the project. One wants to launch immediately with basic features, while the other insists on delaying to add more functionality. As the leader, what would you do?</p>
</div>
<div id="scenarioOptions" class="space-y-4">
<button onclick="selectScenarioOption(0)" class="scenario-option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">Listen to both perspectives but ultimately make the decision based on project goals</span>
</button>
<button onclick="selectScenarioOption(1)" class="scenario-option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">Facilitate a discussion to help them find common ground and compromise</span>
</button>
<button onclick="selectScenarioOption(2)" class="scenario-option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">Remind them of the bigger vision and how each approach contributes to it</span>
</button>
<button onclick="selectScenarioOption(3)" class="scenario-option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">Analyze the data on both approaches and propose the most logical solution</span>
</button>
</div>
</div>
<div class="flex justify-between">
<button id="prevBtn" onclick="previousQuestion()" class="text-gray-600 hover:text-gray-800 font-medium py-2 px-4 rounded transition hidden">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<div class="flex-grow"></div>
<button id="nextBtn" onclick="nextQuestion()" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg transition shadow hover:shadow-lg">
Next <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
<!-- Results Section (Initially Hidden) -->
<div id="resultsSection" class="hidden container mx-auto px-4 py-12 max-w-6xl">
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<!-- Results Header -->
<div class="bg-gradient-to-r from-blue-600 to-indigo-700 text-white p-8 text-center">
<h2 class="text-3xl font-bold mb-2 animate__animated animate__fadeIn">Your Leadership Style Results</h2>
<p class="text-xl opacity-90 animate__animated animate__fadeIn">Understanding your strengths and growth areas</p>
</div>
<!-- Primary Style Result -->
<div class="p-8 border-b border-gray-200">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/3 mb-6 md:mb-0 flex justify-center">
<div class="relative w-56 h-56">
<svg class="w-full h-full" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="45" fill="none" stroke="#e6e6e6" stroke-width="8"/>
<path id="stylePercent" class="result-chart" stroke-linecap="round" stroke-width="8" stroke="url(#gradient)" fill="none"
stroke-dasharray="283, 283"
d="M5,50
a45,45 0 1,1 90,0
a45,45 0 1,1 -90,0"/>
<defs>
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#3b82f6"/>
<stop offset="100%" stop-color="#6366f1"/>
</linearGradient>
</defs>
<text x="50" y="50" text-anchor="middle" dominant-baseline="middle" font-size="20" font-weight="bold" fill="#1e3a8a">
84%
</text>
</svg>
</div>
</div>
<div class="md:w-2/3 md:pl-10">
<h3 class="text-2xl font-bold text-gray-800 mb-4">Your Primary Style: <span id="primaryStyleTitle" class="text-blue-600">Visionary Leader</span></h3>
<p id="primaryStyleDesc" class="text-gray-700 mb-6">
You're a big-picture thinker who inspires others with your compelling vision for the future. You naturally energize teams around common goals and foster innovation. Your strength lies in creating enthusiasm and aligning people with a shared purpose, though you may sometimes overlook implementation details.
</p>
<div class="flex flex-wrap gap-2">
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium">Inspirational</span>
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium">Forward-thinking</span>
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium">Charismatic</span>
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium">Innovative</span>
</div>
</div>
</div>
</div>
<!-- All Style Scores -->
<div class="p-8">
<h3 class="text-xl font-bold text-gray-800 mb-6">Your Leadership Dimensions</h3>
<div class="grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<!-- Visionary -->
<div class="type-card p-6 rounded-xl">
<div class="flex items-center mb-4">
<div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mr-4">
<i class="fas fa-lightbulb text-blue-600 text-xl"></i>
</div>
<h4 class="font-bold text-gray-800">Visionary</h4>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5 mb-2">
<div class="bg-blue-600 h-2.5 rounded-full" style="width: 84%"></div>
</div>
<p class="text-sm text-gray-600 mb-1">84% alignment</p>
<p class="text-xs text-gray-500">
Inspiring others through compelling visions of the future.
</p>
</div>
<!-- Collaborative -->
<div class="type-card p-6 rounded-xl">
<div class="flex items-center mb-4">
<div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mr-4">
<i class="fas fa-users text-green-600 text-xl"></i>
</div>
<h4 class="font-bold text-gray-800">Collaborative</h4>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5 mb-2">
<div class="bg-green-600 h-2.5 rounded-full" style="width: 67%"></div>
</div>
<p class="text-sm text-gray-600 mb-1">67% alignment</p>
<p class="text-xs text-gray-500">
Building consensus and valuing team input in decisions.
</p>
</div>
<!-- Analytical -->
<div class="type-card p-6 rounded-xl">
<div class="flex items-center mb-4">
<div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center mr-4">
<i class="fas fa-chart-line text-purple-600 text-xl"></i>
</div>
<h4 class="font-bold text-gray-800">Analytical</h4>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5 mb-2">
<div class="bg-purple-600 h-2.5 rounded-full" style="width: 52%"></div>
</div>
<p class="text-sm text-gray-600 mb-1">52% alignment</p>
<p class="text-xs text-gray-500">
Making decisions based on data and logical analysis.
</p>
</div>
<!-- Directive -->
<div class="type-card p-6 rounded-xl">
<div class="flex items-center mb-4">
<div class="w-12 h-12 bg-yellow-100 rounded-full flex items-center justify-center mr-4">
<i class="fas fa-bullseye text-yellow-600 text-xl"></i>
</div>
<h4 class="font-bold text-gray-800">Directive</h4>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5 mb-2">
<div class="bg-yellow-600 h-2.5 rounded-full" style="width: 45%"></div>
</div>
<p class="text-sm text-gray-600 mb-1">45% alignment</p>
<p class="text-xs text-gray-500">
Setting clear direction and expecting execution.
</p>
</div>
</div>
</div>
<!-- Personalized Recommendations -->
<div class="bg-gray-50 p-8">
<h3 class="text-xl font-bold text-gray-800 mb-6">Personalized Development Plan</h3>
<div class="grid md:grid-cols-2 gap-6">
<!-- Strength Development -->
<div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
<div class="flex items-start mb-4">
<div class="flex-shrink-0 mt-1">
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center">
<i class="fas fa-bolt text-blue-600"></i>
</div>
</div>
<div class="ml-3">
<h4 class="font-bold text-gray-800">Double Down on Your Strengths</h4>
</div>
</div>
<ul class="text-gray-700 space-y-3 pl-2">
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-sm"></i>
<span>Host vision-crafting workshops with your team quarterly</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-sm"></i>
<span>Practice storytelling techniques to make your vision more compelling</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-sm"></i>
<span>Develop a "vision dashboard" to track progress toward long-term goals</span>
</li>
</ul>
</div>
<!-- Growth Area -->
<div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
<div class="flex items-start mb-4">
<div class="flex-shrink-0 mt-1">
<div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center">
<i class="fas fa-seedling text-yellow-600"></i>
</div>
</div>
<div class="ml-3">
<h4 class="font-bold text-gray-800">Develop Growth Areas</h4>
</div>
</div>
<ul class="text-gray-700 space-y-3 pl-2">
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-sm"></i>
<span>Create detailed implementation plans for 2 initiatives this quarter</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-sm"></i>
<span>Shadow an analytical leader for one day to learn structured approaches</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-sm"></i>
<span>Take our "From Vision to Execution" mini-course</span>
</li>
</ul>
</div>
</div>
<!-- Exercise Suggestions -->
<div class="mt-10">
<h4 class="font-bold text-lg text-gray-800 mb-4">Recommended Exercises</h4>
<div class="grid md:grid-cols-3 gap-4">
<div class="bg-white p-5 rounded-lg shadow-sm border border-gray-100 hover:bg-blue-50 hover:border-blue-200 transition">
<div class="text-blue-600 mb-3 text-2xl">
<i class="fas fa-binoculars"></i>
</div>
<h5 class="font-semibold text-gray-800 mb-2">Vision Refinement</h5>
<p class="text-sm text-gray-600">Craft a personal leadership vision statement and get feedback.</p>
</div>
<div class="bg-white p-5 rounded-lg shadow-sm border border-gray-100 hover:bg-green-50 hover:border-green-200 transition">
<div class="text-green-600 mb-3 text-2xl">
<i class="fas fa-chess"></i>
</div>
<h5 class="font-semibold text-gray-800 mb-2">Strategic Thinking</h5>
<p class="text-sm text-gray-600">Analyze past projects for implementation gaps and solutions.</p>
</div>
<div class="bg-white p-5 rounded-lg shadow-sm border border-gray-100 hover:bg-purple-50 hover:border-purple-200 transition">
<div class="text-purple-600 mb-3 text-2xl">
<i class="fas fa-comments"></i>
</div>
<h5 class="font-semibold text-gray-800 mb-2">Feedback Session</h5>
<p class="text-sm text-gray-600">Gather anonymous feedback from 5 team members about your leadership.</p>
</div>
</div>
</div>
</div>
<!-- Final CTA -->
<div class="bg-gradient-to-r from-blue-50 to-indigo-50 p-8 text-center">
<h3 class="text-2xl font-bold text-gray-800 mb-4">Ready to elevate your leadership?</h3>
<p class="text-gray-600 max-w-2xl mx-auto mb-6">Get personalized coaching and advanced insights with our premium leadership development program.</p>
<button class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-8 rounded-full shadow-lg transform hover:scale-105 transition">
Explore Premium Features <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
<script>
// Assessment Data
const questions = [
"How would you describe your approach when leading a team project?",
"When making decisions, you tend to rely most on...",
"How do you prefer to communicate with your team?",
"What's your natural reaction when a team member makes a mistake?",
"What aspect of leadership energizes you the most?"
];
const scenarios = [
{
title: "Team Conflict Scenario",
text: "Two team members are having a dispute about the direction of the project. One wants to launch immediately with basic features, while the other insists on delaying to add more functionality. As the leader, what would you do?"
},
{
title: "Innovation Challenge",
text: "Your team seems stuck in conventional thinking patterns. You need breakthrough ideas for a new product line. How would you approach this situation?"
},
{
title: "Performance Issue",
text: "A typically strong performer has been submitting subpar work recently, missing deadlines and showing less enthusiasm. How do you handle this?"
}
];
const questionOptions = [
[
"I prefer to set clear expectations and let team members work independently",
"I enjoy brainstorming together and building consensus within the team",
"I focus on creating an inspiring vision that motivates the team",
"I analyze all data before making decisions and ensure logical processes"
],
[
"My intuition about what will work best",
"Input from team members and stakeholders",
"The long-term vision and strategic direction",
"Data analysis and factual evidence"
],
[
"Clear, concise instructions and updates",
"Open dialogue with plenty of discussion",
"Inspiring messages that connect to larger goals",
"Detailed reports and analysis"
],
[
"Address it directly and correct it immediately",
"Use it as a teaching moment for everyone",
"Focus on the learning opportunity it presents",
"Analyze why it happened systematically"
],
[
"Making tough calls that move things forward",
"Building strong, collaborative relationships",
"Inspiring people to achieve more than they thought possible",
"Solving complex problems with logical solutions"
]
];
const scenarioOptions = [
[
"Listen to both perspectives but ultimately make the decision based on project goals",
"Facilitate a discussion to help them find common ground and compromise",
"Remind them of the bigger vision and how each approach contributes to it",
"Analyze the data on both approaches and propose the most logical solution"
],
[
"Set a tight deadline to force creative solutions",
"Organize brainstorming sessions with structured ideation techniques",
"Share inspiring examples to spark new thinking",
"Research market gaps and identify patterns that suggest opportunities"
],
[
"Have a direct conversation about expectations and consequences",
"Meet one-on-one to understand what's affecting their performance",
"Remind them of their potential and recent accomplishments",
"Review performance metrics together to identify specific issues"
]
];
// Assessment State
let currentQuestionIndex = 0;
let currentScenarioIndex = 0;
let responses = [];
let scenarioResponses = [];
// DOM Elements
const assessmentSection = document.getElementById('assessmentSection');
const questionContainer = document.getElementById('questionContainer');
const scenarioContainer = document.getElementById('scenarioContainer');
const resultsSection = document.getElementById('resultsSection');
const progressBar = document.getElementById('progressBar');
const questionCount = document.getElementById('questionCount');
const questionText = document.getElementById('questionText');
const scenarioTitle = document.getElementById('scenarioTitle');
const scenarioText = document.getElementById('scenarioText');
const optionsContainer = document.getElementById('optionsContainer');
const scenarioOptionsContainer = document.getElementById('scenarioOptions');
const prevBtn = document.getElementById('prevBtn');
const nextBtn = document.getElementById('nextBtn');
// Assessment Functions
function startAssessment() {
document.querySelector('.relative').scrollIntoView({ behavior: 'smooth' });
assessmentSection.classList.remove('hidden');
assessmentSection.classList.add('animate__animated', 'animate__fadeIn');
updateQuestion();
}
function updateQuestion() {
// Hide scenario container if it's shown
scenarioContainer.classList.add('hidden');
questionContainer.classList.remove('hidden');
// Update progress
const totalQuestions = questions.length + scenarios.length;
const progress = ((currentQuestionIndex + currentScenarioIndex) / (totalQuestions)) * 100;
progressBar.style.width = `${progress}%`;
// Update question count
questionCount.textContent = `Question ${currentQuestionIndex + currentScenarioIndex + 1} of ${totalQuestions}`;
// Show/hide back button
if (currentQuestionIndex === 0 && currentScenarioIndex === 0) {
prevBtn.classList.add('hidden');
} else {
prevBtn.classList.remove('hidden');
}
// Check if we should show a question or scenario
if (currentQuestionIndex < questions.length) {
// Show question
questionText.textContent = questions[currentQuestionIndex];
// Update options
optionsContainer.innerHTML = '';
questionOptions[currentQuestionIndex].forEach((option, index) => {
optionsContainer.innerHTML += `
<button onclick="selectOption(${index})" class="option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">${option}</span>
</button>
`;
});
} else if (currentScenarioIndex < scenarios.length) {
showScenario();
} else {
// Assessment complete
showResults();
}
}
function showScenario() {
questionContainer.classList.add('hidden');
scenarioContainer.classList.remove('hidden');
scenarioTitle.textContent = scenarios[currentScenarioIndex].title;
scenarioText.textContent = scenarios[currentScenarioIndex].text;
// Update scenario options
scenarioOptionsContainer.innerHTML = '';
scenarioOptions[currentScenarioIndex].forEach((option, index) => {
scenarioOptionsContainer.innerHTML += `
<button onclick="selectScenarioOption(${index})" class="scenario-option-btn w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition">
<span class="font-medium text-gray-700">${option}</span>
</button>
`;
});
}
function selectOption(index) {
// Remove active class from all buttons
document.querySelectorAll('.option-btn').forEach(btn => {
btn.classList.remove('bg-blue-100', 'border-blue-500');
});
// Add active class to selected button
event.currentTarget.classList.add('bg-blue-100', 'border-blue-500');
// Store response
responses[currentQuestionIndex] = index;
}
function selectScenarioOption(index) {
// Remove active class from all buttons
document.querySelectorAll('.scenario-option-btn').forEach(btn => {
btn.classList.remove('bg-blue-100', 'border-blue-500');
});
// Add active class to selected button
event.currentTarget.classList.add('bg-blue-100', 'border-blue-500');
// Store response
scenarioResponses[currentScenarioIndex] = index;
}
function nextQuestion() {
// If it's a question and not answered, return
if (currentQuestionIndex < questions.length && responses[currentQuestionIndex] === undefined) {
return;
}
// If it's a scenario and not answered, return
if (currentQuestionIndex >= questions.length && currentScenarioIndex < scenarios.length &&
scenarioResponses[currentScenarioIndex] === undefined) {
return;
}
// Proceed to next
if (currentQuestionIndex < questions.length) {
currentQuestionIndex++;
} else if (currentScenarioIndex < scenarios.length) {
currentScenarioIndex++;
}
updateQuestion();
}
function previousQuestion() {
// Go back to previous question
if (currentScenarioIndex > 0) {
currentScenarioIndex--;
} else if (currentQuestionIndex > 0) {
currentQuestionIndex--;
}
updateQuestion();
}
function showResults() {
assessmentSection.classList.add('hidden');
resultsSection.classList.remove('hidden');
resultsSection.classList.add('animate__animated', 'animate__fadeIn');
// Scroll to results
resultsSection.scrollIntoView({ behavior: 'smooth' });
// Here you would typically calculate results based on responses
// For this demo, we're using fixed data
}
</script>
</html>