уменьшение отступов и карточки в 2 ряда в компактном режиме

This commit is contained in:
Илья Братских 2026-06-28 13:56:06 +03:00 committed by KBAHTNET
parent 6ef86bf0bf
commit 39d82f15f6
2 changed files with 82 additions and 66 deletions

View File

@ -94,7 +94,7 @@
</button> </button>
</div> </div>
<div class="control-group"> <div class="control-group view-group">
<span>Вид</span> <span>Вид</span>
<button class="segmented is-active" type="button" data-view="cards"> <button class="segmented is-active" type="button" data-view="cards">
Плитки Плитки

View File

@ -104,12 +104,12 @@ a {
.shell { .shell {
width: min(1320px, calc(100% - 32px)); width: min(1320px, calc(100% - 32px));
margin: 0 auto; margin: 0 auto;
padding: 28px 0; padding: 20px 0;
} }
.hero { .hero {
display: block; display: block;
margin-bottom: 18px; margin-bottom: 12px;
} }
.hero-content, .hero-content,
@ -123,13 +123,13 @@ a {
} }
.hero-content { .hero-content {
min-height: 210px; min-height: 190px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
gap: 10px; gap: 8px;
padding: clamp(18px, 3vw, 28px); padding: clamp(16px, 2.6vw, 24px);
border-radius: 26px; border-radius: 22px;
position: relative; position: relative;
overflow: visible; overflow: visible;
} }
@ -193,8 +193,8 @@ html:not([data-show-numbers="true"]) .item-number {
max-height: calc(100vh - 48px); max-height: calc(100vh - 48px);
overflow: auto; overflow: auto;
display: grid; display: grid;
gap: 14px; gap: 10px;
padding: 18px; padding: 14px;
border-radius: 24px; border-radius: 24px;
opacity: 0; opacity: 0;
visibility: hidden; visibility: hidden;
@ -244,10 +244,10 @@ html:not([data-show-numbers="true"]) .item-number {
.settings-button { .settings-button {
position: absolute; position: absolute;
z-index: 21; z-index: 21;
top: 20px; top: 16px;
right: 20px; right: 16px;
width: 40px; width: 38px;
height: 40px; height: 38px;
display: grid; display: grid;
place-items: center; place-items: center;
border-radius: 999px; border-radius: 999px;
@ -298,13 +298,13 @@ html:not([data-show-numbers="true"]) .item-number {
.search-field input { .search-field input {
width: 100%; width: 100%;
min-height: 42px; min-height: 38px;
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 14px; border-radius: 14px;
background: var(--surface); background: var(--surface);
color: var(--text); color: var(--text);
outline: none; outline: none;
padding: 0 16px; padding: 0 12px;
transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
} }
@ -377,9 +377,9 @@ html:not([data-show-numbers="true"]) .item-number {
.control-group { .control-group {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 6px;
min-height: 48px; min-height: 42px;
padding: 8px; padding: 6px;
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 18px; border-radius: 18px;
background: var(--surface); background: var(--surface);
@ -390,6 +390,18 @@ html:not([data-show-numbers="true"]) .item-number {
padding-left: 6px; padding-left: 6px;
} }
.view-group {
flex-wrap: wrap;
}
.view-group > span {
width: 100%;
}
.view-group .segmented {
flex-basis: calc(50% - 3px);
}
.segmented, .segmented,
.accent-swatch { .accent-swatch {
border: 0; border: 0;
@ -399,7 +411,7 @@ html:not([data-show-numbers="true"]) .item-number {
.segmented { .segmented {
flex: 1; flex: 1;
min-height: 34px; min-height: 31px;
min-width: 0; min-width: 0;
border-radius: 12px; border-radius: 12px;
background: transparent; background: transparent;
@ -423,8 +435,8 @@ html:not([data-show-numbers="true"]) .item-number {
} }
.accent-swatch { .accent-swatch {
width: 36px; width: 32px;
height: 36px; height: 32px;
border: 2px solid transparent; border: 2px solid transparent;
border-radius: 999px; border-radius: 999px;
box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
@ -487,11 +499,11 @@ html:not([data-show-numbers="true"]) .item-number {
.catalog { .catalog {
display: grid; display: grid;
gap: 18px; gap: 12px;
} }
.catalog-section { .catalog-section {
border-radius: 32px; border-radius: 24px;
overflow: hidden; overflow: hidden;
} }
@ -514,9 +526,9 @@ html:not([data-show-numbers="true"]) .item-number {
.section-head { .section-head {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
gap: 18px; gap: 12px;
align-items: flex-start; align-items: flex-start;
padding: 24px; padding: 18px;
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
background: background:
radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.14), transparent 22rem), radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.14), transparent 22rem),
@ -541,16 +553,16 @@ html:not([data-show-numbers="true"]) .item-number {
} }
.section-head h2 { .section-head h2 {
margin-top: 8px; margin-top: 5px;
font-size: clamp(1.6rem, 4vw, 2.6rem); font-size: clamp(1.35rem, 3.2vw, 2.15rem);
} }
.section-head p:not(.section-number), .section-head p:not(.section-number),
.group-head p:not(.group-number) { .group-head p:not(.group-number) {
max-width: 760px; max-width: 760px;
margin: 8px 0 0; margin: 5px 0 0;
color: var(--muted); color: var(--muted);
line-height: 1.65; line-height: 1.5;
} }
.section-count { .section-count {
@ -584,13 +596,13 @@ html:not([data-show-numbers="true"]) .item-number {
.section-groups { .section-groups {
display: grid; display: grid;
gap: 18px; gap: 12px;
padding: 18px; padding: 12px;
} }
.catalog-group { .catalog-group {
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 24px; border-radius: 18px;
background: rgba(255, 255, 255, 0.035); background: rgba(255, 255, 255, 0.035);
overflow: hidden; overflow: hidden;
} }
@ -598,14 +610,14 @@ html:not([data-show-numbers="true"]) .item-number {
.group-head { .group-head {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
gap: 16px; gap: 12px;
padding: 18px; padding: 14px;
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
} }
.group-head h3 { .group-head h3 {
margin-top: 6px; margin-top: 4px;
font-size: 1.22rem; font-size: 1.08rem;
} }
.group-count { .group-count {
@ -623,21 +635,21 @@ html:not([data-show-numbers="true"]) .item-number {
.items-grid { .items-grid {
display: grid; display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px; gap: 10px;
padding: 14px; padding: 10px;
} }
.nav-card { .nav-card {
--tilt-x: 0deg; --tilt-x: 0deg;
--tilt-y: 0deg; --tilt-y: 0deg;
position: relative; position: relative;
min-height: 224px; min-height: 196px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 12px;
padding: 18px; padding: 14px;
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 22px; border-radius: 18px;
background: var(--panel); background: var(--panel);
color: var(--text); color: var(--text);
text-decoration: none; text-decoration: none;
@ -681,8 +693,8 @@ html:not([data-show-numbers="true"]) .item-number {
} }
.nav-card img { .nav-card img {
width: 58px; width: 50px;
height: 58px; height: 50px;
object-fit: contain; object-fit: contain;
filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.22)); filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.22));
} }
@ -690,11 +702,11 @@ html:not([data-show-numbers="true"]) .item-number {
.card-content { .card-content {
position: relative; position: relative;
display: grid; display: grid;
gap: 7px; gap: 5px;
} }
.nav-card h4 { .nav-card h4 {
font-size: 1.08rem; font-size: 1rem;
line-height: 1.25; line-height: 1.25;
} }
@ -708,14 +720,14 @@ html:not([data-show-numbers="true"]) .item-number {
.tags { .tags {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 6px; gap: 5px;
margin-top: 4px; margin-top: 2px;
} }
.tags span { .tags span {
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 999px; border-radius: 999px;
padding: 4px 8px; padding: 3px 7px;
background: rgba(var(--accent-rgb), 0.1); background: rgba(var(--accent-rgb), 0.1);
color: var(--muted); color: var(--muted);
font-size: 0.76rem; font-size: 0.76rem;
@ -769,11 +781,11 @@ html:not([data-show-numbers="true"]) .item-number {
.catalog.list-view .nav-card, .catalog.list-view .nav-card,
.catalog.compact-list-view .nav-card { .catalog.compact-list-view .nav-card {
min-height: 112px; min-height: 96px;
display: grid; display: grid;
grid-template-columns: 58px minmax(0, 1fr) 42px; grid-template-columns: 50px minmax(0, 1fr) 36px;
align-items: center; align-items: center;
gap: 16px; gap: 12px;
} }
.catalog.list-view .arrow, .catalog.list-view .arrow,
@ -787,12 +799,12 @@ html:not([data-show-numbers="true"]) .item-number {
} }
.catalog.compact-list-view .items-grid { .catalog.compact-list-view .items-grid {
grid-template-columns: 1fr; grid-template-columns: repeat(2, minmax(0, 1fr));
} }
.catalog.compact-cards-view .section-head, .catalog.compact-cards-view .section-head,
.catalog.compact-list-view .section-head { .catalog.compact-list-view .section-head {
padding: 18px 20px; padding: 14px 16px;
} }
.catalog.compact-cards-view .section-head p:not(.section-number), .catalog.compact-cards-view .section-head p:not(.section-number),
@ -811,7 +823,7 @@ html:not([data-show-numbers="true"]) .item-number {
.catalog.compact-cards-view .group-head, .catalog.compact-cards-view .group-head,
.catalog.compact-list-view .group-head { .catalog.compact-list-view .group-head {
padding: 14px 16px; padding: 10px 12px;
align-items: center; align-items: center;
} }
@ -822,9 +834,9 @@ html:not([data-show-numbers="true"]) .item-number {
} }
.catalog.compact-cards-view .nav-card { .catalog.compact-cards-view .nav-card {
min-height: 132px; min-height: 116px;
gap: 10px; gap: 8px;
padding: 14px; padding: 12px;
} }
.catalog.compact-cards-view .nav-card img { .catalog.compact-cards-view .nav-card img {
@ -850,8 +862,8 @@ html:not([data-show-numbers="true"]) .item-number {
} }
.catalog.compact-list-view .nav-card { .catalog.compact-list-view .nav-card {
min-height: 78px; min-height: 70px;
padding: 12px 14px; padding: 10px 12px;
grid-template-columns: 42px minmax(0, 1fr) 34px; grid-template-columns: 42px minmax(0, 1fr) 34px;
} }
@ -899,13 +911,13 @@ html:not([data-show-numbers="true"]) .item-number {
@media (max-width: 720px) { @media (max-width: 720px) {
.shell { .shell {
width: min(100% - 22px, 1320px); width: min(100% - 22px, 1320px);
padding: 22px 0; padding: 14px 0;
} }
.hero-content { .hero-content {
min-height: auto; min-height: auto;
padding: 22px 16px; padding: 16px 14px;
border-radius: 24px; border-radius: 20px;
} }
.control-panel, .control-panel,
@ -952,12 +964,16 @@ html:not([data-show-numbers="true"]) .item-number {
} }
.section-groups { .section-groups {
padding: 12px; padding: 8px;
} }
.items-grid { .items-grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
padding: 12px; padding: 8px;
}
.catalog.compact-list-view .items-grid {
grid-template-columns: 1fr;
} }
.catalog.compact-cards-view .items-grid { .catalog.compact-cards-view .items-grid {
@ -965,7 +981,7 @@ html:not([data-show-numbers="true"]) .item-number {
} }
.nav-card { .nav-card {
min-height: 210px; min-height: 180px;
} }
.catalog.list-view .nav-card { .catalog.list-view .nav-card {