File size: 49,442 Bytes
03fed26 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 | <!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">
<!-- Navigation -->
<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>
<!-- Main Content -->
<div id="app" class="w-full px-4 py-8">
<!-- Homepage -->
<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>
<!-- Assessment Page -->
<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>
<!-- Results Page -->
<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 -->
<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>
// Personality test questions
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" }
]
}
];
// Personality type descriptions
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"
}
};
// App state
let currentQuestion = 0;
let answers = [];
let scores = { dove: 0, owl: 0, peacock: 0, eagle: 0 };
let darkMode = false;
let pieChart = null;
// DOM elements
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');
// Initialize the app
function init() {
// Set up event listeners
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);
// Set up option card selection
optionCards.forEach(card => {
card.addEventListener('click', function() {
selectOption(this);
});
});
// Check for saved dark mode preference
if (localStorage.getItem('darkMode') === 'true') {
darkMode = true;
document.body.classList.add('dark-mode');
themeToggleBtn.innerHTML = '<i class="fas fa-sun text-yellow-400"></i>';
}
}
// Start the test
function startTest() {
homepage.classList.add('hidden');
assessment.classList.remove('hidden');
loadQuestion(currentQuestion);
}
// Load a question
function loadQuestion(index) {
// Update question counter
questionCounter.textContent = `Question ${index + 1} of ${questions.length}`;
// Update progress bar
const progress = ((index + 1) / questions.length) * 100;
progressBar.style.width = `${progress}%`;
progressPercentage.textContent = `${Math.round(progress)}%`;
// Show/hide previous button
if (index === 0) {
prevQuestionBtn.classList.add('hidden');
} else {
prevQuestionBtn.classList.remove('hidden');
}
// Update next button text for last question
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>';
}
// Load question text
questionText.textContent = questions[index].question;
// Load options
const options = questions[index].options;
optionCards.forEach((card, i) => {
const textSpan = card.querySelector('span');
// Set option text
textSpan.textContent = options[i].text;
// Reset selection state
card.classList.remove('selected');
if (answers[index] === options[i].type) {
card.classList.add('selected');
}
// Set colors based on type
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';
}
});
}
// Select an option
function selectOption(card) {
// Remove selected class from all options
optionCards.forEach(c => c.classList.remove('selected'));
// Add selected class to clicked option
card.classList.add('selected');
// Save the answer
const optionIndex = Array.from(optionCards).indexOf(card);
answers[currentQuestion] = questions[currentQuestion].options[optionIndex].type;
}
// Go to next question
function nextQuestion() {
// Check if an option is selected
const selectedOption = document.querySelector('.option-card.selected');
if (!selectedOption && answers[currentQuestion] === undefined) {
alert('Please select an option before continuing.');
return;
}
// Save answer if not already saved
if (answers[currentQuestion] === undefined) {
const optionIndex = Array.from(optionCards).indexOf(selectedOption);
answers[currentQuestion] = questions[currentQuestion].options[optionIndex].type;
}
// If last question, show results
if (currentQuestion === questions.length - 1) {
showResults();
return;
}
// Go to next question
currentQuestion++;
loadQuestion(currentQuestion);
}
// Go to previous question
function prevQuestion() {
if (currentQuestion > 0) {
currentQuestion--;
loadQuestion(currentQuestion);
}
}
// Calculate and show results
function showResults() {
// Calculate scores
scores = { dove: 0, owl: 0, peacock: 0, eagle: 0 };
answers.forEach(answer => {
scores[answer]++;
});
// Find dominant type
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';
}
// Update results page with dominant type
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;
// Update dominant icon
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`;
// Calculate percentages
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;
// Update percentage text
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)}%)`;
// Update center text in pie chart
document.getElementById('dominant-percentage').textContent = `${Math.round(Math.max(dovePercent, owlPercent, peacockPercent, eaglePercent))}%`;
document.getElementById('dominant-type').textContent = dominant.title.split(' ')[1];
// Create pie chart
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', // blue-500
'#f59e0b', // amber-500
'#eab308', // yellow-500
'#ef4444' // red-500
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'bottom',
labels: {
boxWidth: 15,
padding: 20
}
}
},
cutout: '65%'
}
});
// Show results page
assessment.classList.add('hidden');
results.classList.remove('hidden');
// Scroll to top
window.scrollTo(0, 0);
}
// Retake the test
function retakeTest() {
// Reset state
currentQuestion = 0;
answers = [];
scores = { dove: 0, owl: 0, peacock: 0, eagle: 0 };
// Show assessment page
results.classList.add('hidden');
assessment.classList.remove('hidden');
// Load first question
loadQuestion(currentQuestion);
}
// Learn more about the test
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.');
}
// Toggle dark/light theme
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');
}
}
// Download result as JPG
function downloadResult() {
const resultCard = document.getElementById('result-card');
// Add watermark
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 => {
// Remove watermark after capture
resultCard.removeChild(watermark);
// Convert canvas to JPG and download
const link = document.createElement('a');
link.download = 'personality-profile.jpg';
link.href = canvas.toDataURL('image/jpeg', 0.9);
link.click();
});
}
// Initialize the app when DOM is loaded
document.addEventListener('DOMContentLoaded', init);
</script>
</body>
</html> |