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

Матеріал з Київський національний лінгвістичний університет
Перейти до навігації Перейти до пошуку
Немає опису редагування
Мітка: Скасовано
Немає опису редагування
Мітка: Скасовано
Рядок 1: Рядок 1:
/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   1. ГЛОБАЛЬНІ СКИНОВІ НАЛАШТУВАННЯ (Vector)
   1. СБРОС СТАНДАРТНЫХ ОГРАНИЧЕНИЙ MEDIAWIKI
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
#content, #mw-content-container, .mw-body {
    margin: 0;
    padding: 0;
    max-width: none;
}


/* Прибираємо обмеження ширини Vector */
/* Скрываем элементы боковой панели, оставляя логотип */
body.skin-vector-2022 .mw-page-container-inner,
#mw-panel .portal, #mw-panel h3 {
body.skin-vector .mw-content-container,
     display: none;
body.skin-vector .vector-body,
body.skin-vector #bodyContent,
body.skin-vector-2022 .mw-body,
body.skin-vector-2022 .mw-body-content {
     max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
}


#firstHeading { font-size: clamp(28px, 4vw, 48px); }
#mw-panel {
    width: 0;
    position: relative;
}


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   2. ПРИВІТАННЯ ТА СТАТИСТИКА (Welcome Section)
   2. ЛОГОТИП
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
#p-logo {
    display: block;
    margin: 20px auto;
    width: 160px;
    height: 160px;
}


#p-logo a {
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}
/* ══════════════════════════════════════════════
  3. ПРИВЕТСТВИЕ И СТАТИСТИКА
══════════════════════════════════════════════ */
.welcome-wrapper {
.welcome-wrapper {
     display: flex;
     display: flex;
     align-items: center;
    flex-wrap: wrap;
     justify-content: space-between;
     align-items: flex-start;
     gap: 40px;
     justify-content: center;
     gap: 30px;
     padding: 60px 5vw;
     padding: 60px 5vw;
     background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
     background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
    position: relative;
    overflow: hidden;
    width: 100%;
     box-sizing: border-box;
     box-sizing: border-box;
}
}


.welcome-text {
.welcome-text {
     flex: 1;
     flex: 1 1 300px;
     text-align: center;
     text-align: center;
    transform: translateX(-50px); /* Центрування відносно сітки */
    z-index: 11;
}
}


.welcome-title {
.welcome-title {
     font-size: clamp(1.8rem, 4vw, 2.6rem);
     font-size: clamp(1.8rem, 5vw, 3rem);
     font-weight: 800;
     font-weight: 800;
     line-height: 1.2;
     color: #003d82;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 50%, #003d82 100%);
     margin: 0 0 10px;
     -webkit-background-clip: text;
     line-height: 1.1;
     -webkit-text-fill-color: transparent;
    margin: 0;
}
}


.welcome-subtitle {
.welcome-subtitle {
     font-size: 1.4rem;
     font-size: 1.2rem;
     color: #444;
     color: #444;
     margin-bottom: 15px;
     margin-bottom: 10px;
}
}


.stats-panel {
.stats-panel {
     width: 280px;
     flex: 0 0 280px;
     background: rgba(255, 255, 255, 0.75) !important;
     background: rgba(255, 255, 255, 0.8);
     backdrop-filter: blur(10px);
     backdrop-filter: blur(10px);
     border-radius: 20px;
     border-radius: 20px;
    border: 1px solid rgba(0, 61, 130, 0.1) !important;
     box-shadow: 0 10px 30px rgba(0, 61, 130, 0.1);
     box-shadow: 0 10px 30px rgba(0, 61, 130, 0.12) !important;
     border: 1px solid rgba(0, 61, 130, 0.05);
     z-index: 11;
}
 
.stats-panel-header {
    background: rgba(0, 61, 130, 0.05);
     padding: 15px;
     padding: 15px;
    font-weight: 700;
     text-align: left;
    color: #003d82;
    border-bottom: 1px solid rgba(0, 61, 130, 0.1);
     text-align: center;
}
}


