| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Discover Your Bird Personality | DOPE Test</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"> |
| <script src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script> |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> |
| <style> |
| .bird-animation { |
| transition: all 0.3s ease; |
| } |
| .bird-animation:hover { |
| transform: translateY(-5px); |
| } |
| .progress-bar { |
| transition: width 0.5s ease; |
| } |
| .result-chart { |
| height: 300px; |
| } |
| .option-card { |
| transition: all 0.2s ease; |
| min-height: 80px; |
| display: flex; |
| align-items: center; |
| padding: 15px; |
| } |
| .option-card:hover { |
| transform: scale(1.02); |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); |
| } |
| .option-card.selected { |
| transform: scale(1.03); |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2); |
| } |
| .dark-mode { |
| background-color: #1a202c; |
| color: #f7fafc; |
| } |
| .dark-mode .bg-white { |
| background-color: #2d3748; |
| } |
| .dark-mode .text-gray-800 { |
| color: #f7fafc; |
| } |
| .dark-mode .border-gray-200 { |
| border-color: #4a5568; |
| } |
| .dark-mode .bg-gray-100 { |
| background-color: #4a5568; |
| } |
| .fade-in { |
| animation: fadeIn 0.5s ease-in; |
| } |
| @keyframes fadeIn { |
| from { opacity: 0; } |
| to { opacity: 1; } |
| } |
| #download-btn { |
| background: linear-gradient(135deg, #4f46e5, #7c3aed); |
| } |
| #download-btn:hover { |
| background: linear-gradient(135deg, #4338ca, #6d28d9); |
| } |
| .bird-icon { |
| transition: all 0.5s ease; |
| animation: float 3s ease-in-out infinite; |
| } |
| @keyframes float { |
| 0% { transform: translateY(0px); } |
| 50% { transform: translateY(-10px); } |
| 100% { transform: translateY(0px); } |
| } |
| .pie-chart-container { |
| position: relative; |
| width: 300px; |
| height: 300px; |
| margin: 0 auto; |
| } |
| .chart-center-text { |
| position: absolute; |
| top: 50%; |
| left: 50%; |
| transform: translate(-50%, -50%); |
| text-align: center; |
| font-weight: bold; |
| } |
| </style> |
| </head> |
| <body class="bg-gray-50 font-sans"> |
| |
| <nav class="bg-white shadow-sm"> |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> |
| <div class="flex justify-between h-16"> |
| <div class="flex items-center"> |
| <i class="fas fa-dove text-blue-500 text-2xl mr-2"></i> |
| <span class="text-xl font-semibold text-gray-800">DOPE Personality</span> |
| </div> |
| <div class="flex items-center"> |
| <button id="theme-toggle" class="p-2 rounded-full focus:outline-none"> |
| <i class="fas fa-moon text-gray-600"></i> |
| </button> |
| </div> |
| </div> |
| </div> |
| </nav> |
|
|
| |
| <div id="app" class="w-full px-4 py-8"> |
| |
| <div id="homepage" class="text-center fade-in max-w-6xl mx-auto"> |
| <h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-6">Discover Your Bird Personality!</h1> |
| <p class="text-xl text-gray-600 max-w-3xl mx-auto mb-10"> |
| The DOPE theory classifies personalities into four bird types: Dove, Owl, Peacock, and Eagle. |
| Take our quick test to discover which bird best represents your personality! |
| </p> |
| |
| <div class="flex flex-wrap justify-center gap-8 mb-12"> |
| <div class="bird-animation w-40 text-center"> |
| <div class="bg-blue-100 p-4 rounded-full w-24 h-24 mx-auto flex items-center justify-center"> |
| <i class="fas fa-dove text-blue-500 text-4xl"></i> |
| </div> |
| <h3 class="font-semibold text-blue-600 mt-2">Dove</h3> |
| <p class="text-sm text-gray-600">Peaceful, empathetic, patient</p> |
| </div> |
| <div class="bird-animation w-40 text-center"> |
| <div class="bg-amber-100 p-4 rounded-full w-24 h-24 mx-auto flex items-center justify-center"> |
| <i class="fas fa-kiwi-bird text-amber-600 text-4xl"></i> |
| </div> |
| <h3 class="font-semibold text-amber-600 mt-2">Owl</h3> |
| <p class="text-sm text-gray-600">Analytical, structured, detail-oriented</p> |
| </div> |
| <div class="bird-animation w-40 text-center"> |
| <div class="bg-yellow-100 p-4 rounded-full w-24 h-24 mx-auto flex items-center justify-center"> |
| <i class="fas fa-feather-alt text-yellow-500 text-4xl"></i> |
| </div> |
| <h3 class="font-semibold text-yellow-600 mt-2">Peacock</h3> |
| <p class="text-sm text-gray-600">Expressive, social, optimistic</p> |
| </div> |
| <div class="bird-animation w-40 text-center"> |
| <div class="bg-red-100 p-4 rounded-full w-24 h-24 mx-auto flex items-center justify-center"> |
| <i class="fas fa-crow text-red-500 text-4xl"></i> |
| </div> |
| <h3 class="font-semibold text-red-600 mt-2">Eagle</h3> |
| <p class="text-sm text-gray-600">Decisive, goal-oriented, competitive</p> |
| </div> |
| </div> |
| |
| <button id="start-test" class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-3 px-8 rounded-full text-lg transition duration-300 transform hover:scale-105"> |
| Take the Test <i class="fas fa-arrow-right ml-2"></i> |
| </button> |
| </div> |
|
|
| |
| <div id="assessment" class="hidden w-full max-w-4xl mx-auto"> |
| <div class="mb-8"> |
| <div class="flex justify-between items-center mb-2"> |
| <span class="text-sm font-medium text-gray-600" id="question-counter">Question 1 of 20</span> |
| <span class="text-sm font-medium text-gray-600" id="progress-percentage">5%</span> |
| </div> |
| <div class="w-full bg-gray-200 rounded-full h-2.5"> |
| <div id="progress-bar" class="bg-blue-500 h-2.5 rounded-full progress-bar" style="width: 5%"></div> |
| </div> |
| </div> |
| |
| <div id="question-container" class="bg-white p-6 rounded-lg shadow-md mb-8"> |
| <h2 class="text-xl font-semibold text-gray-800 mb-6" id="question-text">When at a party with a group of people, do you find yourself feeling:</h2> |
| |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> |
| <div class="option-card bg-blue-50 border border-blue-100 p-4 rounded-lg cursor-pointer" data-type="dove"> |
| <span class="font-medium text-blue-700">A bit awkward, preferring quiet conversations with close friends</span> |
| </div> |
| <div class="option-card bg-amber-50 border border-amber-100 p-4 rounded-lg cursor-pointer" data-type="owl"> |
| <span class="font-medium text-amber-700">Uncomfortable with small talk, analyzing people's behaviors</span> |
| </div> |
| <div class="option-card bg-yellow-50 border border-yellow-100 p-4 rounded-lg cursor-pointer" data-type="peacock"> |
| <span class="font-medium text-yellow-700">Excited to meet everyone, telling stories and making jokes</span> |
| </div> |
| <div class="option-card bg-red-50 border border-red-100 p-4 rounded-lg cursor-pointer" data-type="eagle"> |
| <span class="font-medium text-red-700">Confident and assertive, often taking charge of conversations</span> |
| </div> |
| </div> |
| </div> |
| |
| <div class="flex justify-between"> |
| <button id="prev-question" class="bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-6 rounded-lg transition duration-300 hidden"> |
| <i class="fas fa-arrow-left mr-2"></i> Previous |
| </button> |
| <button id="next-question" class="bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-6 rounded-lg transition duration-300 ml-auto"> |
| Next <i class="fas fa-arrow-right ml-2"></i> |
| </button> |
| </div> |
| </div> |
|
|
| |
| <div id="results" class="hidden w-full max-w-5xl mx-auto"> |
| <div class="text-center mb-12"> |
| <h1 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">Your Bird Personality</h1> |
| <p class="text-xl text-gray-600">Based on your answers, your dominant personality type is:</p> |
| </div> |
| |
| <div id="result-card" class="bg-white rounded-xl shadow-lg overflow-hidden mb-12"> |
| <div class="md:flex"> |
| <div id="dominant-icon" class="md:w-1/3 flex items-center justify-center p-8"> |
| <div id="dominant-icon-bg" class="rounded-full w-40 h-40 flex items-center justify-center"> |
| <i id="dominant-icon-symbol" class="text-6xl bird-icon"></i> |
| </div> |
| </div> |
| <div class="md:w-2/3 p-8"> |
| <h2 id="dominant-title" class="text-3xl font-bold mb-4"></h2> |
| <p id="dominant-description" class="text-gray-700 mb-6"></p> |
| <div class="mb-6"> |
| <h3 class="font-semibold text-lg mb-2">Famous <span id="famous-title"></span>s:</h3> |
| <p id="famous-people" class="text-gray-600"></p> |
| </div> |
| <div> |
| <h3 class="font-semibold text-lg mb-2">Ideal Careers:</h3> |
| <p id="career-suggestions" class="text-gray-600"></p> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <div class="bg-white rounded-xl shadow-lg p-8 mb-8"> |
| <h2 class="text-2xl font-bold text-center mb-8">Your Complete Results Breakdown</h2> |
| |
| <div class="flex flex-col md:flex-row items-center justify-between mb-8"> |
| <div class="pie-chart-container mb-8 md:mb-0"> |
| <canvas id="pieChart"></canvas> |
| <div class="chart-center-text"> |
| <span id="dominant-percentage" class="text-2xl"></span><br> |
| <span id="dominant-type" class="text-lg"></span> |
| </div> |
| </div> |
| |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6 w-full md:w-1/2"> |
| <div class="bg-blue-50 p-4 rounded-lg"> |
| <div class="flex items-center mb-2"> |
| <div class="bg-blue-100 p-2 rounded-full mr-3"> |
| <i class="fas fa-dove text-blue-500 bird-icon"></i> |
| </div> |
| <h3 class="font-semibold text-blue-700">Dove <span id="dove-percent" class="text-sm">(0%)</span></h3> |
| </div> |
| <div class="mb-2"> |
| <h4 class="font-medium text-blue-600 text-sm">Strengths:</h4> |
| <p class="text-xs text-gray-700">Calm, loyal, friendly, patient, good listener, peacemaker</p> |
| </div> |
| <div> |
| <h4 class="font-medium text-blue-600 text-sm">Weaknesses:</h4> |
| <p class="text-xs text-gray-700">Avoids confrontation, can be indecisive, may struggle with assertiveness</p> |
| </div> |
| </div> |
| <div class="bg-amber-50 p-4 rounded-lg"> |
| <div class="flex items-center mb-2"> |
| <div class="bg-amber-100 p-2 rounded-full mr-3"> |
| <i class="fas fa-kiwi-bird text-amber-600 bird-icon"></i> |
| </div> |
| <h3 class="font-semibold text-amber-700">Owl <span id="owl-percent" class="text-sm">(0%)</span></h3> |
| </div> |
| <div class="mb-2"> |
| <h4 class="font-medium text-amber-600 text-sm">Strengths:</h4> |
| <p class="text-xs text-gray-700">Analytical, detail-oriented, logical, thorough, reliable</p> |
| </div> |
| <div> |
| <h4 class="font-medium text-amber-600 text-sm">Weaknesses:</h4> |
| <p class="text-xs text-gray-700">Can be overly critical, may struggle with spontaneity, perfectionist tendencies</p> |
| </div> |
| </div> |
| <div class="bg-yellow-50 p-4 rounded-lg"> |
| <div class="flex items-center mb-2"> |
| <div class="bg-yellow-100 p-2 rounded-full mr-3"> |
| <i class="fas fa-feather-alt text-yellow-500 bird-icon"></i> |
| </div> |
| <h3 class="font-semibold text-yellow-700">Peacock <span id="peacock-percent" class="text-sm">(0%)</span></h3> |
| </div> |
| <div class="mb-2"> |
| <h4 class="font-medium text-yellow-600 text-sm">Strengths:</h4> |
| <p class="text-xs text-gray-700">Charismatic, enthusiastic, creative, optimistic, great communicator</p> |
| </div> |
| <div> |
| <h4 class="font-medium text-yellow-600 text-sm">Weaknesses:</h4> |
| <p class="text-xs text-gray-700">Can be impulsive, may struggle with focus, sometimes overly dramatic</p> |
| </div> |
| </div> |
| <div class="bg-red-50 p-4 rounded-lg"> |
| <div class="flex items-center mb-2"> |
| <div class="bg-red-100 p-2 rounded-full mr-3"> |
| <i class="fas fa-crow text-red-500 bird-icon"></i> |
| </div> |
| <h3 class="font-semibold text-red-700">Eagle <span id="eagle-percent" class="text-sm">(0%)</span></h3> |
| </div> |
| <div class="mb-2"> |
| <h4 class="font-medium text-red-600 text-sm">Strengths:</h4> |
| <p class="text-xs text-gray-700">Decisive, goal-oriented, confident, natural leader, results-driven</p> |
| </div> |
| <div> |
| <h4 class="font-medium text-red-600 text-sm">Weaknesses:</h4> |
| <p class="text-xs text-gray-700">Can be impatient, may come across as domineering, sometimes insensitive</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <div class="bg-white rounded-xl shadow-lg p-8 mb-8"> |
| <h2 class="text-2xl font-bold text-center mb-6">Share Your Results</h2> |
| <div class="flex flex-wrap justify-center gap-4"> |
| <button class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg flex items-center"> |
| <i class="fab fa-facebook-f mr-2"></i> Facebook |
| </button> |
| <button class="bg-blue-400 hover:bg-blue-500 text-white px-6 py-3 rounded-lg flex items-center"> |
| <i class="fab fa-twitter mr-2"></i> Twitter |
| </button> |
| <button class="bg-red-500 hover:bg-red-600 text-white px-6 py-3 rounded-lg flex items-center"> |
| <i class="fab fa-youtube mr-2"></i> YouTube |
| </button> |
| <button class="bg-gray-800 hover:bg-gray-900 text-white px-6 py-3 rounded-lg flex items-center"> |
| <i class="fab fa-github mr-2"></i> GitHub |
| </button> |
| </div> |
| <div class="mt-6 text-center"> |
| <p class="text-gray-600 mb-4">Visit niftytechfinds.com for more personality insights</p> |
| </div> |
| </div> |
| |
| <div class="text-center"> |
| <button id="download-btn" class="text-white font-medium py-3 px-8 rounded-lg transition duration-300 mr-4 mb-4"> |
| <i class="fas fa-download mr-2"></i> Download Your Profile (JPG) |
| </button> |
| <button id="retake-test" class="bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-8 rounded-lg transition duration-300 mr-4"> |
| <i class="fas fa-redo mr-2"></i> Retake Test |
| </button> |
| <button id="learn-more" class="bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-8 rounded-lg transition duration-300"> |
| Learn More <i class="fas fa-book ml-2"></i> |
| </button> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <footer class="bg-white border-t border-gray-200 mt-12"> |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"> |
| <div class="md:flex md:items-center md:justify-between"> |
| <div class="flex justify-center md:order-2 space-x-6"> |
| <a href="#" class="text-gray-400 hover:text-gray-500"> |
| <i class="fab fa-facebook-f"></i> |
| </a> |
| <a href="#" class="text-gray-400 hover:text-gray-500"> |
| <i class="fab fa-twitter"></i> |
| </a> |
| <a href="#" class="text-gray-400 hover:text-gray-500"> |
| <i class="fab fa-instagram"></i> |
| </a> |
| <a href="#" class="text-gray-400 hover:text-gray-500"> |
| <i class="fab fa-linkedin-in"></i> |
| </a> |
| </div> |
| <div class="mt-8 md:mt-0 md:order-1"> |
| <p class="text-center text-base text-gray-400"> |
| © 2023 DOPE Personality Test. All rights reserved. |
| </p> |
| </div> |
| </div> |
| </div> |
| </footer> |
|
|
| <script> |
| |
| const questions = [ |
| { |
| question: "When at a party with a group of people, do you find yourself feeling:", |
| options: [ |
| { text: "A bit awkward, preferring quiet conversations with close friends", type: "dove" }, |
| { text: "Uncomfortable with small talk, analyzing people's behaviors", type: "owl" }, |
| { text: "Excited to meet everyone, telling stories and making jokes", type: "peacock" }, |
| { text: "Confident and assertive, often taking charge of conversations", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When working with a group of people, do you describe yourself as:", |
| options: [ |
| { text: "Supportive and cooperative, helping others feel comfortable", type: "dove" }, |
| { text: "Focused on details and accuracy, ensuring everything is done correctly", type: "owl" }, |
| { text: "Enthusiastic and energetic, bringing fun to the group", type: "peacock" }, |
| { text: "Efficient and results-driven, keeping everyone on track", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When in a conversation, do you find yourself:", |
| options: [ |
| { text: "Giving friendly gaze & gestures, making others feel heard", type: "dove" }, |
| { text: "Asking precise questions to get accurate information", type: "owl" }, |
| { text: "Talking loudly and expressively with lots of gestures", type: "peacock" }, |
| { text: "Being direct and opinionated, getting to the point quickly", type: "eagle" } |
| ] |
| }, |
| { |
| question: "Do you consider yourself:", |
| options: [ |
| { text: "A better listener than talker, valuing harmony in conversations", type: "dove" }, |
| { text: "Someone who asks a lot of questions to understand deeply", type: "owl" }, |
| { text: "Eager to share personal feelings and experiences", type: "peacock" }, |
| { text: "Focused on getting to the 'bottom line' efficiently", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When you talk, do you typically:", |
| options: [ |
| { text: "Speak in a soft voice with gentle expressions", type: "dove" }, |
| { text: "Have infrequent eye contact, thinking carefully before speaking", type: "owl" }, |
| { text: "Have friendly warm eyes with animated facial expressions", type: "peacock" }, |
| { text: "Have intense eye contact with a serious expression", type: "eagle" } |
| ] |
| }, |
| { |
| question: "Do you physically:", |
| options: [ |
| { text: "Nod in agreement often to show you're listening", type: "dove" }, |
| { text: "Have controlled, stiff posture with minimal movement", type: "owl" }, |
| { text: "Use highly animated gestures when speaking", type: "peacock" }, |
| { text: "Maintain a serious expression with purposeful movements", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When you speak, do you find yourself:", |
| options: [ |
| { text: "Making statements cautiously to avoid conflict", type: "dove" }, |
| { text: "Asking precise questions to gather complete information", type: "owl" }, |
| { text: "Speaking quickly with lots of enthusiasm", type: "peacock" }, |
| { text: "Making decisive true statements with confidence", type: "eagle" } |
| ] |
| }, |
| { |
| question: "Do you consider yourself:", |
| options: [ |
| { text: "Easygoing and relaxed in most situations", type: "dove" }, |
| { text: "Deep & thoughtful, preferring meaningful conversations", type: "owl" }, |
| { text: "Having a good sense of humor and making people laugh", type: "peacock" }, |
| { text: "A born leader who naturally takes charge", type: "eagle" } |
| ] |
| }, |
| { |
| question: "Do you find yourself:", |
| options: [ |
| { text: "Calm, cool & collected even in stressful situations", type: "dove" }, |
| { text: "Unemotional and logical when making decisions", type: "owl" }, |
| { text: "Cheerful & bubbly, bringing energy to any room", type: "peacock" }, |
| { text: "Not easily discouraged by challenges or setbacks", type: "eagle" } |
| ] |
| }, |
| { |
| question: "Do you / Are you:", |
| options: [ |
| { text: "Preferring a consistent, even-paced lifestyle", type: "dove" }, |
| { text: "Serious & purposeful in your daily activities", type: "owl" }, |
| { text: "A talkative storyteller who enjoys entertaining", type: "peacock" }, |
| { text: "Independent & self-sufficient in achieving goals", type: "eagle" } |
| ] |
| }, |
| { |
| question: "Do you consider yourself:", |
| options: [ |
| { text: "A worrier who thinks about potential problems", type: "dove" }, |
| { text: "Remembering the negatives to avoid future mistakes", type: "owl" }, |
| { text: "Getting angry easily when things don't go your way", type: "peacock" }, |
| { text: "Impatient with inefficiency or slow progress", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When you are pressured, would you describe yourself as:", |
| options: [ |
| { text: "Indecisive & compromising to keep peace", type: "dove" }, |
| { text: "Moody & depressed when things feel out of control", type: "owl" }, |
| { text: "Having restless energy that needs an outlet", type: "peacock" }, |
| { text: "Bossy and taking charge to get things done", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When it comes to work ethic, would you describe yourself as:", |
| options: [ |
| { text: "Peaceful & agreeable, avoiding workplace conflicts", type: "dove" }, |
| { text: "Persistent & thorough, ensuring perfect results", type: "owl" }, |
| { text: "Thinking up new activities to make work fun", type: "peacock" }, |
| { text: "Moving quickly to action to achieve goals", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When working in a group situation do you consider yourself:", |
| options: [ |
| { text: "Preferring to watch and support rather than lead", type: "dove" }, |
| { text: "Over analyzing & planning before taking action", type: "owl" }, |
| { text: "Wasting time talking and socializing too much", type: "peacock" }, |
| { text: "Having little tolerance for mistakes or inefficiency", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When you consider your friends, do you feel you:", |
| options: [ |
| { text: "Sincerely care about their feelings and wellbeing", type: "dove" }, |
| { text: "Make friends cautiously after careful consideration", type: "owl" }, |
| { text: "Make friends easily with your outgoing nature", type: "peacock" }, |
| { text: "Will naturally lead and organize group activities", type: "eagle" } |
| ] |
| }, |
| { |
| question: "Do you consider yourself:", |
| options: [ |
| { text: "Not too exciting but reliable and steady", type: "dove" }, |
| { text: "Suspicious & critical of ideas until proven", type: "owl" }, |
| { text: "Wanting to be the center of attention in groups", type: "peacock" }, |
| { text: "Knowing everything and confident in your opinions", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When you go to a party:", |
| options: [ |
| { text: "You look for your friends & talk with them quietly", type: "dove" }, |
| { text: "You look around the room & study others' behaviors", type: "owl" }, |
| { text: "You walk in with excitement & immediately get attention", type: "peacock" }, |
| { text: "You find yourself in intelligent conversation & confident", type: "eagle" } |
| ] |
| }, |
| { |
| question: "If you were planning a group event, would you tend to:", |
| options: [ |
| { text: "Get a general consensus before making decisions", type: "dove" }, |
| { text: "Prefer not to have large events at all", type: "owl" }, |
| { text: "Enjoy the idea but not want to handle the planning", type: "peacock" }, |
| { text: "Pick a date decisively & let it be", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When you go on a trip, do you prefer:", |
| options: [ |
| { text: "A laid back schedule with plenty of relaxation", type: "dove" }, |
| { text: "A detailed plan with everything scheduled", type: "owl" }, |
| { text: "Being spontaneous and going with the flow", type: "peacock" }, |
| { text: "Confident in making decisions without over-planning", type: "eagle" } |
| ] |
| }, |
| { |
| question: "When it comes to meeting new people, do you:", |
| options: [ |
| { text: "Make friends easily by being warm and approachable", type: "dove" }, |
| { text: "Engage in deep conversation to truly understand them", type: "owl" }, |
| { text: "Be demonstrative with your personality and stories", type: "peacock" }, |
| { text: "Be decisive in determining if they're worth your time", type: "eagle" } |
| ] |
| } |
| ]; |
| |
| |
| const typeDescriptions = { |
| dove: { |
| title: "The Dove", |
| description: "You are a peaceful, empathetic, and patient individual who values harmony above all else. As a Dove, you're an excellent listener who naturally mediates conflicts and creates supportive environments. Your calm demeanor helps stabilize those around you, and you're most comfortable when everyone is getting along. While you may avoid confrontation, your ability to understand different perspectives makes you invaluable in team settings. You thrive in cooperative environments where you can help others and work at a steady, comfortable pace.", |
| famous: "Mother Teresa, Fred Rogers, Mahatma Gandhi, Princess Diana", |
| careers: "Counselor, teacher, nurse, human resources, customer service, social worker", |
| color: "blue", |
| icon: "fa-dove" |
| }, |
| owl: { |
| title: "The Owl", |
| description: "You are an analytical, detail-oriented thinker who values accuracy and logic. As an Owl, you have a systematic approach to life and work, preferring to gather all the facts before making decisions. Your perfectionist tendencies mean you produce high-quality work, though you may sometimes get bogged down in details. You excel in roles that require precision and critical thinking, and you're often the one who spots flaws others miss. While you may not be the most expressive emotionally, your reliability and expertise earn you respect.", |
| famous: "Albert Einstein, Marie Curie, Bill Gates, Sherlock Holmes (fictional)", |
| careers: "Scientist, engineer, accountant, researcher, programmer, analyst, quality control", |
| color: "amber", |
| icon: "fa-kiwi-bird" |
| }, |
| peacock: { |
| title: "The Peacock", |
| description: "You are an expressive, enthusiastic, and social individual who loves attention and thrives on interaction. As a Peacock, you're the life of the party with natural charisma that draws people to you. Your optimism and energy are contagious, and you're great at motivating others. While you may sometimes struggle with follow-through or details, your creativity and ability to think outside the box make you invaluable for brainstorming and innovation. You shine in roles that allow you to express yourself and engage with people regularly.", |
| famous: "Oprah Winfrey, Robin Williams, Ellen DeGeneres, Richard Branson", |
| careers: "Sales, marketing, entertainment, public relations, event planning, artist, performer", |
| color: "yellow", |
| icon: "fa-feather-alt" |
| }, |
| eagle: { |
| title: "The Eagle", |
| description: "You are a decisive, goal-driven, and competitive individual who naturally takes charge. As an Eagle, you're focused on results and have little patience for inefficiency or indecision. Your confidence and assertiveness help you overcome obstacles, and you're not afraid to make tough calls. While you may sometimes come across as intense or impatient, your ability to drive projects forward and achieve objectives is unmatched. You excel in leadership roles where you can set the direction and push yourself and others to succeed.", |
| famous: "Steve Jobs, Margaret Thatcher, Serena Williams, Elon Musk", |
| careers: "CEO, entrepreneur, executive, lawyer, athlete, military officer, project manager", |
| color: "red", |
| icon: "fa-crow" |
| } |
| }; |
| |
| |
| let currentQuestion = 0; |
| let answers = []; |
| let scores = { dove: 0, owl: 0, peacock: 0, eagle: 0 }; |
| let darkMode = false; |
| let pieChart = null; |
| |
| |
| const homepage = document.getElementById('homepage'); |
| const assessment = document.getElementById('assessment'); |
| const results = document.getElementById('results'); |
| const startTestBtn = document.getElementById('start-test'); |
| const nextQuestionBtn = document.getElementById('next-question'); |
| const prevQuestionBtn = document.getElementById('prev-question'); |
| const questionText = document.getElementById('question-text'); |
| const questionCounter = document.getElementById('question-counter'); |
| const progressBar = document.getElementById('progress-bar'); |
| const progressPercentage = document.getElementById('progress-percentage'); |
| const optionCards = document.querySelectorAll('.option-card'); |
| const retakeTestBtn = document.getElementById('retake-test'); |
| const learnMoreBtn = document.getElementById('learn-more'); |
| const themeToggleBtn = document.getElementById('theme-toggle'); |
| const downloadBtn = document.getElementById('download-btn'); |
| |
| |
| function init() { |
| |
| startTestBtn.addEventListener('click', startTest); |
| nextQuestionBtn.addEventListener('click', nextQuestion); |
| prevQuestionBtn.addEventListener('click', prevQuestion); |
| retakeTestBtn.addEventListener('click', retakeTest); |
| learnMoreBtn.addEventListener('click', learnMore); |
| themeToggleBtn.addEventListener('click', toggleTheme); |
| downloadBtn.addEventListener('click', downloadResult); |
| |
| |
| optionCards.forEach(card => { |
| card.addEventListener('click', function() { |
| selectOption(this); |
| }); |
| }); |
| |
| |
| if (localStorage.getItem('darkMode') === 'true') { |
| darkMode = true; |
| document.body.classList.add('dark-mode'); |
| themeToggleBtn.innerHTML = '<i class="fas fa-sun text-yellow-400"></i>'; |
| } |
| } |
| |
| |
| function startTest() { |
| homepage.classList.add('hidden'); |
| assessment.classList.remove('hidden'); |
| loadQuestion(currentQuestion); |
| } |
| |
| |
| function loadQuestion(index) { |
| |
| questionCounter.textContent = `Question ${index + 1} of ${questions.length}`; |
| |
| |
| const progress = ((index + 1) / questions.length) * 100; |
| progressBar.style.width = `${progress}%`; |
| progressPercentage.textContent = `${Math.round(progress)}%`; |
| |
| |
| if (index === 0) { |
| prevQuestionBtn.classList.add('hidden'); |
| } else { |
| prevQuestionBtn.classList.remove('hidden'); |
| } |
| |
| |
| if (index === questions.length - 1) { |
| nextQuestionBtn.innerHTML = 'See Results <i class="fas fa-arrow-right ml-2"></i>'; |
| } else { |
| nextQuestionBtn.innerHTML = 'Next <i class="fas fa-arrow-right ml-2"></i>'; |
| } |
| |
| |
| questionText.textContent = questions[index].question; |
| |
| |
| const options = questions[index].options; |
| optionCards.forEach((card, i) => { |
| const textSpan = card.querySelector('span'); |
| |
| |
| textSpan.textContent = options[i].text; |
| |
| |
| card.classList.remove('selected'); |
| if (answers[index] === options[i].type) { |
| card.classList.add('selected'); |
| } |
| |
| |
| const type = options[i].type; |
| if (type === 'dove') { |
| card.className = 'option-card bg-blue-50 border border-blue-100 p-4 rounded-lg cursor-pointer'; |
| if (card.classList.contains('selected')) { |
| card.className = 'option-card bg-blue-100 border border-blue-200 p-4 rounded-lg cursor-pointer selected'; |
| } |
| textSpan.className = 'font-medium text-blue-700'; |
| } else if (type === 'owl') { |
| card.className = 'option-card bg-amber-50 border border-amber-100 p-4 rounded-lg cursor-pointer'; |
| if (card.classList.contains('selected')) { |
| card.className = 'option-card bg-amber-100 border border-amber-200 p-4 rounded-lg cursor-pointer selected'; |
| } |
| textSpan.className = 'font-medium text-amber-700'; |
| } else if (type === 'peacock') { |
| card.className = 'option-card bg-yellow-50 border border-yellow-100 p-4 rounded-lg cursor-pointer'; |
| if (card.classList.contains('selected')) { |
| card.className = 'option-card bg-yellow-100 border border-yellow-200 p-4 rounded-lg cursor-pointer selected'; |
| } |
| textSpan.className = 'font-medium text-yellow-700'; |
| } else if (type === 'eagle') { |
| card.className = 'option-card bg-red-50 border border-red-100 p-4 rounded-lg cursor-pointer'; |
| if (card.classList.contains('selected')) { |
| card.className = 'option-card bg-red-100 border border-red-200 p-4 rounded-lg cursor-pointer selected'; |
| } |
| textSpan.className = 'font-medium text-red-700'; |
| } |
| }); |
| } |
| |
| |
| function selectOption(card) { |
| |
| optionCards.forEach(c => c.classList.remove('selected')); |
| |
| |
| card.classList.add('selected'); |
| |
| |
| const optionIndex = Array.from(optionCards).indexOf(card); |
| answers[currentQuestion] = questions[currentQuestion].options[optionIndex].type; |
| } |
| |
| |
| function nextQuestion() { |
| |
| const selectedOption = document.querySelector('.option-card.selected'); |
| if (!selectedOption && answers[currentQuestion] === undefined) { |
| alert('Please select an option before continuing.'); |
| return; |
| } |
| |
| |
| if (answers[currentQuestion] === undefined) { |
| const optionIndex = Array.from(optionCards).indexOf(selectedOption); |
| answers[currentQuestion] = questions[currentQuestion].options[optionIndex].type; |
| } |
| |
| |
| if (currentQuestion === questions.length - 1) { |
| showResults(); |
| return; |
| } |
| |
| |
| currentQuestion++; |
| loadQuestion(currentQuestion); |
| } |
| |
| |
| function prevQuestion() { |
| if (currentQuestion > 0) { |
| currentQuestion--; |
| loadQuestion(currentQuestion); |
| } |
| } |
| |
| |
| function showResults() { |
| |
| scores = { dove: 0, owl: 0, peacock: 0, eagle: 0 }; |
| answers.forEach(answer => { |
| scores[answer]++; |
| }); |
| |
| |
| let dominantType = 'dove'; |
| let maxScore = scores.dove; |
| |
| if (scores.owl > maxScore) { |
| dominantType = 'owl'; |
| maxScore = scores.owl; |
| } |
| if (scores.peacock > maxScore) { |
| dominantType = 'peacock'; |
| maxScore = scores.peacock; |
| } |
| if (scores.eagle > maxScore) { |
| dominantType = 'eagle'; |
| } |
| |
| |
| const dominant = typeDescriptions[dominantType]; |
| document.getElementById('dominant-title').textContent = dominant.title; |
| document.getElementById('dominant-description').textContent = dominant.description; |
| document.getElementById('famous-title').textContent = dominant.title.split(' ')[1]; |
| document.getElementById('famous-people').textContent = dominant.famous; |
| document.getElementById('career-suggestions').textContent = dominant.careers; |
| |
| |
| const dominantIcon = document.getElementById('dominant-icon-bg'); |
| dominantIcon.className = `rounded-full w-40 h-40 flex items-center justify-center bg-${dominant.color}-100`; |
| document.getElementById('dominant-icon-symbol').className = `fas ${dominant.icon} text-${dominant.color}-500 text-6xl bird-icon`; |
| |
| |
| const totalQuestions = questions.length; |
| const dovePercent = (scores.dove / totalQuestions) * 100; |
| const owlPercent = (scores.owl / totalQuestions) * 100; |
| const peacockPercent = (scores.peacock / totalQuestions) * 100; |
| const eaglePercent = (scores.eagle / totalQuestions) * 100; |
| |
| |
| document.getElementById('dove-percent').textContent = `(${Math.round(dovePercent)}%)`; |
| document.getElementById('owl-percent').textContent = `(${Math.round(owlPercent)}%)`; |
| document.getElementById('peacock-percent').textContent = `(${Math.round(peacockPercent)}%)`; |
| document.getElementById('eagle-percent').textContent = `(${Math.round(eaglePercent)}%)`; |
| |
| |
| document.getElementById('dominant-percentage').textContent = `${Math.round(Math.max(dovePercent, owlPercent, peacockPercent, eaglePercent))}%`; |
| document.getElementById('dominant-type').textContent = dominant.title.split(' ')[1]; |
| |
| |
| const ctx = document.getElementById('pieChart').getContext('2d'); |
| if (pieChart) { |
| pieChart.destroy(); |
| } |
| pieChart = new Chart(ctx, { |
| type: 'pie', |
| data: { |
| labels: ['Dove', 'Owl', 'Peacock', 'Eagle'], |
| datasets: [{ |
| data: [dovePercent, owlPercent, peacockPercent, eaglePercent], |
| backgroundColor: [ |
| '#3b82f6', |
| '#f59e0b', |
| '#eab308', |
| '#ef4444' |
| ], |
| borderWidth: 1 |
| }] |
| }, |
| options: { |
| responsive: true, |
| maintainAspectRatio: false, |
| plugins: { |
| legend: { |
| position: 'bottom', |
| labels: { |
| boxWidth: 15, |
| padding: 20 |
| } |
| } |
| }, |
| cutout: '65%' |
| } |
| }); |
| |
| |
| assessment.classList.add('hidden'); |
| results.classList.remove('hidden'); |
| |
| |
| window.scrollTo(0, 0); |
| } |
| |
| |
| function retakeTest() { |
| |
| currentQuestion = 0; |
| answers = []; |
| scores = { dove: 0, owl: 0, peacock: 0, eagle: 0 }; |
| |
| |
| results.classList.add('hidden'); |
| assessment.classList.remove('hidden'); |
| |
| |
| loadQuestion(currentQuestion); |
| } |
| |
| |
| function learnMore() { |
| alert('The DOPE personality test is based on the DISC theory of personality, using four bird types to represent different behavioral styles. This assessment helps individuals understand their natural tendencies and how they interact with others.'); |
| } |
| |
| |
| function toggleTheme() { |
| darkMode = !darkMode; |
| |
| if (darkMode) { |
| document.body.classList.add('dark-mode'); |
| themeToggleBtn.innerHTML = '<i class="fas fa-sun text-yellow-400"></i>'; |
| localStorage.setItem('darkMode', 'true'); |
| } else { |
| document.body.classList.remove('dark-mode'); |
| themeToggleBtn.innerHTML = '<i class="fas fa-moon text-gray-600"></i>'; |
| localStorage.setItem('darkMode', 'false'); |
| } |
| } |
| |
| |
| function downloadResult() { |
| const resultCard = document.getElementById('result-card'); |
| |
| |
| const watermark = document.createElement('div'); |
| watermark.style.position = 'absolute'; |
| watermark.style.bottom = '10px'; |
| watermark.style.right = '10px'; |
| watermark.style.color = '#888'; |
| watermark.style.fontSize = '12px'; |
| watermark.textContent = 'niftytechfinds.com'; |
| resultCard.appendChild(watermark); |
| |
| html2canvas(resultCard, { |
| scale: 2, |
| logging: false, |
| useCORS: true, |
| allowTaint: true |
| }).then(canvas => { |
| |
| resultCard.removeChild(watermark); |
| |
| |
| const link = document.createElement('a'); |
| link.download = 'personality-profile.jpg'; |
| link.href = canvas.toDataURL('image/jpeg', 0.9); |
| link.click(); |
| }); |
| } |
| |
| |
| document.addEventListener('DOMContentLoaded', init); |
| </script> |
| </body> |
| </html> |