humanvprojectceo commited on
Commit
cdcbda7
·
verified ·
1 Parent(s): d69cb90

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +40 -27
index.html CHANGED
@@ -51,7 +51,7 @@
51
  pointer-events: none;
52
  }
53
 
54
- /* استایل‌های اختصاصی کلیدهای مستطیلی هم‌اندازه پس از فعال‌سازی */
55
  .mbti-option-input:checked + .mbti-option-card {
56
  color: #ffffff !important;
57
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
@@ -60,31 +60,44 @@
60
  color: #ffffff !important;
61
  }
62
 
63
- /* رنگ‌بندی داینامیک کلیدها بر اساس فاکتور رنگ دریافتی از پایتون */
64
- .option-1:checked + .mbti-option-card {
65
- background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(4, 120, 87, 0.25)) !important;
66
- border-color: #10b981 !important;
67
- box-shadow: 0 0 20px rgba(16, 185, 129, 0.2) !important;
68
  }
69
- .option-2:checked + .mbti-option-card {
70
- background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(15, 118, 110, 0.2)) !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  border-color: #14b8a6 !important;
72
- box-shadow: 0 0 15px rgba(20, 184, 166, 0.15) !important;
73
  }
74
- .option-3:checked + .mbti-option-card {
75
- background: linear-gradient(135deg, rgba(100, 116, 139, 0.2), rgba(71, 85, 105, 0.2)) !important;
76
- border-color: #94a3b8 !important;
77
- box-shadow: 0 0 10px rgba(148, 163, 184, 0.15) !important;
78
  }
79
- .option-4:checked + .mbti-option-card {
80
- background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(190, 24, 74, 0.2)) !important;
81
- border-color: #f43f5e !important;
82
- box-shadow: 0 0 15px rgba(244, 63, 94, 0.15) !important;
 
 
83
  }
84
- .option-5:checked + .mbti-option-card {
85
- background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.25)) !important;
86
- border-color: #ef4444 !important;
87
- box-shadow: 0 0 20px rgba(239, 68, 68, 0.2) !important;
88
  }
89
 
90
  /* قالب رندر گزارش مارک‌داون تفصیلی */
@@ -539,17 +552,17 @@
539
  const qDiv = document.createElement('div');
540
  qDiv.className = "ios-glass-light p-5 rounded-2xl border border-white/5 space-y-4 transition-all hover:border-white/10";
541
 
542
- // ایجاد کاملاً داینامیک دکمه‌های گزینه‌ها بر اساس دیتای ارسالی پایتون
543
- let optionsMarkup = `<div class="grid grid-cols-2 sm:grid-cols-${q.options.length} gap-1.5 sm:gap-3 max-w-2xl mx-auto py-2">`;
544
 
545
  q.options.forEach((opt) => {
546
  const isChecked = answeredVal === opt.score ? 'checked' : '';
547
  optionsMarkup += `
548
  <label class="cursor-pointer block w-full">
549
- <input type="radio" name="q_${q.id}" value="${opt.score}" ${isChecked} onchange="saveAnswer(${q.id}, ${opt.score})" class="sr-only mbti-option-input option-${opt.color}">
550
- <div class="mbti-option-card w-full text-center py-2.5 sm:py-3.5 px-1 sm:px-2 rounded-2xl border border-white/10 bg-white/5 hover:bg-indigo-500/5 backdrop-blur-md transition-all duration-300 flex flex-col items-center justify-center gap-1 min-h-[72px] sm:min-h-[85px]">
551
- <span class="text-[10px] sm:text-xs font-black text-indigo-400 transition">${opt.label}</span>
552
- <span class="text-[8px] sm:text-[10px] md:text-[11px] font-bold text-slate-300 leading-tight">${opt.text}</span>
553
  </div>
554
  </label>
555
  `;
 
51
  pointer-events: none;
52
  }
53
 
54
+ /* کلید انتخابی کلی پس از فعال‌سازی */
55
  .mbti-option-input:checked + .mbti-option-card {
56
  color: #ffffff !important;
57
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
 
60
  color: #ffffff !important;
61
  }
62
 
63
+ /* استایل اختصاصی گزینه‌های فعال آزمون MBTI (تم بنفش و نیلی) */
64
+ .test-mbti .mbti-option-input:checked + .mbti-option-card {
65
+ background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(124, 58, 237, 0.25)) !important;
66
+ border-color: #6366f1 !important;
67
+ box-shadow: 0 0 15px rgba(99, 102, 241, 0.3) !important;
68
  }