/* Статистика */
.stats-panel-item {
.stats-panel-item {
     display: flex;
     display: flex;
     justify-content: space-between;
     justify-content: space-between;
     padding: 12px 20px;
     padding: 10px 0;
     border-bottom: 1px solid rgba(0, 61, 130, 0.05);
     border-bottom: 1px solid rgba(0, 61, 130, 0.05);
}
}


.stats-panel-number { font-weight: 800; color: #003d82; }
.stats-panel-number {
    font-weight: 800;
    color: #003d82;
}


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   3. КАТЕГОРІЇ ТА ОСНОВНИЙ ГРИД
   4. СЕТКА КАТЕГОРИЙ
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
.section-categories {
.section-categories {
     font-size: 2.2rem;
     font-size: 2rem;
     font-weight: 800;
     font-weight: 800;
     color: #003d82;
     color: #003d82;
     text-align: center;
     text-align: center;
     margin: 50px auto 40px;
     margin: 60px auto 40px;
     /* Відступ компенсує праву колонку на десктопі */
     position: relative;
    margin-right: calc(360px + 5vw + 24px);  
}
}


Рядок 106: Рядок 111:
     width: 80px;
     width: 80px;
     height: 5px;
     height: 5px;
     background: linear-gradient(90deg, #ffd700, #ffed4e);
     background: #ffd700;
     margin: 15px auto 0;
     margin: 15px auto 0;
     border-radius: 10px;
     border-radius: 10px;
Рядок 113: Рядок 118:
.main-content-layout {
.main-content-layout {
     display: flex;
     display: flex;
    flex-wrap: wrap;
    justify-content: center;
     gap: 30px;
     gap: 30px;
     padding: 0 5vw;
     padding: 0 5vw;
    margin-bottom: 80px;
    align-items: flex-start;
    justify-content: center; /* Центрування всього блоку */
}
}


/* Розумна сітка категорій */
.category-grid-container {
.category-grid-container {
     display: grid !important;
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
     grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
     gap: 25px !important;
     gap: 25px;
     flex: 1;
     width: 100%;
    justify-content: center !important;
}
}


Рядок 132: Рядок 134:
     background: white;
     background: white;
     border-radius: 20px;
     border-radius: 20px;
    border: 1px solid rgba(0, 61, 130, 0.08);
     box-shadow: 0 8px 25px rgba(0,0,0,0.06);
     box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
     transition: transform 0.3s ease, box-shadow 0.3s ease;
     transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
     text-align: center;
     overflow: hidden;
    max-width: 350px;
    margin: 0 auto; /* Центрування картки в колонці */
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
    border: 1px solid rgba(0,61,130,0.05);
}
}


.category-card:hover {
.category-card:hover {
     transform: translateY(-10px) scale(1.02);
     transform: translateY(-10px);
     box-shadow: 0 20px 40px rgba(0, 61, 130, 0.15);
     box-shadow: 0 15px 35px rgba(0,61,130,0.15);
}
}


.card-image { padding: 30px 20px; flex: 1; display: flex; justify-content: center; }
.card-image {
.card-image img { width: 220px; height: 220px; object-fit: contain; }
    padding: 30px 20px;
}
 
.card-image img {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto;
}


.card-title {
.card-title {
     background: rgba(210, 230, 255, 0.2);
     background: #f0f6ff;
     padding: 15px;
     padding: 15px;
    text-align: center;
     font-weight: 700;
     font-weight: 700;
     color: #003d82;
     color: #003d82;
     margin: 0 15px 15px;
     margin: 0 15px 15px;
     border-radius: 12px;
     border-radius: 12px;
}
/* Права колонка */
.right-column {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}
}


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   4. ВЕРХНЯ ПАНЕЛЬ (Header & Navigation)
   5. АДАПТИВНОСТЬ
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
 
