-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
145 lines (145 loc) · 7.25 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Dark Triad Assessments</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="Comprehensive Dark Triad and Dark Tetrad personality assessments with scientific background"/>
<link rel="stylesheet" href="styles.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.1/dist/chart.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/9.5.1/math.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dayjs@1.10.7/dayjs.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstat/1.9.5/jstat.min.js"></script>
</head>
<body>
<div id="intro">
<h1>Welcome to Dark Triad Assessments</h1>
<p>Explore the darker aspects of personality through scientifically validated assessments</p>
</div>
<div id="darkModeToggleContainer">
<button id="darkModeToggle" aria-label="Toggle Dark Mode">🌙 Dark Mode</button>
</div>
<div id="content">
<header>
<h1>Dark Triad Assessments</h1>
<button id="menuToggle" aria-label="Toggle Menu">☰</button>
</header>
<nav id="mainNav">
<ul>
<li><a href="#assessments">Assessments</a></li>
<li><a href="#literature">Literature Review</a></li>
<li><a href="#background">Background & History</a></li>
<li><a href="#psychometric">Psychometric Calculator</a></li>
<li><a href="#stroopTask">Stroop Task</a></li>
</ul>
</nav>
<main>
<section id="assessments">
<article id="sdt3" class="assessment">
<h2>Short Dark Triad (SD3)</h2>
<p>Assesses Machiavellianism, Narcissism, and Psychopathy (Jones & Paulhus, 2014).</p>
<button onclick="startAssessment('sd3')">Start SD3 Assessment</button>
</article>
<article id="dirtyDozen" class="assessment">
<h2>Dirty Dozen</h2>
<p>A concise measure of the Dark Triad traits (Jonason & Webster, 2010).</p>
<button onclick="startAssessment('dirtyDozen')">Start Dirty Dozen Assessment</button>
</article>
<article id="sd4" class="assessment">
<h2>Short Dark Tetrad (SD4)</h2>
<p>Assesses Machiavellianism, Narcissism, Psychopathy, and Sadism (Paulhus et al., 2020).</p>
<button onclick="startAssessment('sd4')">Start SD4 Assessment</button>
</article>
<article id="machIV" class="assessment">
<h2>MACH-IV</h2>
<p>Measures Machiavellianism in interpersonal relationships (Christie & Geis, 1970).</p>
<button onclick="startAssessment('machIV')">Start MACH-IV Assessment</button>
</article>
<article id="npi" class="assessment">
<h2>Narcissistic Personality Inventory (NPI-40)</h2>
<p>Measures narcissistic personality traits (Raskin & Terry, 1988).</p>
<button onclick="startAssessment('npi')">Start NPI-40 Assessment</button>
</article>
<article id="srps" class="assessment">
<h2>Self-Report Psychopathy Scale (SRP-III)</h2>
<p>Assesses psychopathic traits in non-clinical populations (Paulhus et al., 2016).</p>
<button onclick="startAssessment('srps')">Start SRP-III Assessment</button>
</article>
<article id="hexaco" class="assessment">
<h2>HEXACO-60</h2>
<p>Evaluates six major dimensions of personality, including the Dark Triad-relevant Honesty-Humility factor (Ashton & Lee, 2009).</p>
<button onclick="startAssessment('hexaco')">Start HEXACO-60 Assessment</button>
</article>
</section>
<div id="progressBarContainer" class="hidden">
<div id="progressBar"></div>
</div>
<section id="assessmentQuestions" class="hidden"></section>
<section id="results" class="hidden"></section>
<canvas id="resultsChart" class="hidden"></canvas>
<section id="psychometric" class="hidden">
<h2>Psychometric Calculator</h2>
<!-- Content will be populated by JavaScript -->
</section>
<section id="stroopTask" class="hidden">
<h2>Stroop Task</h2>
<div id="stroopInstructions">
<p>Name the <strong>color</strong> of the word, not the word itself.</p>
<p>This task measures cognitive flexibility and inhibition, which may relate to Dark Triad traits.</p>
<button onclick="startStroopTask()">Start Task</button>
</div>
<div id="stroopGame" class="hidden">
<div id="stroopWord"></div>
<div id="stroopButtons"></div>
<div id="stroopProgress"></div>
</div>
<div id="stroopResults" class="hidden">
<h3>Results</h3>
<p>Accuracy: <span id="stroopAccuracy"></span></p>
<p>Average Response Time: <span id="stroopAvgTime"></span></p>
<button onclick="resetStroopTask()">Try Again</button>
</div>
</section>
<section id="background" class="hidden">
<!-- Content will be populated by JavaScript -->
</section>
<section id="literature" class="hidden">
<h2>Literature Review</h2>
<div id="literatureContent">
<!-- Content will be dynamically populated by JavaScript -->
</div>
<ul id="literatureList">
<!-- List items will be dynamically added by JavaScript -->
</ul>
</section>
</main>
<footer>
<button id="showScientificArticles">Scientific Articles</button>
</footer>
</div>
<div id="articlesModal" class="modal hidden">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Scientific Articles</h2>
<ul id="articlesList"></ul>
</div>
</div>
<div id="interpretationModal" class="modal hidden">
<div class="modal-content">
<span class="close" onclick="closeInterpretationModal()">×</span>
<h2>Detailed Interpretation</h2>
<div id="interpretationContent"></div>
</div>
</div>
<div id="citationsModal" class="modal hidden">
<div class="modal-content">
<span class="close" onclick="closeCitationsModal()">×</span>
<h2>Citations</h2>
<ul id="citationsList"></ul>
</div>
</div>
<div id="menuStateAnnouncement" class="sr-only" aria-live="polite"></div>
<script src="script.js"></script>
</body>
</html>