69
+ .test-mbti .mbti-option-card span:first-child {
70
+ color: #818cf8 !important;
71
+ }
72
+
73
+ /* استایل اختصاصی گزینه‌های فعال آزمون اضطراب بک BAI (تم قرمز و صورتی تیره) */
74
+ .test-bai .mbti-option-input:checked + .mbti-option-card {
75
+ background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(225, 29, 72, 0.25)) !important;
76
+ border-color: #f43f5e !important;
77
+ box-shadow: 0 0 15px rgba(244, 63, 94, 0.3) !important;
78
+ }
79
+ .test-bai .mbti-option-card span:first-child {
80
+ color: #fb7185 !important;
81
+ }
82
+
83
+ /* استایل اختصاصی گزینه‌های فعال آزمون افسردگی بک BDI (تم زمردی و سبزآبی) */
84
+ .test-bdi .mbti-option-input:checked + .mbti-option-card {
85
+ background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(13, 148, 136, 0.25)) !important;
86
  border-color: #14b8a6 !important;
87
+ box-shadow: 0 0 15px rgba(20, 184, 166, 0.3) !important;
88
  }
89
+ .test-bdi .mbti-option-card span:first-child {
90
+ color: #2dd4bf !important;
 
 
91
  }
92
+
93
+ /* استایل اختصاصی گزینه‌های فعال آزمون اهمال‌کاری سولومون (تم نارنجی و کهربایی) */
94
+ .test-solomon .mbti-option-input:checked + .mbti-option-card {
95
+ background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.25)) !important;
96
+ border-color: #f59e0b !important;
97
+ box-shadow: 0 0 15px rgba(245, 158, 11, 0.3) !important;
98
  }
99
+ .test-solomon .mbti-option-card span:first-child {
100
+ color: #fbbf24 !important;
 
 
101
  }
102
 
103
  /* قالب رندر گزارش مارک‌داون تفصیلی */
 
552
  const qDiv = document.createElement('div');
553
  qDiv.className = "ios-glass-light p-5 rounded-2xl border border-white/5 space-y-4 transition-all hover:border-white/10";
554
 
555
+ // ردیف افقی یکپارچه، کوچک و ریسپانسیو بدون شکستگی خط
556
+ let optionsMarkup = `<div class="grid grid-cols-${q.options.length} gap-1 sm:gap-2 w-full max-w-3xl mx-auto py-2 test-${selectedTest}">`;
557
 
558
  q.options.forEach((opt) => {
559
  const isChecked = answeredVal === opt.score ? 'checked' : '';
560
  optionsMarkup += `
561
  <label class="cursor-pointer block w-full">
562
+ <input type="radio" name="q_${q.id}" value="${opt.score}" ${isChecked} onchange="saveAnswer(${q.id}, ${opt.score})" class="sr-only mbti-option-input">
563
+ <div class="mbti-option-card w-full text-center py-1.5 px-0.5 sm:py-2.5 sm:px-2 rounded-xl sm:rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 backdrop-blur-md transition-all duration-300 flex flex-col items-center justify-center gap-0.5 min-h-[52px] sm:min-h-[76px]">
564
+ <span class="text-[7px] sm:text-[10px] md:text-xs font-black text-indigo-400 transition leading-none">${opt.label}</span>
565
+ <span class="text-[6px] sm:text-[9px] md:text-[10px] font-bold text-slate-300 leading-tight">${opt.text}</span>
566
  </div>
567
  </label>
568
  `;