@media (max-width: 1200px) {
#mw-head-base {
    .stats-panel {
    background: rgba(255, 255, 255, 0.9) !important;
        width: 100%;
    backdrop-filter: blur(15px);
        max-width: 320px;
    border-bottom: 1px solid rgba(0, 61, 130, 0.1);
        margin: 20px auto;
        flex: 1 1 auto;
    }
}
}


#p-personal ul {
@media (max-width: 800px) {
    background: rgba(255, 255, 255, 0.8) !important;
     .welcome-wrapper {
    border-radius: 12px;
         flex-direction: column;
    padding: 5px 15px !important;
         padding-top: 30px;
    border: 1px solid rgba(0, 61, 130, 0.1) !important;
         gap: 20px;
}
 
#p-namespaces li.selected, #p-views li.selected {
    border-bottom: 3px solid #003d82 !important;
    background: rgba(210, 230, 255, 0.3) !important;
}
 
/* ══════════════════════════════════════════════
  5. МАЙСТЕР-ПАТЧ АДАПТИВНОСТІ (Mobile)
══════════════════════════════════════════════ */
 
@media (max-width: 1150px) {
     /* Ховаємо бокову панель MediaWiki */
    #mw-panel { display: none !important; }
 
    /* ПРИМУСОВЕ ПОВЕРНЕННЯ ЛОГОТИПА */
    #p-logo {
         display: block !important;
        position: relative !important;
        margin: 20px auto !important;
        width: 160px !important;
        height: 160px !important;
        float: none !important;
    }
    #p-logo a {
        display: block !important;
         width: 160px !important;
        height: 160px !important;
        background-size: contain !important;
         background-position: center !important;
        background-repeat: no-repeat !important;
        margin: 0 auto !important;
     }
     }


    /* Рятуємо заголовок "Категорії" */
     .category-grid-container {
     .section-categories {
         grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
         margin: 40px auto !important;
        margin-right: auto !important; /* Скидаємо правий відступ */
        width: 90% !important;
        transform: none !important;
     }
     }
}


    /* Перебудова Header (щоб не наїжджало) */
@media (max-width: 650px) {
     #mw-head {
     .category-grid-container {
         position: relative !important;
         grid-template-columns: 1fr;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        padding-bottom: 15px !important;
     }
     }


     #p-personal, #left-navigation, #right-navigation, #p-search {
     .category-card {
         position: static !important;
         max-width: 100%;
        float: none !important;
        margin: 10px auto !important;
        display: flex !important;
        justify-content: center !important;
        width: 90% !important;
    }
 
    #p-personal ul { flex-wrap: wrap; justify-content: center; }
 
    /* Перебудова контенту */
    .welcome-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
     }
     }


     .welcome-text { transform: none !important; margin: 0 0 30px 0; }
     .welcome-title {
    .stats-panel { margin: 0 auto !important; width: 100%; max-width: 320px; }
        font-size: 1.6rem;
 
    .main-content-layout {
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
     }
     }


     .right-column { width: 100%; max-width: 400px; margin-top: 50px; }
     #p-logo, #p-logo a {
 
         width: 130px;
    /* Центрування сітки */
         height: 130px;
    .category-grid-container {
         width: 100% !important;
         justify-content: center !important;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
     }
     }
}
@media (max-width: 600px) {
    .welcome-title { font-size: 1.8rem !important; }
    .card-image img { width: 160px; height: 160px; }
    #p-logo a { width: 130px !important; height: 130px !important; }
}
}


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   6. ДОДАТКОВІ ЕФЕКТИ (Animations & Particles)
   6. ДОПОЛНИТЕЛЬНЫЕ ФИКСЫ
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
.scroll-progress {
    position: fixed;
    top: 0; left: 0; height: 4px;
    background: linear-gradient(90deg, #003d82, #ffd700);
    z-index: 10000;
}
.particles-canvas {
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 1;
}
/* ══════════════════════════════════════════════
  7. СТИЛІ ДЛЯ VUE КАРТОК (В середині статей)
══════════════════════════════════════════════ */
.vcc-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 15px !important;
    justify-content: center !important;
}
.vcc-card {
    margin: 0 auto !important;
    width: 100% !important;
}
/* Стилізація випадкових статей */
.random-article-card {
.random-article-card {
     background: #fff;
     background: white;
     border-radius: 15px;
     border-radius: 15px;
     padding: 15px;
     padding: 15px;
     display: flex;
     display: flex;
     gap: 15px;
     gap: 15px;
     text-decoration: none !important;
     text-decoration: none;
    margin-bottom: 10px;
     border: 1px solid rgba(0,61,130,0.05);
     border: 1px solid rgba(0,61,130,0.05);
     transition: 0.3s;
     flex-wrap: wrap;
}
 
.random-article-card:hover {
    background: #f0f6ff;
    transform: translateX(5px);
}
 
/* ══════════════════════════════════════════════
  ULTIMATE LAYOUT & RESPONSIVE PATCH
  (Додайте це в самий кінець файлу)
══════════════════════════════════════════════ */
 
/* 1. ПОВЕРТАЄМО ЛОГОТИП ТА ВИПРАВЛЯЄМО САЙДБАР */
#mw-panel {
    width: 0 !important;
    position: absolute !important;
    visibility: visible !important;
}
 
