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

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


/* Скрываем элементы боковой панели, оставляя логотип */
/* Приховуємо елементи бокової панелі, АЛЕ залишаємо логотип */
#mw-panel .portal, #mw-panel h3 {
#mw-panel .portal, #mw-panel h3 {
     display: none;
     display: none !important;
}
}


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


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   2. ЛОГОТИП
   2. ЛОГОТИП (LOGO) - ПРАЦЮЄ ВСЮДИ
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
#p-logo {
#p-logo {
     display: block;
     display: block !important;
     margin: 20px auto;
     position: absolute !important;
     width: 160px;
    top: 10px !important;
     height: 160px;
    left: 20px !important;
     width: 160px !important;
     height: 160px !important;
    z-index: 100 !important;
}
}


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


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


.welcome-text {
.welcome-text {
     flex: 1 1 300px;
     flex: 1;
     text-align: center;
     text-align: center;
    /* Зміщення для балансу з правою панеллю */
    margin-right: 280px;
}
}


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


.welcome-subtitle {
.welcome-subtitle {
     font-size: 1.2rem;
     font-size: 1.5rem;
     color: #444;
     color: #444;
     margin-bottom: 10px;
     margin-bottom: 10px;
Рядок 71: Рядок 76:


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


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


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


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


Рядок 118: Рядок 119:
.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;
    justify-content: center;
    margin-bottom: 100px;
}
}


.category-grid-container {
.category-grid-container {
     display: grid;
     display: grid !important;
     grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* ФІКС: 3 колонки на ПК */
     gap: 25px;
     grid-template-columns: repeat(3, 1fr) !important;
     width: 100%;
     gap: 25px !important;
     flex: 1;
}
}


Рядок 137: Рядок 139:
     transition: transform 0.3s ease, box-shadow 0.3s ease;
     transition: transform 0.3s ease, box-shadow 0.3s ease;
     text-align: center;
     text-align: center;
    border: 1px solid rgba(0,61,130,0.05);
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
    border: 1px solid rgba(0,61,130,0.05);
}
}


Рядок 147: Рядок 149:
}
}


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


.card-title {
.card-title {
Рядок 166: Рядок 159:
     margin: 0 15px 15px;
     margin: 0 15px 15px;
     border-radius: 12px;
     border-radius: 12px;
}
.right-column {
    width: 360px;
    flex-shrink: 0;
}
}


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   5. АДАПТИВНОСТЬ
   5. АДАПТИВНІСТЬ (MOBILE & TABLET)
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
@media (max-width: 1200px) {
@media (max-width: 1200px) {
    #p-logo {
        position: relative !important;
        margin: 20px auto !important;
        left: 0 !important;
    }
    .welcome-wrapper {
        flex-direction: column;
        padding-top: 20px;
    }
    .welcome-text {
        margin-right: 0 !important;
        transform: none !important;
    }
     .stats-panel {
     .stats-panel {
        position: relative !important;
        right: 0 !important;
        margin: 20px auto !important;
         width: 100%;
         width: 100%;
         max-width: 320px;
         max-width: 320px;
         margin: 20px auto;
    }
         flex: 1 1 auto;
 
    .section-categories {
        padding-right: 0 !important;
         margin: 40px auto !important;
    }
 
    .main-content-layout {
         flex-direction: column;
        align-items: center;
    }
 
    .right-column {
        width: 100%;
        max-width: 400px;
    }
 
    /* ФІКС: 2 колонки на планшетах */
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100%;
     }
     }
}
}


@media (max-width: 800px) {
@media (max-width: 800px) {
     .welcome-wrapper {
     #mw-head {
         flex-direction: column;
        display: flex !important;
         padding-top: 30px;
         flex-direction: column !important;
         gap: 20px;
         height: auto !important;
         position: relative !important;
     }
     }


     .category-grid-container {
     #p-personal, #left-navigation, #right-navigation, #p-search {
         grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
         position: static !important;
        margin: 10px auto !important;
        display: flex !important;
        justify-content: center !important;
        width: 90% !important;
     }
     }
    #p-personal ul { flex-wrap: wrap; justify-content: center; }
}
}


@media (max-width: 650px) {
@media (max-width: 650px) {
    /* ФІКС: 1 колонка на телефонах */
     .category-grid-container {
     .category-grid-container {
         grid-template-columns: 1fr;
         grid-template-columns: 1fr !important;
     }
     }
 
   
     .category-card {
     .category-card {
         max-width: 100%;
         max-width: 320px;
    }
 
    .welcome-title {
        font-size: 1.6rem;
     }
     }


     #p-logo, #p-logo a {
    .welcome-title { font-size: 1.8rem !important; }
        width: 130px;
     #p-logo, #p-logo a { width: 130px !important; height: 130px !important; }
        height: 130px;
    }
}
}


