undefined - Initial Deployment
Browse files- README.md +6 -4
- index.html +1054 -18
- prompts.txt +0 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: persona
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,1055 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Free Personality Test | Persona</title>
|
| 7 |
+
<meta name="description" content="Take our free personality test and get a detailed report of your personality type. Understand your strengths and weaknesses.">
|
| 8 |
+
|
| 9 |
+
<!-- Social Media Meta Tags -->
|
| 10 |
+
<meta property="og:title" content="Free Personality Test | Persona">
|
| 11 |
+
<meta property="og:description" content="Discover your personality type with our free, in-depth test.">
|
| 12 |
+
<meta property="og:url" content="https://your-website.com">
|
| 13 |
+
<meta name="twitter:card" content="summary_large_image">
|
| 14 |
+
|
| 15 |
+
<!-- Fonts and Icons -->
|
| 16 |
+
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🧠</text></svg>">
|
| 17 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 18 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 19 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
|
| 20 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
| 21 |
+
|
| 22 |
+
<!-- PDF Generation Library -->
|
| 23 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
|
| 24 |
+
|
| 25 |
+
<style>
|
| 26 |
+
/* --- General Setup & Variables --- */
|
| 27 |
+
:root {
|
| 28 |
+
--primary-color: #6a11cb;
|
| 29 |
+
--secondary-color: #2575fc;
|
| 30 |
+
--background-color: #f4f7f6;
|
| 31 |
+
--text-color: #333;
|
| 32 |
+
--card-bg: #ffffff;
|
| 33 |
+
--shadow: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.1);
|
| 34 |
+
--border-radius: 16px; /* 2xl */
|
| 35 |
+
--font-family: 'Poppins', sans-serif;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
[data-theme="dark"] {
|
| 39 |
+
--primary-color: #8e44ad;
|
| 40 |
+
--secondary-color: #3498db;
|
| 41 |
+
--background-color: #121212;
|
| 42 |
+
--text-color: #f4f7f6;
|
| 43 |
+
--card-bg: #1e1e1e;
|
| 44 |
+
--shadow: 0 10px 20px rgba(0,0,0,0.3), 0 6px 6px rgba(0,0,0,0.3);
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
* {
|
| 48 |
+
box-sizing: border-box;
|
| 49 |
+
margin: 0;
|
| 50 |
+
padding: 0;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
body {
|
| 54 |
+
font-family: var(--font-family);
|
| 55 |
+
background-color: var(--background-color);
|
| 56 |
+
color: var(--text-color);
|
| 57 |
+
transition: background-color 0.3s, color 0.3s;
|
| 58 |
+
line-height: 1.6;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
/* --- Page Transitions --- */
|
| 62 |
+
@keyframes fadeIn {
|
| 63 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 64 |
+
to { opacity: 1; transform: translateY(0); }
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
main {
|
| 68 |
+
animation: fadeIn 0.5s ease-in-out;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.page {
|
| 72 |
+
display: none;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.page.active {
|
| 76 |
+
display: block;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
/* --- Header & Navigation --- */
|
| 80 |
+
header {
|
| 81 |
+
padding: 1rem 5%;
|
| 82 |
+
background: var(--card-bg);
|
| 83 |
+
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
| 84 |
+
position: sticky;
|
| 85 |
+
top: 0;
|
| 86 |
+
z-index: 100;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
nav {
|
| 90 |
+
display: flex;
|
| 91 |
+
justify-content: space-between;
|
| 92 |
+
align-items: center;
|
| 93 |
+
max-width: 1200px;
|
| 94 |
+
margin: 0 auto;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.logo {
|
| 98 |
+
font-size: 1.5rem;
|
| 99 |
+
font-weight: 700;
|
| 100 |
+
background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
|
| 101 |
+
-webkit-background-clip: text;
|
| 102 |
+
-webkit-text-fill-color: transparent;
|
| 103 |
+
cursor: pointer;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
#theme-toggle {
|
| 107 |
+
background: none;
|
| 108 |
+
border: none;
|
| 109 |
+
font-size: 1.5rem;
|
| 110 |
+
cursor: pointer;
|
| 111 |
+
color: var(--text-color);
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
/* --- Name Input Section --- */
|
| 115 |
+
#name-input-section {
|
| 116 |
+
display: flex;
|
| 117 |
+
flex-direction: column;
|
| 118 |
+
justify-content: center;
|
| 119 |
+
align-items: center;
|
| 120 |
+
min-height: 80vh;
|
| 121 |
+
text-align: center;
|
| 122 |
+
padding: 2rem;
|
| 123 |
+
}
|
| 124 |
+
#name-input-section h1 {
|
| 125 |
+
font-size: 2.5rem;
|
| 126 |
+
margin-bottom: 1rem;
|
| 127 |
+
}
|
| 128 |
+
#name-input-section p {
|
| 129 |
+
font-size: 1.2rem;
|
| 130 |
+
max-width: 500px;
|
| 131 |
+
margin-bottom: 2rem;
|
| 132 |
+
opacity: 0.8;
|
| 133 |
+
}
|
| 134 |
+
#name-input {
|
| 135 |
+
font-size: 1.2rem;
|
| 136 |
+
padding: 0.8rem;
|
| 137 |
+
border-radius: 8px;
|
| 138 |
+
border: 2px solid #ddd;
|
| 139 |
+
margin-bottom: 1rem;
|
| 140 |
+
width: 100%;
|
| 141 |
+
max-width: 400px;
|
| 142 |
+
text-align: center;
|
| 143 |
+
background-color: var(--card-bg);
|
| 144 |
+
color: var(--text-color);
|
| 145 |
+
}
|
| 146 |
+
#start-btn {
|
| 147 |
+
padding: 1rem 2.5rem;
|
| 148 |
+
font-size: 1.1rem;
|
| 149 |
+
font-weight: 600;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
/* --- Hero Section --- */
|
| 153 |
+
.hero {
|
| 154 |
+
display: flex;
|
| 155 |
+
align-items: center;
|
| 156 |
+
justify-content: center;
|
| 157 |
+
text-align: center;
|
| 158 |
+
padding: 4rem 2rem;
|
| 159 |
+
background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
|
| 160 |
+
color: #fff;
|
| 161 |
+
min-height: 70vh;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.hero-container {
|
| 165 |
+
display: flex;
|
| 166 |
+
align-items: center;
|
| 167 |
+
justify-content: center;
|
| 168 |
+
gap: 2rem;
|
| 169 |
+
max-width: 1200px;
|
| 170 |
+
flex-wrap: wrap-reverse; /* Image appears below on small screens */
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.hero-content {
|
| 174 |
+
max-width: 600px;
|
| 175 |
+
text-align: left;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.hero-content h1 {
|
| 179 |
+
font-size: 3.5rem;
|
| 180 |
+
margin-bottom: 1rem;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
.hero-content p {
|
| 185 |
+
font-size: 1.2rem;
|
| 186 |
+
margin: 0 0 2rem;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.hero-image img {
|
| 190 |
+
width: 300px;
|
| 191 |
+
height: 300px;
|
| 192 |
+
border-radius: 50%;
|
| 193 |
+
object-fit: cover;
|
| 194 |
+
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
| 195 |
+
animation: float 6s ease-in-out infinite;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
@keyframes float {
|
| 199 |
+
0% { transform: translateY(0px); }
|
| 200 |
+
50% { transform: translateY(-20px); }
|
| 201 |
+
100% { transform: translateY(0px); }
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.cta-button {
|
| 205 |
+
display: inline-block;
|
| 206 |
+
padding: 1rem 2.5rem;
|
| 207 |
+
background-color: #fff;
|
| 208 |
+
color: var(--primary-color);
|
| 209 |
+
border: none;
|
| 210 |
+
border-radius: 50px;
|
| 211 |
+
font-size: 1.1rem;
|
| 212 |
+
font-weight: 600;
|
| 213 |
+
text-decoration: none;
|
| 214 |
+
transition: transform 0.3s, box-shadow 0.3s;
|
| 215 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
|
| 216 |
+
cursor: pointer;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.cta-button:hover {
|
| 220 |
+
transform: translateY(-5px);
|
| 221 |
+
box-shadow: 0 8px 25px rgba(0,0,0,0.3);
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
.small-text {
|
| 225 |
+
margin-top: 1rem;
|
| 226 |
+
font-size: 0.9rem;
|
| 227 |
+
opacity: 0.8;
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
/* --- Personality Types Section --- */
|
| 231 |
+
.types-section {
|
| 232 |
+
padding: 4rem 5%;
|
| 233 |
+
text-align: center;
|
| 234 |
+
max-width: 1200px;
|
| 235 |
+
margin: 0 auto;
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
.types-section h2 {
|
| 239 |
+
font-size: 2.5rem;
|
| 240 |
+
margin-bottom: 3rem;
|
| 241 |
+
color: var(--text-color);
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
.types-grid {
|
| 245 |
+
display: grid;
|
| 246 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 247 |
+
gap: 1.5rem;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
.type-card {
|
| 251 |
+
background: var(--card-bg);
|
| 252 |
+
border-radius: var(--border-radius);
|
| 253 |
+
padding: 2rem;
|
| 254 |
+
box-shadow: var(--shadow);
|
| 255 |
+
cursor: pointer;
|
| 256 |
+
transition: transform 0.3s, box-shadow 0.3s;
|
| 257 |
+
border-left: 5px solid var(--primary-color);
|
| 258 |
+
text-align: center;
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
.type-card .icon {
|
| 262 |
+
font-size: 2.5rem;
|
| 263 |
+
color: var(--primary-color);
|
| 264 |
+
margin-bottom: 1rem;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
.type-card:hover {
|
| 268 |
+
transform: translateY(-10px);
|
| 269 |
+
box-shadow: 0 15px 30px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.1);
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
.type-card h3 {
|
| 273 |
+
font-size: 1.5rem;
|
| 274 |
+
color: var(--primary-color);
|
| 275 |
+
margin-bottom: 0.5rem;
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
.type-card h4 {
|
| 279 |
+
font-size: 1rem;
|
| 280 |
+
font-weight: 600;
|
| 281 |
+
margin-bottom: 1rem;
|
| 282 |
+
color: var(--text-color);
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
.type-card p {
|
| 286 |
+
font-size: 0.9rem;
|
| 287 |
+
color: var(--text-color);
|
| 288 |
+
opacity: 0.8;
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
/* --- Modal --- */
|
| 292 |
+
.modal {
|
| 293 |
+
display: none;
|
| 294 |
+
position: fixed;
|
| 295 |
+
z-index: 1001;
|
| 296 |
+
left: 0;
|
| 297 |
+
top: 0;
|
| 298 |
+
width: 100%;
|
| 299 |
+
height: 100%;
|
| 300 |
+
overflow: auto;
|
| 301 |
+
background-color: rgba(0,0,0,0.6);
|
| 302 |
+
animation: fadeIn 0.3s;
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
.modal-content {
|
| 306 |
+
background-color: var(--card-bg);
|
| 307 |
+
margin: 10% auto;
|
| 308 |
+
padding: 2rem;
|
| 309 |
+
border-radius: var(--border-radius);
|
| 310 |
+
width: 80%;
|
| 311 |
+
max-width: 700px;
|
| 312 |
+
position: relative;
|
| 313 |
+
box-shadow: 0 20px 40px rgba(0,0,0,0.4);
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
.close-button {
|
| 317 |
+
color: #aaa;
|
| 318 |
+
float: right;
|
| 319 |
+
font-size: 28px;
|
| 320 |
+
font-weight: bold;
|
| 321 |
+
cursor: pointer;
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
.close-button:hover,
|
| 325 |
+
.close-button:focus {
|
| 326 |
+
color: black;
|
| 327 |
+
text-decoration: none;
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
#modal-body h3 {
|
| 331 |
+
color: var(--primary-color);
|
| 332 |
+
font-size: 2rem;
|
| 333 |
+
margin-bottom: 1rem;
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
/* --- Test Page --- */
|
| 337 |
+
.test-main {
|
| 338 |
+
max-width: 800px;
|
| 339 |
+
margin: 2rem auto;
|
| 340 |
+
padding: 0 1rem;
|
| 341 |
+
}
|
| 342 |
+
|
| 343 |
+
.progress-container {
|
| 344 |
+
width: 100%;
|
| 345 |
+
background-color: #e0e0e0;
|
| 346 |
+
border-radius: 50px;
|
| 347 |
+
margin-bottom: 2rem;
|
| 348 |
+
overflow: hidden;
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
+
.progress-bar {
|
| 352 |
+
width: 0%;
|
| 353 |
+
height: 15px;
|
| 354 |
+
background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
|
| 355 |
+
border-radius: 50px;
|
| 356 |
+
transition: width 0.4s ease-in-out;
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
.test-container {
|
| 360 |
+
background: var(--card-bg);
|
| 361 |
+
padding: 2.5rem;
|
| 362 |
+
border-radius: var(--border-radius);
|
| 363 |
+
box-shadow: var(--shadow);
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
.question-block {
|
| 367 |
+
text-align: center;
|
| 368 |
+
margin-bottom: 2rem;
|
| 369 |
+
animation: fadeIn 0.5s;
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
.question-block h2 {
|
| 373 |
+
font-size: 1.8rem;
|
| 374 |
+
margin-bottom: 2rem;
|
| 375 |
+
line-height: 1.4;
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
.options {
|
| 379 |
+
display: flex;
|
| 380 |
+
justify-content: space-between;
|
| 381 |
+
align-items: center;
|
| 382 |
+
margin: 0 auto;
|
| 383 |
+
max-width: 500px;
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
.options span {
|
| 387 |
+
font-weight: 600;
|
| 388 |
+
padding: 0 0.5rem;
|
| 389 |
+
color: var(--text-color);
|
| 390 |
+
opacity: 0.7;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
input[type="range"] {
|
| 394 |
+
-webkit-appearance: none;
|
| 395 |
+
width: 100%;
|
| 396 |
+
height: 8px;
|
| 397 |
+
background: #ddd;
|
| 398 |
+
border-radius: 5px;
|
| 399 |
+
outline: none;
|
| 400 |
+
margin: 0 1rem;
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
input[type="range"]::-webkit-slider-thumb {
|
| 404 |
+
-webkit-appearance: none;
|
| 405 |
+
appearance: none;
|
| 406 |
+
width: 24px;
|
| 407 |
+
height: 24px;
|
| 408 |
+
background: var(--secondary-color);
|
| 409 |
+
cursor: pointer;
|
| 410 |
+
border-radius: 50%;
|
| 411 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.2);
|
| 412 |
+
transition: background-color 0.2s;
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
input[type="range"]::-webkit-slider-thumb:hover {
|
| 416 |
+
background-color: var(--primary-color);
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
input[type="range"]::-moz-range-thumb {
|
| 420 |
+
width: 24px;
|
| 421 |
+
height: 24px;
|
| 422 |
+
background: var(--secondary-color);
|
| 423 |
+
cursor: pointer;
|
| 424 |
+
border-radius: 50%;
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
.navigation-buttons {
|
| 428 |
+
display: flex;
|
| 429 |
+
justify-content: space-between;
|
| 430 |
+
margin-top: 2rem;
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
.nav-button {
|
| 434 |
+
padding: 0.8rem 2rem;
|
| 435 |
+
border: 2px solid var(--primary-color);
|
| 436 |
+
border-radius: 50px;
|
| 437 |
+
background-color: var(--primary-color);
|
| 438 |
+
color: #fff;
|
| 439 |
+
font-size: 1rem;
|
| 440 |
+
font-weight: 600;
|
| 441 |
+
cursor: pointer;
|
| 442 |
+
transition: all 0.3s;
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
.nav-button:hover:not(:disabled) {
|
| 446 |
+
background-color: var(--secondary-color);
|
| 447 |
+
border-color: var(--secondary-color);
|
| 448 |
+
transform: translateY(-3px);
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
.nav-button:disabled {
|
| 452 |
+
background-color: #ccc;
|
| 453 |
+
border-color: #ccc;
|
| 454 |
+
cursor: not-allowed;
|
| 455 |
+
transform: none;
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
/* --- Results Page --- */
|
| 459 |
+
.results-main {
|
| 460 |
+
padding: 2rem 1rem;
|
| 461 |
+
text-align: center;
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
.result-card {
|
| 465 |
+
background: var(--card-bg);
|
| 466 |
+
max-width: 700px;
|
| 467 |
+
margin: 2rem auto;
|
| 468 |
+
padding: 3rem;
|
| 469 |
+
border-radius: var(--border-radius);
|
| 470 |
+
box-shadow: var(--shadow);
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
#result-type {
|
| 474 |
+
font-size: 3rem;
|
| 475 |
+
font-weight: 700;
|
| 476 |
+
color: var(--primary-color);
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
#result-title {
|
| 480 |
+
font-size: 1.5rem;
|
| 481 |
+
margin-bottom: 1.5rem;
|
| 482 |
+
}
|
| 483 |
+
|
| 484 |
+
#result-summary {
|
| 485 |
+
font-size: 1.1rem;
|
| 486 |
+
margin-bottom: 2rem;
|
| 487 |
+
}
|
| 488 |
+
|
| 489 |
+
.result-actions {
|
| 490 |
+
display: flex;
|
| 491 |
+
justify-content: center;
|
| 492 |
+
gap: 1rem;
|
| 493 |
+
flex-wrap: wrap;
|
| 494 |
+
}
|
| 495 |
+
|
| 496 |
+
.action-button {
|
| 497 |
+
padding: 0.8rem 1.5rem;
|
| 498 |
+
border: none;
|
| 499 |
+
border-radius: 50px;
|
| 500 |
+
font-size: 1rem;
|
| 501 |
+
cursor: pointer;
|
| 502 |
+
transition: all 0.3s;
|
| 503 |
+
background-color: var(--primary-color);
|
| 504 |
+
color: #fff;
|
| 505 |
+
font-weight: 600;
|
| 506 |
+
}
|
| 507 |
+
|
| 508 |
+
.action-button:hover {
|
| 509 |
+
transform: translateY(-3px);
|
| 510 |
+
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
.action-button.secondary {
|
| 514 |
+
background-color: transparent;
|
| 515 |
+
border: 2px solid var(--primary-color);
|
| 516 |
+
color: var(--primary-color);
|
| 517 |
+
}
|
| 518 |
+
|
| 519 |
+
.action-button.secondary:hover {
|
| 520 |
+
background-color: var(--primary-color);
|
| 521 |
+
color: #fff;
|
| 522 |
+
}
|
| 523 |
+
|
| 524 |
+
.result-details-section {
|
| 525 |
+
max-width: 800px;
|
| 526 |
+
margin: 2rem auto;
|
| 527 |
+
padding: 2rem;
|
| 528 |
+
text-align: left;
|
| 529 |
+
background: var(--card-bg);
|
| 530 |
+
border-radius: var(--border-radius);
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
.result-details-section h3 {
|
| 534 |
+
color: var(--primary-color);
|
| 535 |
+
margin-top: 1.5rem;
|
| 536 |
+
margin-bottom: 0.5rem;
|
| 537 |
+
font-size: 1.5rem;
|
| 538 |
+
}
|
| 539 |
+
|
| 540 |
+
.result-details-section p {
|
| 541 |
+
margin-bottom: 1rem;
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
/* --- Footer --- */
|
| 545 |
+
footer {
|
| 546 |
+
text-align: center;
|
| 547 |
+
padding: 2rem 1rem;
|
| 548 |
+
margin-top: 2rem;
|
| 549 |
+
opacity: 0.7;
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
/* --- Responsive Design --- */
|
| 553 |
+
@media (max-width: 768px) {
|
| 554 |
+
.hero-content h1 {
|
| 555 |
+
font-size: 2.5rem;
|
| 556 |
+
}
|
| 557 |
+
.hero-container {
|
| 558 |
+
gap: 1rem;
|
| 559 |
+
}
|
| 560 |
+
.hero-content {
|
| 561 |
+
text-align: center;
|
| 562 |
+
}
|
| 563 |
+
.hero-content p {
|
| 564 |
+
font-size: 1rem;
|
| 565 |
+
}
|
| 566 |
+
.hero-image img {
|
| 567 |
+
width: 200px;
|
| 568 |
+
height: 200px;
|
| 569 |
+
}
|
| 570 |
+
.types-section h2 {
|
| 571 |
+
font-size: 2rem;
|
| 572 |
+
}
|
| 573 |
+
.modal-content {
|
| 574 |
+
width: 90%;
|
| 575 |
+
margin: 20% auto;
|
| 576 |
+
}
|
| 577 |
+
.test-container {
|
| 578 |
+
padding: 1.5rem;
|
| 579 |
+
}
|
| 580 |
+
.question-block h2 {
|
| 581 |
+
font-size: 1.5rem;
|
| 582 |
+
}
|
| 583 |
+
.options {
|
| 584 |
+
flex-direction: column;
|
| 585 |
+
}
|
| 586 |
+
input[type="range"] {
|
| 587 |
+
margin: 1rem 0;
|
| 588 |
+
}
|
| 589 |
+
}
|
| 590 |
+
</style>
|
| 591 |
+
</head>
|
| 592 |
+
<body>
|
| 593 |
+
|
| 594 |
+
<header>
|
| 595 |
+
<nav>
|
| 596 |
+
<div class="logo">Persona</div>
|
| 597 |
+
<div class="theme-switcher">
|
| 598 |
+
<button id="theme-toggle">🌙</button>
|
| 599 |
+
</div>
|
| 600 |
+
</nav>
|
| 601 |
+
</header>
|
| 602 |
+
|
| 603 |
+
<main>
|
| 604 |
+
<!-- Home Page -->
|
| 605 |
+
<div id="home-page" class="page active">
|
| 606 |
+
<section id="name-input-section">
|
| 607 |
+
<h1>Welcome to Persona</h1>
|
| 608 |
+
<p>Let's start your journey of self-discovery. First, what should we call you?</p>
|
| 609 |
+
<input type="text" id="name-input" placeholder="Enter your name">
|
| 610 |
+
<button id="start-btn" class="cta-button">Start Discovery</button>
|
| 611 |
+
</section>
|
| 612 |
+
|
| 613 |
+
<div id="main-content" style="display: none;">
|
| 614 |
+
<section class="hero">
|
| 615 |
+
<div class="hero-container">
|
| 616 |
+
<div class="hero-content">
|
| 617 |
+
<h1 id="hero-title">Discover Yourself</h1>
|
| 618 |
+
<p>Uncover your true potential. Our scientifically validated personality test will help you understand your strengths, weaknesses, and how you interact with the world.</p>
|
| 619 |
+
<button id="take-test-btn" class="cta-button">Take the Test →</button>
|
| 620 |
+
<p class="small-text">Takes less than 12 minutes.</p>
|
| 621 |
+
</div>
|
| 622 |
+
<div class="hero-image">
|
| 623 |
+
<img src="https://placehold.co/400x400/6a11cb/ffffff?text=Persona" alt="Abstract representation of a personality">
|
| 624 |
+
</div>
|
| 625 |
+
</div>
|
| 626 |
+
</section>
|
| 627 |
+
|
| 628 |
+
<section id="personality-types" class="types-section">
|
| 629 |
+
<h2><i class="fas fa-users"></i> The 16 Personality Types</h2>
|
| 630 |
+
<div class="types-grid" id="types-grid">
|
| 631 |
+
<!-- Personality cards will be injected by JavaScript -->
|
| 632 |
+
</div>
|
| 633 |
+
</section>
|
| 634 |
+
</div>
|
| 635 |
+
</div>
|
| 636 |
+
|
| 637 |
+
<!-- Test Page -->
|
| 638 |
+
<div id="test-page" class="page">
|
| 639 |
+
<div class="test-main">
|
| 640 |
+
<div class="progress-container">
|
| 641 |
+
<div class="progress-bar" id="progress-bar"></div>
|
| 642 |
+
</div>
|
| 643 |
+
|
| 644 |
+
<div class="test-container">
|
| 645 |
+
<div id="question-container" class="question-block">
|
| 646 |
+
<!-- Question content will be injected by JavaScript -->
|
| 647 |
+
</div>
|
| 648 |
+
|
| 649 |
+
<div class="navigation-buttons">
|
| 650 |
+
<button id="prev-btn" class="nav-button" disabled>Previous</button>
|
| 651 |
+
<button id="next-btn" class="nav-button">Next</button>
|
| 652 |
+
</div>
|
| 653 |
+
</div>
|
| 654 |
+
</div>
|
| 655 |
+
</div>
|
| 656 |
+
|
| 657 |
+
<!-- Results Page -->
|
| 658 |
+
<div id="results-page" class="page">
|
| 659 |
+
<div class="results-main">
|
| 660 |
+
<div id="result-content" class="result-card">
|
| 661 |
+
<h1 id="result-type"></h1>
|
| 662 |
+
<h2 id="result-title"></h2>
|
| 663 |
+
<p id="result-summary"></p>
|
| 664 |
+
<div class="result-actions">
|
| 665 |
+
<button id="download-pdf-btn" class="action-button">Download PDF</button>
|
| 666 |
+
<button id="retake-test-btn" class="action-button secondary">Retake Test</button>
|
| 667 |
+
</div>
|
| 668 |
+
</div>
|
| 669 |
+
<div id="result-details" class="result-details-section">
|
| 670 |
+
<!-- Detailed results will be injected here -->
|
| 671 |
+
</div>
|
| 672 |
+
</div>
|
| 673 |
+
</div>
|
| 674 |
+
</main>
|
| 675 |
+
|
| 676 |
+
<!-- Modal for Personality Type Details -->
|
| 677 |
+
<div id="type-modal" class="modal">
|
| 678 |
+
<div class="modal-content">
|
| 679 |
+
<span class="close-button">×</span>
|
| 680 |
+
<div id="modal-body">
|
| 681 |
+
<!-- Modal content will be injected by JavaScript -->
|
| 682 |
+
</div>
|
| 683 |
+
</div>
|
| 684 |
+
</div>
|
| 685 |
+
|
| 686 |
+
<footer>
|
| 687 |
+
<p>© <span id="footer-year"></span> Persona. All Rights Reserved. Inspired by 16Personalities.</p>
|
| 688 |
+
</footer>
|
| 689 |
+
|
| 690 |
+
<script>
|
| 691 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 692 |
+
|
| 693 |
+
// --- DATABASE ---
|
| 694 |
+
const personalityData = {
|
| 695 |
+
"INTJ": { title: "The Architect", icon: "fas fa-chess-king", summary: "Imaginative and strategic thinkers, with a plan for everything.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Quick, imaginative, and strategic mind. High self-confidence. Independent and decisive. Hard-working and determined.</p><p><strong>Weaknesses:</strong> Can be arrogant and judgmental. Often overly analytical. Clueless in romance.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>INTJs excel in careers that require intellectual rigor and strategic thinking, such as scientists, engineers, strategists, and university professors.</p>" },
|
| 696 |
+
"INTP": { title: "The Logician", icon: "fas fa-flask", summary: "Innovative inventors with an unquenchable thirst for knowledge.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Great analysts and abstract thinkers. Imaginative and original. Open-minded.</p><p><strong>Weaknesses:</strong> Can be very private and withdrawn. Insensitive. Absent-minded. Condescending.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>INTPs thrive in fields that value expertise and logic, such as philosophy, computer science, and technical writing.</p>" },
|
| 697 |
+
"ENTJ": { title: "The Commander", icon: "fas fa-bullhorn", summary: "Bold, imaginative and strong-willed leaders, always finding a way – or making one.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Efficient, energetic, self-confident, strong-willed, strategic thinkers.</p><p><strong>Weaknesses:</strong> Stubborn, dominant, intolerant, impatient, arrogant.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ENTJs are natural leaders, well-suited for roles like CEO, entrepreneur, or military officer.</p>" },
|
| 698 |
+
"ENTP": { title: "The Debater", icon: "fas fa-lightbulb", summary: "Smart and curious thinkers who cannot resist an intellectual challenge.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Knowledgeable, quick thinkers, original, excellent brainstormers, charismatic.</p><p><strong>Weaknesses:</strong> Very argumentative, insensitive, intolerant, can find it difficult to focus.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ENTPs enjoy complex challenges and are suited for careers like entrepreneur, lawyer, or consultant.</p>" },
|
| 699 |
+
"INFJ": { title: "The Advocate", icon: "fas fa-hand-holding-heart", summary: "Quiet and mystical, yet very inspiring and tireless idealists.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Creative, insightful, inspiring, convincing, decisive, determined and passionate.</p><p><strong>Weaknesses:</strong> Sensitive, extremely private, perfectionistic, always need to have a cause, can burn out easily.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>INFJs seek careers with a purpose, such as counselor, teacher, or artist.</p>" },
|
| 700 |
+
"INFP": { title: "The Mediator", icon: "fas fa-dove", summary: "Poetic, kind and altruistic people, always eager to help a good cause.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Idealistic, seek and value harmony, open-minded and flexible, very creative, passionate and energetic.</p><p><strong>Weaknesses:</strong> Too idealistic, too altruistic, impractical, dislike dealing with data.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>INFPs thrive in creative and mission-driven fields like writing, psychology, and social work.</p>" },
|
| 701 |
+
"ENFJ": { title: "The Protagonist", icon: "fas fa-users", summary: "Charismatic and inspiring leaders, able to mesmerize their listeners.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Tolerant, reliable, charismatic, altruistic, natural leaders.</p><p><strong>Weaknesses:</strong> Overly idealistic, too selfless, too sensitive, fluctuating self-esteem.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ENFJs are natural people-leaders, excelling in teaching, politics, and sales.</p>" },
|
| 702 |
+
"ENFP": { title: "The Campaigner", icon: "fas fa-laugh-beam", summary: "Enthusiastic, creative and sociable free spirits, who can always find a reason to smile.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Curious, observant, energetic and enthusiastic, excellent communicators, know how to relax.</p><p><strong>Weaknesses:</strong> Poor practical skills, find it difficult to focus, overthink things, get stressed easily.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ENFPs' creativity and people skills make them great journalists, actors, and advertising creatives.</p>" },
|
| 703 |
+
"ISTJ": { title: "The Logistician", icon: "fas fa-clipboard-list", summary: "Practical and fact-minded individuals, whose reliability cannot be doubted.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Honest and direct, strong-willed and dutiful, very responsible, calm and practical.</p><p><strong>Weaknesses:</strong> Stubborn, insensitive, always by the book, judgmental.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ISTJs are the bedrock of society, excelling in roles like accountant, auditor, or systems administrator.</p>" },
|
| 704 |
+
"ISFJ": { title: "The Defender", icon: "fas fa-shield-alt", summary: "Very dedicated and warm protectors, always ready to defend their loved ones.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Supportive, reliable and patient, imaginative and observant, enthusiastic, loyal and hard-working.</p><p><strong>Weaknesses:</strong> Humble and shy, take things too personally, repress their feelings, reluctant to change.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ISFJs are caring and dedicated, making them excellent nurses, doctors, and social workers.</p>" },
|
| 705 |
+
"ESTJ": { title: "The Executive", icon: "fas fa-gavel", summary: "Excellent administrators, unsurpassed at managing things – or people.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Dedicated, strong-willed, direct and honest, loyal, patient and reliable, enjoy creating order.</p><p><strong>Weaknesses:</strong> Inflexible and stubborn, uncomfortable with unconventional situations, judgmental.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ESTJs thrive in management and administration, such as financial officers or project managers.</p>" },
|
| 706 |
+
"ESFJ": { title: "The Consul", icon: "fas fa-handshake", summary: "Extraordinarily caring, social and popular people, always eager to help.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Strong practical skills, strong sense of duty, very loyal, sensitive and warm.</p><p><strong>Weaknesses:</strong> Worried about their social status, inflexible, reluctant to improvise or innovate.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ESFJs are community builders, finding fulfillment in roles like nursing, teaching, and event coordinating.</p>" },
|
| 707 |
+
"ISTP": { title: "The Virtuoso", icon: "fas fa-tools", summary: "Bold and practical experimenters, masters of all kinds of tools.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Optimistic and energetic, creative and practical, spontaneous and rational.</p><p><strong>Weaknesses:</strong> Stubborn, insensitive, private and reserved, easily bored, dislike commitment.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ISTPs are hands-on problem-solvers, perfect for careers in mechanics, engineering, or as first responders.</p>" },
|
| 708 |
+
"ISFP": { title: "The Adventurer", icon: "fas fa-paint-brush", summary: "Flexible and charming artists, always ready to explore and experience something new.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Charming, sensitive to others, imaginative, passionate, curious, artistic.</p><p><strong>Weaknesses:</strong> Fiercely independent, unpredictable, easily stressed, overly competitive.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ISFPs are creative souls who shine as artists, designers, musicians, and chefs.</p>" },
|
| 709 |
+
"ESTP": { title: "The Entrepreneur", icon: "fas fa-rocket", summary: "Smart, energetic and very perceptive people, who truly enjoy living on the edge.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Bold, rational and practical, original, perceptive, direct, sociable.</p><p><strong>Weaknesses:</strong> Insensitive, impatient, risk-prone, unstructured, may miss the bigger picture.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ESTPs thrive in high-energy environments like sales, emergency services, and entrepreneurship.</p>" },
|
| 710 |
+
"ESFP": { title: "The Entertainer", icon: "fas fa-microphone-alt", summary: "Spontaneous, energetic and enthusiastic people – life is never boring around them.", description: "<h3><i class='fas fa-puzzle-piece'></i> Strengths & Weaknesses</h3><p><strong>Strengths:</strong> Bold and original. Excellent people skills. Practical. Spontaneous and fun-loving.</p><p><strong>Weaknesses:</strong> Sensitive. Conflict-averse. Easily bored. Poor long-term planners.</p><h3><i class='fas fa-briefcase'></i> Career Paths</h3><p>ESFPs are born to be in the spotlight. Careers in entertainment, sales, event planning, and customer service suit them well.</p>" }
|
| 711 |
+
};
|
| 712 |
+
|
| 713 |
+
const questions = [
|
| 714 |
+
// Mind: Introvert (I) vs. Extravert (E)
|
| 715 |
+
{ text: "You regularly make new friends.", dimension: 'E' },
|
| 716 |
+
{ text: "You feel comfortable just walking up to someone you find interesting and striking up a conversation.", dimension: 'E' },
|
| 717 |
+
{ text: "You feel more energized after spending time with a group of people.", dimension: 'E' },
|
| 718 |
+
{ text: "At parties, you tend to stick to a few people you know rather than mingle with everyone.", dimension: 'I' },
|
| 719 |
+
{ text: "You often prefer to express yourself in writing.", dimension: 'I' },
|
| 720 |
+
{ text: "You would rather have a few close friends than a wide circle of acquaintances.", dimension: 'I' },
|
| 721 |
+
{ text: "You enjoy being the center of attention.", dimension: 'E' },
|
| 722 |
+
{ text: "You often find yourself lost in thought and unaware of your surroundings.", dimension: 'I' },
|
| 723 |
+
{ text: "You are quick to respond to emails and messages.", dimension: 'E' },
|
| 724 |
+
{ text: "In your free time, you prefer to engage in solitary activities.", dimension: 'I' },
|
| 725 |
+
{ text: "You enjoy large parties and social gatherings.", dimension: 'E' },
|
| 726 |
+
{ text: "Being in a quiet, secluded place is rejuvenating for you.", dimension: 'I' },
|
| 727 |
+
{ text: "You are often the one to start a conversation with new people.", dimension: 'E' },
|
| 728 |
+
{ text: "You feel a bit drained after a day of social activities, even if you enjoyed them.", dimension: 'I' },
|
| 729 |
+
{ text: "You think of yourself as a private person.", dimension: 'I' },
|
| 730 |
+
|
| 731 |
+
// Energy: Intuitive (N) vs. Observant (S)
|
| 732 |
+
{ text: "You are more intrigued by a general concept than by the specific details.", dimension: 'N' },
|
| 733 |
+
{ text: "You tend to focus on what is happening here and now, rather than what might happen in the future.", dimension: 'S' },
|
| 734 |
+
{ text: "You enjoy philosophical discussions.", dimension: 'N' },
|
| 735 |
+
{ text: "You prefer practical, hands-on activities over theoretical ones.", dimension: 'S' },
|
| 736 |
+
{ text: "You often have a strong sense of impending events.", dimension: 'N' },
|
| 737 |
+
{ text: "You trust experience more than imagination.", dimension: 'S' },
|
| 738 |
+
{ text: "You like to explore the 'what ifs' and possibilities of a situation.", dimension: 'N' },
|
| 739 |
+
{ text: "You are more down-to-earth than head-in-the-clouds.", dimension: 'S' },
|
| 740 |
+
{ text: "You find metaphors and symbolism fascinating.", dimension: 'N' },
|
| 741 |
+
{ text: "You would rather see how something works in practice than read a manual about it.", dimension: 'S' },
|
| 742 |
+
{ text: "You are often described as imaginative.", dimension: 'N' },
|
| 743 |
+
{ text: "You prefer to rely on what you can see and touch.", dimension: 'S' },
|
| 744 |
+
{ text: "Abstract theories and ideas are exciting to you.", dimension: 'N' },
|
| 745 |
+
{ text: "You pay a lot of attention to details in your environment.", dimension: 'S' },
|
| 746 |
+
{ text: "You are more likely to ponder the meaning of life than to plan your daily tasks.", dimension: 'N' },
|
| 747 |
+
|
| 748 |
+
// Nature: Thinking (T) vs. Feeling (F)
|
| 749 |
+
{ text: "When making a decision, you prioritize logic over others' feelings.", dimension: 'T' },
|
| 750 |
+
{ text: "You find it easy to understand what others are feeling.", dimension: 'F' },
|
| 751 |
+
{ text: "You believe that truth should be valued more than tact.", dimension: 'T' },
|
| 752 |
+
{ text: "Your decisions are often influenced by your emotions.", dimension: 'F' },
|
| 753 |
+
{ text: "You enjoy finding flaws in an argument.", dimension: 'T' },
|
| 754 |
+
{ text: "You are more concerned with harmony than with proving a point.", dimension: 'F' },
|
| 755 |
+
{ text: "You would rather be seen as competent than compassionate.", dimension: 'T' },
|
| 756 |
+
{ text: "You often make choices to accommodate others.", dimension: 'F' },
|
| 757 |
+
{ text: "You can stay detached and objective in a heated debate.", dimension: 'T' },
|
| 758 |
+
{ text: "Seeing other people cry can easily make you feel like you want to cry too.", dimension: 'F' },
|
| 759 |
+
{ text: "You are more likely to criticize someone's work than to praise it.", dimension: 'T' },
|
| 760 |
+
{ text: "You value empathy and kindness highly in others.", dimension: 'F' },
|
| 761 |
+
{ text: "You find it more important to be efficient than to be cooperative.", dimension: 'T' },
|
| 762 |
+
{ text: "You are careful not to hurt other people's feelings.", dimension: 'F' },
|
| 763 |
+
{ text: "It's easy for you to make impersonal decisions.", dimension: 'T' },
|
| 764 |
+
|
| 765 |
+
// Tactics: Judging (J) vs. Prospecting (P)
|
| 766 |
+
{ text: "You prefer to have a detailed plan rather than to improvise.", dimension: 'J' },
|
| 767 |
+
{ text: "You enjoy spontaneity and last-minute plans.", dimension: 'P' },
|
| 768 |
+
{ text: "You like to have your work done well before the deadline.", dimension: 'J' },
|
| 769 |
+
{ text: "You are comfortable with a flexible schedule.", dimension: 'P' },
|
| 770 |
+
{ text: "You like to make to-do lists and stick to them.", dimension: 'J' },
|
| 771 |
+
{ text: "You prefer to keep your options open as long as possible.", dimension: 'P' },
|
| 772 |
+
{ text: "You find satisfaction in a tidy and organized workspace.", dimension: 'J' },
|
| 773 |
+
{ text: "You often work in bursts of energy.", dimension: 'P' },
|
| 774 |
+
{ text: "You prefer to finish one project before starting another.", dimension: 'J' },
|
| 775 |
+
{ text: "You are more of a 'go with the flow' type of person.", dimension: 'P' },
|
| 776 |
+
{ text: "You feel more comfortable when you know what to expect.", dimension: 'J' },
|
| 777 |
+
{ text: "You enjoy adapting to new and unexpected situations.", dimension: 'P' },
|
| 778 |
+
{ text: "You are a methodical and systematic worker.", dimension: 'J' },
|
| 779 |
+
{ text: "You often find it difficult to commit to a plan.", dimension: 'P' },
|
| 780 |
+
{ text: "You like to have things settled and decided.", dimension: 'J' }
|
| 781 |
+
];
|
| 782 |
+
|
| 783 |
+
// --- DOM ELEMENTS ---
|
| 784 |
+
const themeToggle = document.getElementById('theme-toggle');
|
| 785 |
+
const typesGrid = document.getElementById('types-grid');
|
| 786 |
+
const modal = document.getElementById('type-modal');
|
| 787 |
+
const modalBody = document.getElementById('modal-body');
|
| 788 |
+
const closeModalBtn = document.getElementsByClassName('close-button')[0];
|
| 789 |
+
const logo = document.querySelector('.logo');
|
| 790 |
+
|
| 791 |
+
// Page containers
|
| 792 |
+
const homePage = document.getElementById('home-page');
|
| 793 |
+
const testPage = document.getElementById('test-page');
|
| 794 |
+
const resultsPage = document.getElementById('results-page');
|
| 795 |
+
|
| 796 |
+
// Home page elements
|
| 797 |
+
const nameInputSection = document.getElementById('name-input-section');
|
| 798 |
+
const nameInput = document.getElementById('name-input');
|
| 799 |
+
const startBtn = document.getElementById('start-btn');
|
| 800 |
+
const mainContent = document.getElementById('main-content');
|
| 801 |
+
const heroTitle = document.getElementById('hero-title');
|
| 802 |
+
const takeTestBtn = document.getElementById('take-test-btn');
|
| 803 |
+
|
| 804 |
+
// Test page elements
|
| 805 |
+
const questionContainer = document.getElementById('question-container');
|
| 806 |
+
const progressBar = document.getElementById('progress-bar');
|
| 807 |
+
const prevBtn = document.getElementById('prev-btn');
|
| 808 |
+
const nextBtn = document.getElementById('next-btn');
|
| 809 |
+
|
| 810 |
+
// Results page elements
|
| 811 |
+
const resultContent = document.getElementById('result-content');
|
| 812 |
+
const resultTypeEl = document.getElementById('result-type');
|
| 813 |
+
const resultTitleEl = document.getElementById('result-title');
|
| 814 |
+
const resultSummaryEl = document.getElementById('result-summary');
|
| 815 |
+
const resultDetailsEl = document.getElementById('result-details');
|
| 816 |
+
const downloadPdfBtn = document.getElementById('download-pdf-btn');
|
| 817 |
+
const retakeTestBtn = document.getElementById('retake-test-btn');
|
| 818 |
+
|
| 819 |
+
// Footer
|
| 820 |
+
document.getElementById('footer-year').textContent = new Date().getFullYear();
|
| 821 |
+
|
| 822 |
+
// --- APP STATE ---
|
| 823 |
+
let currentQuestionIndex = 0;
|
| 824 |
+
let userName = '';
|
| 825 |
+
const userAnswers = new Array(questions.length).fill(null);
|
| 826 |
+
|
| 827 |
+
// --- PAGE NAVIGATION ---
|
| 828 |
+
function navigateTo(pageId) {
|
| 829 |
+
document.querySelectorAll('.page').forEach(page => page.classList.remove('active'));
|
| 830 |
+
document.getElementById(pageId).classList.add('active');
|
| 831 |
+
window.scrollTo(0, 0);
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
startBtn.addEventListener('click', () => {
|
| 835 |
+
userName = nameInput.value.trim();
|
| 836 |
+
if (userName) {
|
| 837 |
+
heroTitle.textContent = `Discover Yourself, ${userName}!`;
|
| 838 |
+
nameInputSection.style.display = 'none';
|
| 839 |
+
mainContent.style.display = 'block';
|
| 840 |
+
} else {
|
| 841 |
+
alert('Please enter your name to begin.');
|
| 842 |
+
}
|
| 843 |
+
});
|
| 844 |
+
|
| 845 |
+
takeTestBtn.addEventListener('click', () => {
|
| 846 |
+
navigateTo('test-page');
|
| 847 |
+
startTest();
|
| 848 |
+
});
|
| 849 |
+
|
| 850 |
+
logo.addEventListener('click', () => {
|
| 851 |
+
navigateTo('home-page');
|
| 852 |
+
});
|
| 853 |
+
|
| 854 |
+
// --- THEME SWITCHER ---
|
| 855 |
+
const currentTheme = localStorage.getItem('theme');
|
| 856 |
+
if (currentTheme) {
|
| 857 |
+
document.documentElement.setAttribute('data-theme', currentTheme);
|
| 858 |
+
themeToggle.textContent = currentTheme === 'dark' ? '☀️' : '🌙';
|
| 859 |
+
}
|
| 860 |
+
|
| 861 |
+
themeToggle.addEventListener('click', () => {
|
| 862 |
+
let theme = document.documentElement.getAttribute('data-theme');
|
| 863 |
+
if (theme === 'dark') {
|
| 864 |
+
document.documentElement.setAttribute('data-theme', 'light');
|
| 865 |
+
localStorage.setItem('theme', 'light');
|
| 866 |
+
themeToggle.textContent = '🌙';
|
| 867 |
+
} else {
|
| 868 |
+
document.documentElement.setAttribute('data-theme', 'dark');
|
| 869 |
+
localStorage.setItem('theme', 'dark');
|
| 870 |
+
themeToggle.textContent = '☀️';
|
| 871 |
+
}
|
| 872 |
+
});
|
| 873 |
+
|
| 874 |
+
// --- HOME PAGE LOGIC ---
|
| 875 |
+
function populatePersonalityCards() {
|
| 876 |
+
if (typesGrid && personalityData) {
|
| 877 |
+
Object.keys(personalityData).forEach(type => {
|
| 878 |
+
const card = document.createElement('div');
|
| 879 |
+
card.className = 'type-card';
|
| 880 |
+
card.dataset.type = type;
|
| 881 |
+
const typeInfo = personalityData[type];
|
| 882 |
+
card.innerHTML = `<div class="icon"><i class="${typeInfo.icon}"></i></div><h3>${type}</h3><h4>${typeInfo.title}</h4><p>${typeInfo.summary}</p>`;
|
| 883 |
+
card.addEventListener('click', () => openModal(type));
|
| 884 |
+
typesGrid.appendChild(card);
|
| 885 |
+
});
|
| 886 |
+
}
|
| 887 |
+
}
|
| 888 |
+
|
| 889 |
+
// --- MODAL LOGIC ---
|
| 890 |
+
function openModal(type) {
|
| 891 |
+
const typeInfo = personalityData[type];
|
| 892 |
+
modalBody.innerHTML = `<h3><i class="${typeInfo.icon}"></i> ${type} - ${typeInfo.title}</h3>${typeInfo.description}`;
|
| 893 |
+
modal.style.display = 'block';
|
| 894 |
+
}
|
| 895 |
+
|
| 896 |
+
closeModalBtn.onclick = () => modal.style.display = "none";
|
| 897 |
+
window.onclick = (event) => {
|
| 898 |
+
if (event.target == modal) {
|
| 899 |
+
modal.style.display = "none";
|
| 900 |
+
}
|
| 901 |
+
};
|
| 902 |
+
|
| 903 |
+
// --- TEST PAGE LOGIC ---
|
| 904 |
+
function startTest() {
|
| 905 |
+
currentQuestionIndex = 0;
|
| 906 |
+
userAnswers.fill(null);
|
| 907 |
+
showQuestion(currentQuestionIndex);
|
| 908 |
+
}
|
| 909 |
+
|
| 910 |
+
function showQuestion(index) {
|
| 911 |
+
const question = questions[index];
|
| 912 |
+
questionContainer.innerHTML = `
|
| 913 |
+
<h2>${question.text}</h2>
|
| 914 |
+
<div class="options">
|
| 915 |
+
<span>Disagree</span>
|
| 916 |
+
<input type="range" id="answer-slider" min="-3" max="3" value="${userAnswers[index] === null ? 0 : userAnswers[index]}">
|
| 917 |
+
<span>Agree</span>
|
| 918 |
+
</div>
|
| 919 |
+
`;
|
| 920 |
+
const slider = document.getElementById('answer-slider');
|
| 921 |
+
slider.addEventListener('input', () => {
|
| 922 |
+
userAnswers[index] = parseInt(slider.value, 10);
|
| 923 |
+
});
|
| 924 |
+
updateNavigation();
|
| 925 |
+
updateProgressBar();
|
| 926 |
+
}
|
| 927 |
+
|
| 928 |
+
function updateNavigation() {
|
| 929 |
+
prevBtn.disabled = currentQuestionIndex === 0;
|
| 930 |
+
nextBtn.textContent = currentQuestionIndex === questions.length - 1 ? 'Finish' : 'Next';
|
| 931 |
+
}
|
| 932 |
+
|
| 933 |
+
function updateProgressBar() {
|
| 934 |
+
const progress = (currentQuestionIndex / questions.length) * 100;
|
| 935 |
+
progressBar.style.width = `${progress}%`;
|
| 936 |
+
}
|
| 937 |
+
|
| 938 |
+
nextBtn.addEventListener('click', () => {
|
| 939 |
+
if (userAnswers[currentQuestionIndex] === null) {
|
| 940 |
+
userAnswers[currentQuestionIndex] = 0; // Default if not moved
|
| 941 |
+
}
|
| 942 |
+
|
| 943 |
+
if (currentQuestionIndex < questions.length - 1) {
|
| 944 |
+
currentQuestionIndex++;
|
| 945 |
+
showQuestion(currentQuestionIndex);
|
| 946 |
+
} else {
|
| 947 |
+
progressBar.style.width = `100%`;
|
| 948 |
+
const finalResult = calculateResult();
|
| 949 |
+
displayResults(finalResult);
|
| 950 |
+
navigateTo('results-page');
|
| 951 |
+
}
|
| 952 |
+
});
|
| 953 |
+
|
| 954 |
+
prevBtn.addEventListener('click', () => {
|
| 955 |
+
if (currentQuestionIndex > 0) {
|
| 956 |
+
currentQuestionIndex--;
|
| 957 |
+
showQuestion(currentQuestionIndex);
|
| 958 |
+
}
|
| 959 |
+
});
|
| 960 |
+
|
| 961 |
+
// --- RESULTS LOGIC ---
|
| 962 |
+
function calculateResult() {
|
| 963 |
+
const scores = { E: 0, I: 0, N: 0, S: 0, T: 0, F: 0, J: 0, P: 0 };
|
| 964 |
+
userAnswers.forEach((answer, index) => {
|
| 965 |
+
if (answer === null) return;
|
| 966 |
+
const question = questions[index];
|
| 967 |
+
const dimension = question.dimension;
|
| 968 |
+
|
| 969 |
+
// Positive value for Agree, negative for Disagree
|
| 970 |
+
if (answer > 0) scores[dimension] += answer;
|
| 971 |
+
else if (answer < 0) scores[dimension === 'E' ? 'I' : dimension === 'I' ? 'E' : dimension === 'N' ? 'S' : dimension === 'S' ? 'N' : dimension === 'T' ? 'F' : dimension === 'F' ? 'T' : dimension === 'J' ? 'P' : 'J'] -= answer;
|
| 972 |
+
});
|
| 973 |
+
|
| 974 |
+
let result = '';
|
| 975 |
+
result += scores.E >= scores.I ? 'E' : 'I';
|
| 976 |
+
result += scores.N >= scores.S ? 'N' : 'S';
|
| 977 |
+
result += scores.T >= scores.F ? 'T' : 'F';
|
| 978 |
+
result += scores.J >= scores.P ? 'J' : 'P';
|
| 979 |
+
return result;
|
| 980 |
+
}
|
| 981 |
+
|
| 982 |
+
function displayResults(personalityType) {
|
| 983 |
+
if (personalityType && personalityData[personalityType]) {
|
| 984 |
+
const data = personalityData[personalityType];
|
| 985 |
+
resultTypeEl.textContent = personalityType;
|
| 986 |
+
resultTitleEl.textContent = data.title;
|
| 987 |
+
resultSummaryEl.innerHTML = `Here are your results, <strong>${userName || 'friend'}</strong>! You are an ${data.title}.<br>${data.summary}`;
|
| 988 |
+
resultDetailsEl.innerHTML = data.description;
|
| 989 |
+
} else {
|
| 990 |
+
resultContent.innerHTML = '<h1>Result not found!</h1><p>It seems you haven\'t completed the test, or the personality type is invalid. Please take the test to get your result.</p>';
|
| 991 |
+
}
|
| 992 |
+
}
|
| 993 |
+
|
| 994 |
+
retakeTestBtn.addEventListener('click', () => {
|
| 995 |
+
navigateTo('test-page');
|
| 996 |
+
startTest();
|
| 997 |
+
});
|
| 998 |
+
|
| 999 |
+
downloadPdfBtn.addEventListener('click', () => {
|
| 1000 |
+
const personalityType = resultTypeEl.textContent;
|
| 1001 |
+
if (!personalityType || !personalityData[personalityType]) return;
|
| 1002 |
+
|
| 1003 |
+
const { jsPDF } = window.jspdf;
|
| 1004 |
+
const doc = new jsPDF();
|
| 1005 |
+
const data = personalityData[personalityType];
|
| 1006 |
+
|
| 1007 |
+
doc.setFont('helvetica', 'bold');
|
| 1008 |
+
doc.setFontSize(24);
|
| 1009 |
+
doc.text(`Persona Report for ${userName || 'User'}`, 20, 20);
|
| 1010 |
+
|
| 1011 |
+
doc.setFontSize(18);
|
| 1012 |
+
doc.text(`${personalityType} - ${data.title}`, 20, 30);
|
| 1013 |
+
|
| 1014 |
+
|
| 1015 |
+
doc.setFont('helvetica', 'normal');
|
| 1016 |
+
doc.setFontSize(12);
|
| 1017 |
+
|
| 1018 |
+
const tempDiv = document.createElement('div');
|
| 1019 |
+
tempDiv.innerHTML = data.description;
|
| 1020 |
+
|
| 1021 |
+
let yPos = 45;
|
| 1022 |
+
|
| 1023 |
+
const summaryLines = doc.splitTextToSize(`Summary: ${data.summary}`, 170);
|
| 1024 |
+
doc.text(summaryLines, 20, yPos);
|
| 1025 |
+
yPos += (summaryLines.length * 7) + 10;
|
| 1026 |
+
|
| 1027 |
+
let contentText = '';
|
| 1028 |
+
tempDiv.childNodes.forEach(node => {
|
| 1029 |
+
if (node.nodeName === 'H3') {
|
| 1030 |
+
// remove icon html before adding text
|
| 1031 |
+
const cleanText = node.textContent;
|
| 1032 |
+
contentText += `\n\n${cleanText.trim()}\n`;
|
| 1033 |
+
} else if (node.nodeName === 'P') {
|
| 1034 |
+
contentText += `${node.innerText}\n`;
|
| 1035 |
+
}
|
| 1036 |
+
});
|
| 1037 |
+
|
| 1038 |
+
const detailLines = doc.splitTextToSize(contentText.trim(), 170);
|
| 1039 |
+
doc.text(detailLines, 20, yPos);
|
| 1040 |
+
|
| 1041 |
+
doc.save(`${personalityType}_Personality_Result.pdf`);
|
| 1042 |
+
});
|
| 1043 |
+
|
| 1044 |
+
|
| 1045 |
+
// --- INITIALIZE APP ---
|
| 1046 |
+
populatePersonalityCards();
|
| 1047 |
+
// Hide main content until name is entered
|
| 1048 |
+
mainContent.style.display = 'none';
|
| 1049 |
+
nameInputSection.style.display = 'flex';
|
| 1050 |
+
navigateTo('home-page');
|
| 1051 |
+
|
| 1052 |
+
});
|
| 1053 |
+
</script>
|
| 1054 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=madansa7/persona" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1055 |
</html>
|
prompts.txt
ADDED
|
File without changes
|