Відмінності між версіями «Шаблон:Mainpage»
Перейти до навігації
Перейти до пошуку
Мітка: Ручний відкіт |
|||
(Не показано 10 проміжних версій цього користувача) | |||
Рядок 1: | Рядок 1: | ||
{{#css: | {{#css: | ||
.flex-container { | .flex-container { | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
justify-content: space-between; | |||
justify-content: space-between; | gap: 20px; | ||
margin: 40px auto; | |||
margin: 40px auto; | padding: 0 32px; | ||
} | } | ||
/* | /* По умолчанию (mobile-first) — одна колонка */ | ||
.mainpage-card { | .mainpage-card { | ||
flex: | flex: 0 0 100%; | ||
background: #f6f6f6; | background: #f6f6f6; | ||
border: 1px solid #ddd; | border: 1px solid #ddd; | ||
Рядок 26: | Рядок 24: | ||
transition: transform 0.2s ease, box-shadow 0.2s ease; | transition: transform 0.2s ease, box-shadow 0.2s ease; | ||
box-sizing: border-box; | |||
} | |||
/* Две колонки (пример) */ | |||
@media (min-width: 768px) and (max-width: 1199px) { | |||
.mainpage-card { | |||
flex: 0 0 calc((100% - 20px) / 2); | |||
} | |||
} | |||
/* Три колонки (пример) */ | |||
@media (min-width: 1200px) { | |||
.mainpage-card { | |||
flex: 0 0 calc((100% - 40px) / 3); | |||
} | |||
} | |||
/* >>> ВАЖНО: уменьшаем отступы на мобильных (до 767px) <<< */ | |||
@media (max-width: 767px) { | |||
.flex-container { | |||
margin: 20px auto; /* вместо 40px, чтобы уменьшить верх/низ */ | |||
padding: 0 10px; /* вместо 32px, чтобы карточка стала шире */ | |||
} | |||
} | } | ||
Рядок 43: | Рядок 64: | ||
} | } | ||
.mainpage-card .image { | .mainpage-card .image { | ||
height: auto; | height: auto; | ||
min-height: 140px; | min-height: 140px; | ||
display: flex; | display: flex; | ||
justify-content: center; | justify-content: center; | ||
align-items: center; | align-items: center; | ||
margin-bottom: | margin-bottom: 0.5em; | ||
width: 100%; | width: 100%; | ||
} | } | ||
.mainpage-card .image img { | .mainpage-card .image img { | ||
width: 100%; | |||
max-width: | height: auto; | ||
max-width: 100%; | |||
object-fit: contain; | object-fit: contain; | ||
display: block; | display: block; | ||
Рядок 63: | Рядок 83: | ||
} | } | ||
.CategoryTreeItem { | .CategoryTreeItem { | ||
font-size: 1. | font-size: 1.1em !important; | ||
line-height: 1.7 !important; | line-height: 1.7 !important; | ||
text-align: left !important; | text-align: left !important; |
Поточна версія на 02:29, 5 квітня 2025