Mycc commited on
Commit
78d077b
·
verified ·
1 Parent(s): da1d16e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +28 -27
index.html CHANGED
@@ -41,7 +41,7 @@
41
  transition: max-height 0.3s ease-out;
42
  }
43
  .settings-panel.open {
44
- max-height: 1000px;
45
  }
46
  .roulette-item-spin {
47
  animation: spin-in-place 0.2s ease-in-out infinite alternate;
@@ -291,6 +291,11 @@
291
  .boss-toggle input {
292
  margin-right: 8px;
293
  }
 
 
 
 
 
294
  </style>
295
  </head>
296
  <body class="light">
@@ -350,12 +355,10 @@
350
  Очистить выбранных персонажей
351
  </button>
352
  </div>
353
-
354
- <h3 class="text-xl font-bold mb-4 mt-6 dark:text-white">Настройки боссов</h3>
355
  <p class="text-sm text-[#6B6B6B] dark:text-[#a0aec0] mb-4">
356
  Выберите, какие боссы и местные легенды должны участвовать в рандомизации
357
  </p>
358
-
359
  <div class="mb-4">
360
  <div class="legend-settings">
361
  <label for="boss-category-select">Категория:</label>
@@ -366,9 +369,8 @@
366
  </select>
367
  </div>
368
  </div>
369
-
370
- <div id="bosses-settings-container" class="max-h-80 overflow-y-auto pr-2">
371
- <!-- Динамически генерируемые настройки для боссов -->
372
  </div>
373
  </div>
374
 
@@ -381,7 +383,7 @@
381
  <option value="local-legends">Местные легенды</option>
382
  </select>
383
  </div>
384
-
385
  <!-- Секция для персонажей -->
386
  <section id="characters-section" class="mb-16 bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg">
387
  <h2 class="text-3xl font-bold text-center text-[#4A4A4A] dark:text-white mb-8">Сформировать отряд персонажей</h2>
@@ -401,7 +403,7 @@
401
  </button>
402
  </div>
403
  </section>
404
-
405
  <!-- Секция для мировых боссов -->
406
  <section id="world-bosses-section" class="mb-16 bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg hidden">
407
  <h2 class="text-3xl font-bold text-center text-[#4A4A4A] dark:text-white mb-8">Рандом мирового босса</h2>
@@ -420,7 +422,7 @@
420
  </button>
421
  </div>
422
  </section>
423
-
424
  <!-- Секция для еженедельных боссов -->
425
  <section id="weekly-bosses-section" class="mb-16 bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg hidden">
426
  <h2 class="text-3xl font-bold text-center text-[#4A4A4A] dark:text-white mb-8">Рандом еженедельного босса</h2>
@@ -439,7 +441,7 @@
439
  </button>
440
  </div>
441
  </section>
442
-
443
  <!-- Секция для местных легенд -->
444
  <section id="local-legends-section" class="mb-16 bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg hidden">
445
  <h2 class="text-3xl font-bold text-center text-[#4A4A4A] dark:text-white mb-8">Рандом местной легенды</h2>
@@ -458,7 +460,7 @@
458
  </button>
459
  </div>
460
  </section>
461
-
462
  <section id="history-section" class="bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg">
463
  <div class="flex justify-between items-center mb-8">
464
  <h2 class="text-3xl font-bold text-[#4A4A4A] dark:text-white">История</h2>
@@ -681,7 +683,6 @@
681
 
682
  // Местные Легенды
683
  const LOCAL_LEGENDS = [
684
- { "name": "Сигурд", "icon": "pic/LocalLegends/Sigurd.png", "guideUrl": "#" },
685
  { "name": "Волшебные рыцари-близнецы", "icon": "https://wotpack.ru/wp-content/uploads/2023/08/word-image-284766-1-800x476.jpg", "guideUrl": "https://wotpack.ru/volshebnye-rycari-bliznecy-v-genshin-impact-kak-najti-i-pobedit/" },
686
  { "name": "Окружной судья океана", "icon": "https://wotpack.ru/wp-content/uploads/2023/08/word-image-284964-4.jpg", "guideUrl": "https://wotpack.ru/okruzhnoj-sudja-okeana-v-genshin-impact-kak-najti-i-pobedit/" },
687
  { "name": "Дева озера Вивианна", "icon": "https://wotpack.ru/wp-content/uploads/2023/08/word-image-283768-1-800x425.jpg", "guideUrl": "https://wotpack.ru/deva-ozera-vivianna-v-genshin-impact-kak-najti-i-pobedit/" },
@@ -720,7 +721,7 @@
720
 
721
  { "name": "Ицзи и Тяньюнь", "icon": "https://wotpack.ru/wp-content/uploads/2024/01/20240131070630.jpg", "guideUrl": "https://wotpack.ru/vladyki-gor-chichzhan-v-genshin-impact-kak-najti-i-pobedit-iczi-i-tjanjun/" },
722
  ];
723
-
724
  // Генерация или получение UID
725
  function getOrCreateUID() {
726
  let uid = localStorage.getItem('genshinRouletteUID');
@@ -808,12 +809,6 @@
808
  const bossCategorySelect = document.getElementById('boss-category-select');
809
  const bossesSettingsContainer = document.getElementById('bosses-settings-container');
810
 
811
- // Full History Modal elements
812
- const fullHistoryModal = document.getElementById('full-history-modal');
813
- const fullHistoryModalContent = document.getElementById('full-history-modal-content');
814
- const fullHistoryModalContentInner = document.getElementById('full-history-modal-content-inner');
815
- const fullHistoryModalCloseButton = document.getElementById('full-history-modal-close');
816
-
817
  // Инициализация темы
818
  function initTheme() {
819
  if (config.darkMode) {
@@ -841,13 +836,11 @@
841
  function changeCategory() {
842
  config.category = categorySelect.value;
843
  localStorage.setItem('genshinCategory', config.category);
844
-
845
  // Скрываем все секции
846
  charactersSection.classList.add('hidden');
847
  worldBossesSection.classList.add('hidden');
848
  weeklyBossesSection.classList.add('hidden');
849
  localLegendsSection.classList.add('hidden');
850
-
851
  // Показываем выбранную секцию
852
  if (config.category === 'characters') {
853
  charactersSection.classList.remove('hidden');
@@ -891,20 +884,23 @@
891
  card.className = `boss-card legend-card`;
892
  // Делаем карточку кликабельной только если есть ссылка на гайд
893
  const isClickable = legend.guideUrl && legend.guideUrl !== "#";
 
 
 
894
  card.innerHTML = `
895
  <img src="${legend.icon}" alt="${legend.name}"
896
  onerror="this.onerror=null;this.src='https://placehold.co/80x80/EFEAE4/4A4A4A?text=N/A'">
897
  <h3 class="font-bold text-lg dark:text-white">${legend.name}</h3>
898
  <p class="text-sm dark:text-gray-300">${isClickable ? 'Нажмите чтобы узнать про Легенду' : 'Нет ссылки на гайд'}</p>
899
  `;
 
 
900
 
901
  if (isClickable) {
902
- card.style.cursor = 'pointer';
903
  card.addEventListener('click', () => {
904
  window.open(legend.guideUrl, '_blank');
905
  });
906
  }
907
-
908
  return card;
909
  }
910
 
@@ -960,14 +956,19 @@
960
 
961
  bossesSettingsContainer.innerHTML = '';
962
 
 
 
 
 
 
963
  bosses.forEach(boss => {
964
  const isExcluded = config.excludedBosses[category].includes(boss.name);
965
  const bossToggle = document.createElement('div');
966
- bossToggle.className = 'boss-toggle flex items-center';
967
  bossToggle.innerHTML = `
968
  <input type="checkbox" id="boss-${category}-${boss.name.replace(/\s+/g, '-')}"
969
- ${isExcluded ? '' : 'checked'} class="boss-toggle-checkbox">
970
- <label for="boss-${category}-${boss.name.replace(/\s+/g, '-')}" class="ml-2">${boss.name}</label>
971
  `;
972
  bossesSettingsContainer.appendChild(bossToggle);
973
 
 
41
  transition: max-height 0.3s ease-out;
42
  }
43
  .settings-panel.open {
44
+ max-height: 1500px; /* Увеличено для вместимости всех настроек */
45
  }
46
  .roulette-item-spin {
47
  animation: spin-in-place 0.2s ease-in-out infinite alternate;
 
291
  .boss-toggle input {
292
  margin-right: 8px;
293
  }
294
+ .settings-container {
295
+ max-height: 300px;
296
+ overflow-y: auto;
297
+ padding-right: 8px;
298
+ }
299
  </style>
300
  </head>
301
  <body class="light">
 
355
  Очистить выбранных персонажей
356
  </button>
357
  </div>
358
+ <h3 class="text-xl font-bold mb-4 mt-6 dark:text-white">Настройки боссов и легенд</h3>
 
359
  <p class="text-sm text-[#6B6B6B] dark:text-[#a0aec0] mb-4">
360
  Выберите, какие боссы и местные легенды должны участвовать в рандомизации
361
  </p>
 
362
  <div class="mb-4">
363
  <div class="legend-settings">
364
  <label for="boss-category-select">Категория:</label>
 
369
  </select>
370
  </div>
371
  </div>
372
+ <div id="bosses-settings-container" class="settings-container max-h-80 overflow-y-auto pr-2">
373
+ <!-- Настройки для боссов будут добавлены динамически -->
 
374
  </div>
375
  </div>
376
 
 
383
  <option value="local-legends">Местные легенды</option>
384
  </select>
385
  </div>
386
+
387
  <!-- Секция для персонажей -->
388
  <section id="characters-section" class="mb-16 bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg">
389
  <h2 class="text-3xl font-bold text-center text-[#4A4A4A] dark:text-white mb-8">Сформировать отряд персонажей</h2>
 
403
  </button>
404
  </div>
405
  </section>
406
+
407
  <!-- Секция для мировых боссов -->
408
  <section id="world-bosses-section" class="mb-16 bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg hidden">
409
  <h2 class="text-3xl font-bold text-center text-[#4A4A4A] dark:text-white mb-8">Рандом мирового босса</h2>
 
422
  </button>
423
  </div>
424
  </section>
425
+
426
  <!-- Секция для еженедельных боссов -->
427
  <section id="weekly-bosses-section" class="mb-16 bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg hidden">
428
  <h2 class="text-3xl font-bold text-center text-[#4A4A4A] dark:text-white mb-8">Рандом еженедельного босса</h2>
 
441
  </button>
442
  </div>
443
  </section>
444
+
445
  <!-- Секция для местных легенд -->
446
  <section id="local-legends-section" class="mb-16 bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg hidden">
447
  <h2 class="text-3xl font-bold text-center text-[#4A4A4A] dark:text-white mb-8">Рандом местной легенды</h2>
 
460
  </button>
461
  </div>
462
  </section>
463
+
464
  <section id="history-section" class="bg-[#EFEAE4] dark:bg-gray-700 p-6 rounded-2xl shadow-lg">
465
  <div class="flex justify-between items-center mb-8">
466
  <h2 class="text-3xl font-bold text-[#4A4A4A] dark:text-white">История</h2>
 
683
 
684
  // Местные Легенды
685
  const LOCAL_LEGENDS = [
 
686
  { "name": "Волшебные рыцари-близнецы", "icon": "https://wotpack.ru/wp-content/uploads/2023/08/word-image-284766-1-800x476.jpg", "guideUrl": "https://wotpack.ru/volshebnye-rycari-bliznecy-v-genshin-impact-kak-najti-i-pobedit/" },
687
  { "name": "Окружной судья океана", "icon": "https://wotpack.ru/wp-content/uploads/2023/08/word-image-284964-4.jpg", "guideUrl": "https://wotpack.ru/okruzhnoj-sudja-okeana-v-genshin-impact-kak-najti-i-pobedit/" },
688
  { "name": "Дева озера Вивианна", "icon": "https://wotpack.ru/wp-content/uploads/2023/08/word-image-283768-1-800x425.jpg", "guideUrl": "https://wotpack.ru/deva-ozera-vivianna-v-genshin-impact-kak-najti-i-pobedit/" },
 
721
 
722
  { "name": "Ицзи и Тяньюнь", "icon": "https://wotpack.ru/wp-content/uploads/2024/01/20240131070630.jpg", "guideUrl": "https://wotpack.ru/vladyki-gor-chichzhan-v-genshin-impact-kak-najti-i-pobedit-iczi-i-tjanjun/" },
723
  ];
724
+
725
  // Генерация или получение UID
726
  function getOrCreateUID() {
727
  let uid = localStorage.getItem('genshinRouletteUID');
 
809
  const bossCategorySelect = document.getElementById('boss-category-select');
810
  const bossesSettingsContainer = document.getElementById('bosses-settings-container');
811
 
 
 
 
 
 
 
812
  // Инициализация темы
813
  function initTheme() {
814
  if (config.darkMode) {
 
836
  function changeCategory() {
837
  config.category = categorySelect.value;
838
  localStorage.setItem('genshinCategory', config.category);
 
839
  // Скрываем все секции
840
  charactersSection.classList.add('hidden');
841
  worldBossesSection.classList.add('hidden');
842
  weeklyBossesSection.classList.add('hidden');
843
  localLegendsSection.classList.add('hidden');
 
844
  // Показываем выбранную секцию
845
  if (config.category === 'characters') {
846
  charactersSection.classList.remove('hidden');
 
884
  card.className = `boss-card legend-card`;
885
  // Делаем карточку кликабельной только если есть ссылка на гайд
886
  const isClickable = legend.guideUrl && legend.guideUrl !== "#";
887
+ let cursorStyle = isClickable ? 'pointer' : 'default';
888
+ let hoverEffect = isClickable ? 'hover:scale-105' : '';
889
+
890
  card.innerHTML = `
891
  <img src="${legend.icon}" alt="${legend.name}"
892
  onerror="this.onerror=null;this.src='https://placehold.co/80x80/EFEAE4/4A4A4A?text=N/A'">
893
  <h3 class="font-bold text-lg dark:text-white">${legend.name}</h3>
894
  <p class="text-sm dark:text-gray-300">${isClickable ? 'Нажмите чтобы узнать про Легенду' : 'Нет ссылки на гайд'}</p>
895
  `;
896
+ card.style.cursor = cursorStyle;
897
+ card.classList.add(hoverEffect);
898
 
899
  if (isClickable) {
 
900
  card.addEventListener('click', () => {
901
  window.open(legend.guideUrl, '_blank');
902
  });
903
  }
 
904
  return card;
905
  }
906
 
 
956
 
957
  bossesSettingsContainer.innerHTML = '';
958
 
959
+ if (bosses.length === 0) {
960
+ bossesSettingsContainer.innerHTML = '<p class="text-center text-gray-500 dark:text-gray-400">Нет доступных боссов для этой категории</p>';
961
+ return;
962
+ }
963
+
964
  bosses.forEach(boss => {
965
  const isExcluded = config.excludedBosses[category].includes(boss.name);
966
  const bossToggle = document.createElement('div');
967
+ bossToggle.className = 'boss-toggle flex items-center border-b border-gray-200 dark:border-gray-700 py-2';
968
  bossToggle.innerHTML = `
969
  <input type="checkbox" id="boss-${category}-${boss.name.replace(/\s+/g, '-')}"
970
+ ${isExcluded ? '' : 'checked'} class="boss-toggle-checkbox h-5 w-5 text-blue-600 rounded">
971
+ <label for="boss-${category}-${boss.name.replace(/\s+/g, '-')}" class="ml-3 text-sm font-medium dark:text-white">${boss.name}</label>
972
  `;
973
  bossesSettingsContainer.appendChild(bossToggle);
974