/* Ховаємо текст меню, лишаємо ЛОГО */
#mw-panel .portal, #mw-panel h3 { display: none !important; }
 
#p-logo {
    display: block !important;
    position: absolute !important;
    top: 10px !important;
    left: 20px !important;
    width: 160px !important;
    height: 160px !important;
    z-index: 100 !important;
}
 
#p-logo a {
    display: block !important;
    width: 160px !important;
    height: 160px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
 
/* 2. ЦЕНТРУВАННЯ ТЕКСТУ ТА СТАТИСТИКИ */
.welcome-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 80px 5vw 60px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
 
.welcome-text {
    flex: 1 !important;
    text-align: center !important;
    margin-right: 300px !important; /* Компенсація для центрування відносно всього екрана */
}
 
.stats-panel {
    width: 280px !important;
    position: absolute !important;
    right: 5vw !important;
}
 
/* 3. СІТКА КАТЕГОРІЙ (3 В РЯД НА ПК) */
.section-categories {
    text-align: center !important;
    margin: 60px auto 40px !important;
    padding-right: 360px !important; /* Щоб заголовок був над картками */
    width: auto !important;
}
 
.main-content-layout {
    display: flex !important;
    gap: 30px !important;
    padding: 0 5vw !important;
    justify-content: center !important;
}
 
.category-grid-container {
    display: grid !important;
    /* ЖОРСТКО: 3 колонки на великих екранах */
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    flex: 1 !important;
    max-width: 1200px !important;
}
 
.category-card {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 360px !important;
}
 
.right-column {
    width: 360px !important;
    flex-shrink: 0 !important;
}
 
/* 4. АДАПТИВНІСТЬ ДЛЯ ПЛАНШЕТІВ (1200px і менше) */
@media (max-width: 1200px) {
    #p-logo {
        position: relative !important;
        margin: 20px auto !important;
        left: 0 !important;
        top: 0 !important;
    }
 
    .welcome-wrapper {
        flex-direction: column !important;
        padding-top: 20px !important;
    }
 
    .welcome-text {
        margin-right: 0 !important;
    }
 
    .stats-panel {
        position: relative !important;
        right: 0 !important;
        margin: 20px auto !important;
        width: 100% !important;
        max-width: 320px !important;
    }
 
    .section-categories {
        padding-right: 0 !important;
        margin: 40px auto !important;
    }
 
    .main-content-layout {
        flex-direction: column !important;
        align-items: center !important;
    }
 
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 в ряд */
    }
 
    .right-column {
        width: 100% !important;
        max-width: 400px !important;
    }
}
 
