MediaWiki:Test.js: различия между версиями

Страница интерфейса MediaWiki
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
document.addEventListener('DOMContentLoaded', function () {
.lore-dropdown {
   var toggles = document.querySelectorAll('.lore-toggle');
   position: relative;
   toggles.forEach(function (toggle) {
   display: inline-block;
    toggle.addEventListener('click', function () {
}
      var list = this.nextElementSibling;
      list.style.display = (list.style.display === 'block' ? 'none' : 'block');
    });
  });


   var links = document.querySelectorAll('.lore-link');
.lore-toggle {
   links.forEach(function (link) {
   background-color: #1c1c1c;
    link.addEventListener('click', function () {
  color: #e0e0e0;
      var href = this.getAttribute('data-href');
  padding: 8px 16px;
      window.location.href = href;
  cursor: pointer;
    });
  font-weight: bold;
   });
  border: 2px solid #4b7a9a;
});
  border-radius: 6px;
  display: inline-block;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
  font-family: 'Segoe UI', sans-serif;
   box-shadow: inset 0 0 4px rgba(75,122,154,0.4);
}
 
.lore-toggle:hover {
  background-color: #2a2a2a;
  border-color: #69a3c8;
  color: #ffffff;
}
 
.lore-list {
  display: none; /* Скрыто по умолчанию */
  position: absolute;
  background-color: #2a2a2a;
  min-width: 160px;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
 
.lore-list li a {
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
   font-family: 'Segoe UI', sans-serif;
}
 
.lore-list li a:hover {
  background-color: #444;
}

Версия от 07:30, 10 мая 2025

.lore-dropdown {
  position: relative;
  display: inline-block;
}

.lore-toggle {
  background-color: #1c1c1c;
  color: #e0e0e0;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: bold;
  border: 2px solid #4b7a9a;
  border-radius: 6px;
  display: inline-block;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: inset 0 0 4px rgba(75,122,154,0.4);
}

.lore-toggle:hover {
  background-color: #2a2a2a;
  border-color: #69a3c8;
  color: #ffffff;
}

.lore-list {
  display: none; /* Скрыто по умолчанию */
  position: absolute;
  background-color: #2a2a2a;
  min-width: 160px;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.lore-list li a {
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
  font-family: 'Segoe UI', sans-serif;
}

.lore-list li a:hover {
  background-color: #444;
}