MediaWiki:Common.css: відмінності між версіями

нема опису редагування
Немає опису редагування
Немає опису редагування
Рядок 902: Рядок 902:
}
}


<div class="mcc-hero-card">
/* ==================================================== */
    <a href="https://mafiacc.site/index.php/{{{NICKNAME|}}}" class="mcc-hero-link" title="{{{NICKNAME|}}}">
/* СЕКЦІЯ СТИЛІВ КАРТОК ГЕРОЇВ (СТАНДАРТ) */
       
/* ==================================================== */
        [[Файл:Hero_{{{NICKNAME|}}}.png|{{{WIDTH|242px}}}|class=hero-image-wiki]]
 
       
.mcc-heroes-list {
        <div class="mcc-hero-info">
  display: flex;
            <div class="mcc-hero-nickname">{{{NICKNAME|}}}</div>
  flex-wrap: wrap;
            <div class="mcc-hero-date">{{{DATE|}}}</div>
  justify-content: space-between;
        </div>
  list-style: none;
    </a>
  padding: 0;
</div>
  margin: 20px 0;
}
 
.mcc-heroes-list li {
  width: 18.5%; /* П'ять карток у ряду */
  margin-bottom: 20px;
}
 
/* Стилі картки - зовнішній контейнер */
.mcc-hero-card {
  height: 200px; /* Висота картки */
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background-color: #333; /* Запасний фон */
  transition: box-shadow 0.3s ease-in-out;
}
 
/* Стилі для посилання (контейнер) */
.mcc-hero-link {
    display: block;
    height: 100%;
    width: 100%;
    position: relative;
    text-decoration: none;
    color: white;
    z-index: 2; /* Посилання повинно бути вище зображення */
    overflow: hidden;
}
 
/* ---------------------------------------------------- */
/* ПОЗИЦІОНУВАННЯ ТА АНІМАЦІЯ ЗОБРАЖЕННЯ */
/* ---------------------------------------------------- */
 
/* 1. SPAN контейнер: позиціонування */
.mcc-hero-card .hero-image-wiki {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}
 
/* 2. IMG елемент: масштабування та ефекти */
.mcc-hero-card .hero-image-wiki img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Поводиться як background-size: cover */
    transform: scale(1);
    transition: transform 0.3s ease-in-out; /* Плавна анімація */
}
 
/* Анімація при наведенні: збільшення зображення */
.mcc-hero-card:hover .hero-image-wiki img {
  transform: scale(1.1); /* Збільшення на 10% */
}
 
/* Градієнт для читабельності тексту */
.mcc-hero-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Градієнт: 70% чорного знизу, плавно до прозорого на 50% висоти */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.0) 50%);
    z-index: 1.5; /* Над зображенням, під текстом */
}
 
/* Інформаційний блок */
.mcc-hero-info {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  padding: 0 5px;
  box-sizing: border-box;
  z-index: 3;
}
 
.mcc-hero-nickname {
  font-size: 14px;
  color: white;
  font-weight: bold;
  line-height: 1.2;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}
 
.mcc-hero-date {
  font-size: 14px;
  color: yellow;
  opacity: 0.9;
  line-height: 1.2;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}
 
/* Тінь при наведенні */
.mcc-hero-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}