/* 5. АДАПТИВНІСТЬ ДЛЯ ТЕЛЕФОНІВ (700px і менше) */
@media (max-width: 700px) {
    .category-grid-container {
        grid-template-columns: 1fr !important; /* 1 в ряд */
    }
 
    /* Рятуємо верхню панель (Header) */
    #mw-head {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        position: relative !important;
        top: 0 !important;
    }
 
    #p-personal, #left-navigation, #right-navigation, #p-search {
        position: static !important;
        margin: 5px auto !important;
        width: 95% !important;
        display: flex !important;
        justify-content: center !important;
        float: none !important;
    }
 
    #p-personal ul { flex-wrap: wrap; justify-content: center; }
   
    .welcome-title { font-size: 1.8rem !important; }
}
 
/* Прибираємо білу смугу зліва на всіх роздільних здатностях */
#content, #mw-data-after-content, .mw-body {
    margin-left: 0 !important;
}
}

Версія за 16:30, 24 березня 2026

/* ══════════════════════════════════════════════
   1. СБРОС СТАНДАРТНЫХ ОГРАНИЧЕНИЙ MEDIAWIKI
══════════════════════════════════════════════ */
#content, #mw-content-container, .mw-body {
    margin: 0;
    padding: 0;
    max-width: none;
}

/* Скрываем элементы боковой панели, оставляя логотип */
#mw-panel .portal, #mw-panel h3 {
    display: none;
}

#mw-panel {
    width: 0;
    position: relative;
}

/* ══════════════════════════════════════════════
   2. ЛОГОТИП
══════════════════════════════════════════════ */
#p-logo {
    display: block;
    margin: 20px auto;
    width: 160px;
    height: 160px;
}

#p-logo a {
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* ══════════════════════════════════════════════
   3. ПРИВЕТСТВИЕ И СТАТИСТИКА
══════════════════════════════════════════════ */
.welcome-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    padding: 60px 5vw;
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
    box-sizing: border-box;
}

.welcome-text {
    flex: 1 1 300px;
    text-align: center;
}

.welcome-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    color: #003d82;
    margin: 0 0 10px;
    line-height: 1.1;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 10px;
}

.stats-panel {
    flex: 0 0 280px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 61, 130, 0.1);
    border: 1px solid rgba(0, 61, 130, 0.05);
    padding: 15px;
    text-align: left;
}

/* Статистика */
.stats-panel-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 61, 130, 0.05);
}

.stats-panel-number {
    font-weight: 800;
    color: #003d82;
}

/* ══════════════════════════════════════════════
   4. СЕТКА КАТЕГОРИЙ
══════════════════════════════════════════════ */
.section-categories {
    font-size: 2rem;
    font-weight: 800;
    color: #003d82;
    text-align: center;
    margin: 60px auto 40px;
    position: relative;
}

.section-categories::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: #ffd700;
    margin: 15px auto 0;
    border-radius: 10px;
}

.main-content-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 0 5vw;
}

.category-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    width: 100%;
}

.category-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,61,130,0.05);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,61,130,0.15);
}

.card-image {
    padding: 30px 20px;
}

.card-image img {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto;
}

.card-title {
    background: #f0f6ff;
    padding: 15px;
    font-weight: 700;
    color: #003d82;
    margin: 0 15px 15px;
    border-radius: 12px;
}

/* ══════════════════════════════════════════════
   5. АДАПТИВНОСТЬ
══════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .stats-panel {
        width: 100%;
        max-width: 320px;
        margin: 20px auto;
        flex: 1 1 auto;
    }
}

@media (max-width: 800px) {
    .welcome-wrapper {
        flex-direction: column;
        padding-top: 30px;
        gap: 20px;
    }

    .category-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 650px) {
    .category-grid-container {
        grid-template-columns: 1fr;
    }

    .category-card {
        max-width: 100%;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    #p-logo, #p-logo a {
        width: 130px;
        height: 130px;
    }
}

/* ══════════════════════════════════════════════
   6. ДОПОЛНИТЕЛЬНЫЕ ФИКСЫ
══════════════════════════════════════════════ */
.random-article-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    gap: 15px;
    text-decoration: none;
    margin-bottom: 10px;
    border: 1px solid rgba(0,61,130,0.05);
    flex-wrap: wrap;
}