/* ══════════════════════════════════════════════
/* Додаткові фікси для випадкових статей */
  6. ДОПОЛНИТЕЛЬНЫЕ ФИКСЫ
══════════════════════════════════════════════ */
.random-article-card {
.random-article-card {
     background: white;
     background: white;
Рядок 220: Рядок 257:
     display: flex;
     display: flex;
     gap: 15px;
     gap: 15px;
     text-decoration: none;
     text-decoration: none !important;
     margin-bottom: 10px;
     margin-bottom: 10px;
     border: 1px solid rgba(0,61,130,0.05);
     border: 1px solid rgba(0,61,130,0.05);
    flex-wrap: wrap;
}
}

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

/* ══════════════════════════════════════════════
   1. СКИДАННЯ СТАНДАРТНИХ ОБМЕЖЕНЬ MEDIAWIKI
══════════════════════════════════════════════ */
#content, #mw-content-container, .mw-body {
    margin-left: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

/* Приховуємо елементи бокової панелі, АЛЕ залишаємо логотип */
#mw-panel .portal, #mw-panel h3 {
    display: none !important;
}

#mw-panel {
    width: 0 !important;
    position: absolute !important;
}

/* ══════════════════════════════════════════════
   2. ЛОГОТИП (LOGO) - ПРАЦЮЄ ВСЮДИ
══════════════════════════════════════════════ */
#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-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center !important;
}

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

.welcome-text {
    flex: 1;
    text-align: center;
    /* Зміщення для балансу з правою панеллю */
    margin-right: 280px; 
}

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

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

.stats-panel {
    width: 280px;
    position: absolute;
    right: 5vw;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 61, 130, 0.1) !important;
    border: 1px solid rgba(0, 61, 130, 0.05) !important;
}

.stats-panel-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 61, 130, 0.05);
}

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

/* ══════════════════════════════════════════════
   4. СІТКА КАТЕГОРІЙ (DESKTOP)
══════════════════════════════════════════════ */
.section-categories {
    font-size: 2.2rem;
    font-weight: 800;
    color: #003d82;
    text-align: center;
    margin: 60px auto 40px;
    padding-right: 360px; /* Відступ під праву колонку */
}

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

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

.category-grid-container {
    display: grid !important;
    /* ФІКС: 3 колонки на ПК */
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    flex: 1;
}

.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;
    border: 1px solid rgba(0,61,130,0.05);
    display: flex;
    flex-direction: column;
}

.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: 200px; height: 200px; object-fit: contain; }

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

.right-column {
    width: 360px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   5. АДАПТИВНІСТЬ (MOBILE & TABLET)
══════════════════════════════════════════════ */

@media (max-width: 1200px) {
    #p-logo {
        position: relative !important;
        margin: 20px auto !important;
        left: 0 !important;
    }

    .welcome-wrapper {
        flex-direction: column;
        padding-top: 20px;
    }

    .welcome-text {
        margin-right: 0 !important;
        transform: none !important;
    }

    .stats-panel {
        position: relative !important;
        right: 0 !important;
        margin: 20px auto !important;
        width: 100%;
        max-width: 320px;
    }

    .section-categories {
        padding-right: 0 !important;
        margin: 40px auto !important;
    }

    .main-content-layout {
        flex-direction: column;
        align-items: center;
    }

    .right-column {
        width: 100%;
        max-width: 400px;
    }

    /* ФІКС: 2 колонки на планшетах */
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100%;
    }
}

@media (max-width: 800px) {
    #mw-head {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        position: relative !important;
    }

    #p-personal, #left-navigation, #right-navigation, #p-search {
        position: static !important;
        margin: 10px auto !important;
        display: flex !important;
        justify-content: center !important;
        width: 90% !important;
    }

    #p-personal ul { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 650px) {
    /* ФІКС: 1 колонка на телефонах */
    .category-grid-container {
        grid-template-columns: 1fr !important;
    }
    
    .category-card {
        max-width: 320px;
    }

    .welcome-title { font-size: 1.8rem !important; }
    #p-logo, #p-logo a { width: 130px !important; height: 130px !important; }
}

/* Додаткові фікси для випадкових статей */
.random-article-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    gap: 15px;
    text-decoration: none !important;
    margin-bottom: 10px;
    border: 1px solid rgba(0,61,130,0.05);
}