MediaWiki:Common.css: відмінності між версіями
Перейти до навігації
Перейти до пошуку
Немає опису редагування Мітка: Скасовано |
Немає опису редагування Мітка: Скасовано |
||
| Рядок 328: | Рядок 328: | ||
background: #f0f6ff; | background: #f0f6ff; | ||
transform: translateX(5px); | 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:26, 24 березня 2026
/* ══════════════════════════════════════════════
1. ГЛОБАЛЬНІ СКИНОВІ НАЛАШТУВАННЯ (Vector)
══════════════════════════════════════════════ */
/* Прибираємо обмеження ширини Vector */
body.skin-vector-2022 .mw-page-container-inner,
body.skin-vector .mw-content-container,
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); }
/* ══════════════════════════════════════════════
2. ПРИВІТАННЯ ТА СТАТИСТИКА (Welcome Section)
══════════════════════════════════════════════ */
.welcome-wrapper {
display: flex;
align-items: center;
justify-content: space-between;
gap: 40px;
padding: 60px 5vw;
background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
position: relative;
overflow: hidden;
width: 100%;
box-sizing: border-box;
}
.welcome-text {
flex: 1;
text-align: center;
transform: translateX(-50px); /* Центрування відносно сітки */
z-index: 11;
}
.welcome-title {
font-size: clamp(1.8rem, 4vw, 2.6rem);
font-weight: 800;
line-height: 1.2;
background: linear-gradient(135deg, #003d82 0%, #0066cc 50%, #003d82 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin: 0;
}
.welcome-subtitle {
font-size: 1.4rem;
color: #444;
margin-bottom: 15px;
}
.stats-panel {
width: 280px;
background: rgba(255, 255, 255, 0.75) !important;
backdrop-filter: blur(10px);
border-radius: 20px;
border: 1px solid rgba(0, 61, 130, 0.1) !important;
box-shadow: 0 10px 30px rgba(0, 61, 130, 0.12) !important;
z-index: 11;
}
.stats-panel-header {
background: rgba(0, 61, 130, 0.05);
padding: 15px;
font-weight: 700;
color: #003d82;
border-bottom: 1px solid rgba(0, 61, 130, 0.1);
text-align: center;
}
.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; }
/* ══════════════════════════════════════════════
3. КАТЕГОРІЇ ТА ОСНОВНИЙ ГРИД
══════════════════════════════════════════════ */
.section-categories {
font-size: 2.2rem;
font-weight: 800;
color: #003d82;
text-align: center;
margin: 50px auto 40px;
/* Відступ компенсує праву колонку на десктопі */
margin-right: calc(360px + 5vw + 24px);
}
.section-categories::after {
content: '';
display: block;
width: 80px;
height: 5px;
background: linear-gradient(90deg, #ffd700, #ffed4e);
margin: 15px auto 0;
border-radius: 10px;
}
.main-content-layout {
display: flex;
gap: 30px;
padding: 0 5vw;
margin-bottom: 80px;
align-items: flex-start;
justify-content: center; /* Центрування всього блоку */
}
/* Розумна сітка категорій */
.category-grid-container {
display: grid !important;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
gap: 25px !important;
flex: 1;
justify-content: center !important;
}
.category-card {
background: white;
border-radius: 20px;
border: 1px solid rgba(0, 61, 130, 0.08);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
overflow: hidden;
max-width: 350px;
margin: 0 auto; /* Центрування картки в колонці */
display: flex;
flex-direction: column;
}
.category-card:hover {
transform: translateY(-10px) scale(1.02);
box-shadow: 0 20px 40px rgba(0, 61, 130, 0.15);
}
.card-image { padding: 30px 20px; flex: 1; display: flex; justify-content: center; }
.card-image img { width: 220px; height: 220px; object-fit: contain; }
.card-title {
background: rgba(210, 230, 255, 0.2);
padding: 15px;
text-align: center;
font-weight: 700;
color: #003d82;
margin: 0 15px 15px;
border-radius: 12px;
}
/* Права колонка */
.right-column {
width: 360px;
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 25px;
}
/* ══════════════════════════════════════════════
4. ВЕРХНЯ ПАНЕЛЬ (Header & Navigation)
══════════════════════════════════════════════ */
#mw-head-base {
background: rgba(255, 255, 255, 0.9) !important;
backdrop-filter: blur(15px);
border-bottom: 1px solid rgba(0, 61, 130, 0.1);
}
#p-personal ul {
background: rgba(255, 255, 255, 0.8) !important;
border-radius: 12px;
padding: 5px 15px !important;
border: 1px solid rgba(0, 61, 130, 0.1) !important;
}
#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;
}
/* Рятуємо заголовок "Категорії" */
.section-categories {
margin: 40px auto !important;
margin-right: auto !important; /* Скидаємо правий відступ */
width: 90% !important;
transform: none !important;
}
/* Перебудова Header (щоб не наїжджало) */
#mw-head {
position: relative !important;
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 {
position: static !important;
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; }
.stats-panel { margin: 0 auto !important; width: 100%; max-width: 320px; }
.main-content-layout {
flex-direction: column;
align-items: center;
padding: 0 20px;
}
.right-column { width: 100%; max-width: 400px; margin-top: 50px; }
/* Центрування сітки */
.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)
══════════════════════════════════════════════ */
.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 {
background: #fff;
border-radius: 15px;
padding: 15px;
display: flex;
gap: 15px;
text-decoration: none !important;
border: 1px solid rgba(0,61,130,0.05);
transition: 0.3s;
}
.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;
}