Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c0c2ea14a | |||
| 1a8dd74be6 | |||
| 61f1338405 | |||
| c80492315a | |||
| c603e5d30f | |||
| 060b9e3993 | |||
| c4e9a9294b | |||
| 4fc4ef9342 | |||
| 7c97349619 | |||
| 5d6023bd48 | |||
| cae952cd87 | |||
| 36ec4ae0ce | |||
| 97b5910c3d | |||
| 7648d93a07 | |||
| d37b45f66c | |||
| 5a8471e85c | |||
| 26f17a8bb6 | |||
| 1bf9aeb749 | |||
| 800965598c | |||
| 1747c31ba3 | |||
| 3a5ce8a6c5 | |||
| 60ff3a7116 |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 451 B |
@@ -26,37 +26,85 @@
|
|||||||
}
|
}
|
||||||
body.scope-ib {
|
body.scope-ib {
|
||||||
background:
|
background:
|
||||||
radial-gradient(1200px 700px at -10% -10%, #ffb3b3 0%, transparent 58%),
|
radial-gradient(1200px 700px at -10% -10%, #b8f3cf 0%, transparent 58%),
|
||||||
radial-gradient(900px 500px at 110% -20%, #ffbeb3 0%, transparent 52%),
|
radial-gradient(900px 500px at 110% -20%, #b2efd6 0%, transparent 52%),
|
||||||
linear-gradient(160deg, #ffd7d7 0%, #ffb8b8 100%);
|
linear-gradient(160deg, #daf8e8 0%, #bdeecf 100%);
|
||||||
}
|
}
|
||||||
body.scope-ib .hero {
|
body.scope-ib .hero {
|
||||||
background:
|
background:
|
||||||
linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,0) 45%),
|
linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,0) 45%),
|
||||||
linear-gradient(125deg, #7a1f2a 0%, #b43444 55%, #d34d57 100%);
|
linear-gradient(125deg, #1f7a4a 0%, #2f9c61 55%, #47b879 100%);
|
||||||
}
|
}
|
||||||
body.scope-ib .hero::after {
|
body.scope-ib .hero::after {
|
||||||
background-color: rgba(90, 15, 28, .45);
|
background-color: rgba(10, 74, 45, .42);
|
||||||
}
|
}
|
||||||
body.scope-ib .hero::before {
|
body.scope-ib .hero::before {
|
||||||
background:
|
background:
|
||||||
linear-gradient(to top, rgba(255,255,255,.9) 0 2px, rgba(255,255,255,0) 2px),
|
linear-gradient(to top, rgba(255,255,255,.9) 0 2px, rgba(255,255,255,0) 2px),
|
||||||
rgba(74, 9, 24, .42);
|
rgba(10, 61, 38, .40);
|
||||||
}
|
}
|
||||||
body.scope-ib .mode-btn.active {
|
body.scope-ib .mode-btn.active {
|
||||||
background: linear-gradient(140deg, #9a2331, #c03d4c);
|
background: linear-gradient(140deg, #1d8d54, #2fac6d);
|
||||||
box-shadow: 0 8px 18px rgba(158, 33, 51, .35);
|
box-shadow: 0 8px 18px rgba(24, 124, 72, .35);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* IB colour overrides */
|
||||||
|
body.scope-ib .chip.active {
|
||||||
|
background: linear-gradient(140deg, #1a7a47, #27a362);
|
||||||
|
box-shadow: 0 6px 16px rgba(27,122,71,.28);
|
||||||
|
}
|
||||||
|
body.scope-ib .tag {
|
||||||
|
background: linear-gradient(135deg, #edfaf3, #d8f5e7);
|
||||||
|
color: #165c35;
|
||||||
|
border-color: #b3e8cc;
|
||||||
|
}
|
||||||
|
body.scope-ib .tag:hover,
|
||||||
|
body.scope-ib a.tag:hover {
|
||||||
|
background: linear-gradient(135deg, #d6f5e5, #c0edda);
|
||||||
|
box-shadow: 0 4px 8px rgba(22,92,53,.12);
|
||||||
|
}
|
||||||
|
body.scope-ib .count-badge {
|
||||||
|
color: #1d8d54;
|
||||||
|
background: #e2f7ed;
|
||||||
|
border-color: #b8e8cc;
|
||||||
|
}
|
||||||
|
body.scope-ib .row-card::before {
|
||||||
|
background: linear-gradient(90deg, #27a362 0%, #7dd9a8 60%, transparent 100%);
|
||||||
|
}
|
||||||
|
body.scope-ib .active-filter {
|
||||||
|
border-color: #b8e8cc;
|
||||||
|
background: linear-gradient(145deg, #f2fbf6, #e2f7ed);
|
||||||
|
color: #165c35;
|
||||||
|
}
|
||||||
|
body.scope-ib .active-filter .remove {
|
||||||
|
background: #c8edda;
|
||||||
|
color: #1a6b40;
|
||||||
|
}
|
||||||
|
body.scope-ib .active-filter .remove:hover { background: #a8e0c0; }
|
||||||
|
body.scope-ib .card h2::before {
|
||||||
|
background: linear-gradient(180deg, #27a362, #1a7a47);
|
||||||
|
}
|
||||||
|
body.scope-ib .vtt-link.mont,
|
||||||
|
body.scope-ib .vib-link.mont {
|
||||||
|
background: linear-gradient(135deg, #1a7a47, #27a362);
|
||||||
|
}
|
||||||
|
body.scope-ib .vib-logo-text { color: #27a362; }
|
||||||
|
body.scope-ib .vendor-info-bar {
|
||||||
|
background: linear-gradient(135deg, #edfaf3 0%, #d8f5e7 100%);
|
||||||
|
border-color: #b3e8cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap {
|
.wrap {
|
||||||
width: min(1400px, calc(100% - 32px));
|
width: min(1400px, calc(100% - 32px));
|
||||||
margin: 18px auto 28px;
|
margin: 18px auto 28px;
|
||||||
|
padding-top: 68px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-strip {
|
.brand-strip {
|
||||||
margin-bottom: 12px;
|
position: fixed;
|
||||||
display: flex;
|
top: 14px;
|
||||||
justify-content: flex-start;
|
left: 16px;
|
||||||
|
z-index: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero {
|
.hero {
|
||||||
@@ -106,10 +154,14 @@
|
|||||||
font-size: clamp(26px, 4.8vw, 48px);
|
font-size: clamp(26px, 4.8vw, 48px);
|
||||||
letter-spacing: .3px;
|
letter-spacing: .3px;
|
||||||
line-height: 1.02;
|
line-height: 1.02;
|
||||||
|
background: linear-gradient(115deg, #ffffff 25%, #b8d8ff 100%);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-logo {
|
.brand-logo {
|
||||||
width: clamp(170px, 24vw, 280px);
|
width: clamp(119px, 16.8vw, 196px);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -138,6 +190,14 @@
|
|||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mode-switch-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.mode-switch {
|
.mode-switch {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
@@ -146,7 +206,36 @@
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border: 1px solid #d9e6ff;
|
border: 1px solid #d9e6ff;
|
||||||
box-shadow: 0 8px 24px rgba(26, 58, 118, .08);
|
box-shadow: 0 8px 24px rgba(26, 58, 118, .08);
|
||||||
margin-top: 12px;
|
}
|
||||||
|
|
||||||
|
.polygon-btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 9px 16px;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: .2px;
|
||||||
|
color: #fff;
|
||||||
|
background: linear-gradient(140deg, #e05c1f, #e08c39);
|
||||||
|
box-shadow: 0 8px 18px rgba(200, 80, 20, .28);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: .18s ease;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.polygon-btn::after {
|
||||||
|
content: "↗";
|
||||||
|
font-size: 12px;
|
||||||
|
opacity: .85;
|
||||||
|
}
|
||||||
|
|
||||||
|
.polygon-btn:hover {
|
||||||
|
background: linear-gradient(140deg, #c94f15, #d4782e);
|
||||||
|
box-shadow: 0 10px 22px rgba(200, 80, 20, .38);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mode-btn {
|
.mode-btn {
|
||||||
@@ -180,11 +269,23 @@
|
|||||||
|
|
||||||
.card h2 {
|
.card h2 {
|
||||||
margin: 0 0 10px;
|
margin: 0 0 10px;
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: .9px;
|
letter-spacing: 1.1px;
|
||||||
color: #234782;
|
color: #234782;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 7px;
|
||||||
|
}
|
||||||
|
.card h2::before {
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
width: 3px;
|
||||||
|
height: 14px;
|
||||||
|
border-radius: 2px;
|
||||||
|
background: linear-gradient(180deg, #3978e0, #1f4ea3);
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
@@ -256,9 +357,18 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background: linear-gradient(140deg, #0d7e59, #0a6648);
|
background: linear-gradient(140deg, #0d7e59, #0a6648);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 9px 14px;
|
padding: 9px 18px;
|
||||||
font-weight: 700;
|
font-weight: 800;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: Manrope, sans-serif;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: .18s ease;
|
||||||
|
letter-spacing: .2px;
|
||||||
|
}
|
||||||
|
button.action:hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 8px 18px rgba(10, 100, 70, .30);
|
||||||
|
background: linear-gradient(140deg, #0e8d64, #0c7551);
|
||||||
}
|
}
|
||||||
|
|
||||||
.result {
|
.result {
|
||||||
@@ -274,14 +384,65 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 14px;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
border-bottom: 1px solid #e2ecff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.result-head h3 {
|
.result-head h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 17px;
|
font-size: 16px;
|
||||||
color: #1f3f77;
|
color: #1f3f77;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: .2px;
|
||||||
|
}
|
||||||
|
.active-filters {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
margin: 0 0 12px;
|
||||||
|
padding: 9px;
|
||||||
|
border-radius: 12px;
|
||||||
|
border: 1px solid #c9dafd;
|
||||||
|
background: linear-gradient(145deg, #e8f0ff, #dbe8ff);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
|
||||||
|
}
|
||||||
|
.active-filter {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 7px;
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 6px 8px 6px 10px;
|
||||||
|
border: 1px solid #cfe0ff;
|
||||||
|
background: linear-gradient(145deg, #f8fbff, #edf4ff);
|
||||||
|
color: #21457f;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.active-filter .kind {
|
||||||
|
opacity: .7;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: .2px;
|
||||||
|
}
|
||||||
|
.active-filter .remove {
|
||||||
|
display: inline-grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: #dbe9ff;
|
||||||
|
color: #1f4a8f;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
transition: .16s ease;
|
||||||
|
}
|
||||||
|
.active-filter .remove:hover {
|
||||||
|
background: #c4dbff;
|
||||||
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.rows {
|
.rows {
|
||||||
@@ -295,17 +456,46 @@
|
|||||||
background: linear-gradient(180deg, #ffffff, #f5f9ff);
|
background: linear-gradient(180deg, #ffffff, #f5f9ff);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: .2s ease;
|
||||||
|
}
|
||||||
|
.row-card::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0; left: 0; right: 0;
|
||||||
|
height: 2px;
|
||||||
|
background: linear-gradient(90deg, #3978e0 0%, #7bb4ff 60%, transparent 100%);
|
||||||
|
}
|
||||||
|
.row-card:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 10px 28px rgba(24, 56, 116, .13);
|
||||||
|
border-color: #c4d8ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-card strong { color: #1a3e79; font-size: 14px; }
|
.row-card strong {
|
||||||
|
color: #1a3e79;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 800;
|
||||||
|
display: block;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
border-bottom: 1px solid #e8f0ff;
|
||||||
|
letter-spacing: .1px;
|
||||||
|
}
|
||||||
.tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
|
.tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
|
||||||
.tag {
|
.tag {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: #eaf2ff;
|
background: linear-gradient(135deg, #f0f6ff, #e4efff);
|
||||||
color: #234b89;
|
color: #1e4a8d;
|
||||||
padding: 4px 8px;
|
padding: 4px 10px;
|
||||||
border: 1px solid #d2e3ff;
|
border: 1px solid #c8dcff;
|
||||||
|
font-weight: 600;
|
||||||
|
transition: .16s ease;
|
||||||
|
}
|
||||||
|
.tag:hover {
|
||||||
|
background: linear-gradient(135deg, #e4efff, #d4e6ff);
|
||||||
}
|
}
|
||||||
a.tag {
|
a.tag {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -316,7 +506,12 @@
|
|||||||
a.tag::after {
|
a.tag::after {
|
||||||
content: "↗";
|
content: "↗";
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
opacity: .85;
|
opacity: .8;
|
||||||
|
}
|
||||||
|
a.tag:hover {
|
||||||
|
background: linear-gradient(135deg, #daeaff, #c8ddff);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 4px 8px rgba(30, 74, 141, .12);
|
||||||
}
|
}
|
||||||
|
|
||||||
.credit {
|
.credit {
|
||||||
@@ -327,23 +522,355 @@
|
|||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
.credit .name {
|
#btn-contact-ruslan {
|
||||||
font-family: Caveat, cursive;
|
font-family: Caveat, cursive;
|
||||||
font-size: 14px;
|
font-size: 21px;
|
||||||
color: #1c3f7c;
|
color: #1c3f7c;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1;
|
||||||
|
transition: opacity .15s ease, transform .15s ease;
|
||||||
}
|
}
|
||||||
.credit a {
|
#btn-contact-ruslan:hover {
|
||||||
font-size: 7px;
|
opacity: .75;
|
||||||
color: #2f5fae;
|
transform: scale(1.04);
|
||||||
text-decoration: none;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 980px) {
|
@media (max-width: 980px) {
|
||||||
.brand-logo { max-width: 240px; }
|
.brand-logo { max-width: 160px; }
|
||||||
.board { grid-template-columns: 1fr; }
|
.board { grid-template-columns: 1fr; }
|
||||||
.hero { padding: 20px; }
|
.hero { padding: 20px; }
|
||||||
.credit { right: 8px; bottom: 6px; }
|
.credit { right: 8px; bottom: 6px; }
|
||||||
.credit .name { font-size: 8px; }
|
#btn-contact-ruslan { font-size: 14px; }
|
||||||
.credit a { font-size: 6px; }
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.wrap {
|
||||||
|
width: calc(100% - 16px);
|
||||||
|
margin: 10px auto 18px;
|
||||||
|
}
|
||||||
|
.brand-strip {
|
||||||
|
position: fixed;
|
||||||
|
top: 10px;
|
||||||
|
left: 10px;
|
||||||
|
z-index: 200;
|
||||||
|
}
|
||||||
|
.brand-logo {
|
||||||
|
width: clamp(110px, 36vw, 170px);
|
||||||
|
}
|
||||||
|
.wrap {
|
||||||
|
padding-top: 60px;
|
||||||
|
}
|
||||||
|
.hero {
|
||||||
|
padding: 16px 14px 20px;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
.hero h1 {
|
||||||
|
font-size: clamp(22px, 7vw, 32px);
|
||||||
|
line-height: 1.06;
|
||||||
|
}
|
||||||
|
.hero p {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.mode-switch-row {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
.mode-switch {
|
||||||
|
width: 100%;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
}
|
||||||
|
.polygon-btn {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.mode-btn {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 42px;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
min-height: 0;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
.chip-grid {
|
||||||
|
max-height: 260px;
|
||||||
|
}
|
||||||
|
.chip {
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 8px 10px;
|
||||||
|
}
|
||||||
|
.footer-bar {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 8px;
|
||||||
|
background: rgba(255, 255, 255, .78);
|
||||||
|
border: 1px solid #dbe7ff;
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
button.action {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 42px;
|
||||||
|
}
|
||||||
|
.result {
|
||||||
|
margin-top: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
.active-filters {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.active-filter {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.result-head h3 {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
.rows {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.credit {
|
||||||
|
right: 8px;
|
||||||
|
bottom: 8px;
|
||||||
|
background: rgba(255, 255, 255, .86);
|
||||||
|
border: 1px solid #dbe6ff;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
#btn-contact-ruslan { font-size: 12px; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 420px) {
|
||||||
|
.hero::before,
|
||||||
|
.hero::after {
|
||||||
|
opacity: .72;
|
||||||
|
}
|
||||||
|
.search {
|
||||||
|
padding: 10px 11px;
|
||||||
|
}
|
||||||
|
.tag {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Custom scrollbar */
|
||||||
|
.chip-grid {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: #c5d8f7 transparent;
|
||||||
|
}
|
||||||
|
.chip-grid::-webkit-scrollbar { width: 5px; }
|
||||||
|
.chip-grid::-webkit-scrollbar-track { background: transparent; }
|
||||||
|
.chip-grid::-webkit-scrollbar-thumb { background: #c5d8f7; border-radius: 4px; }
|
||||||
|
.chip-grid::-webkit-scrollbar-thumb:hover { background: #a8c4f0; }
|
||||||
|
|
||||||
|
/* Stat pills */
|
||||||
|
.stat-pill {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
padding: 4px 10px;
|
||||||
|
background: rgba(30, 74, 141, .06);
|
||||||
|
border: 1px solid #d0e0ff;
|
||||||
|
border-radius: 999px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #2a4e8d;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.stat-pill b {
|
||||||
|
color: #1a3e79;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer stats row */
|
||||||
|
#stats {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Entrance animations */
|
||||||
|
@keyframes fadeUp {
|
||||||
|
from { opacity: 0; transform: translateY(10px); }
|
||||||
|
to { opacity: 1; transform: translateY(0); }
|
||||||
|
}
|
||||||
|
.hero { animation: fadeUp .35s ease both; }
|
||||||
|
.board { animation: fadeUp .45s ease .06s both; }
|
||||||
|
.footer-bar { animation: fadeUp .45s ease .09s both; }
|
||||||
|
.result { animation: fadeUp .45s ease .12s both; }
|
||||||
|
|
||||||
|
/* Chip count badge */
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.card-header h2 { margin: 0; }
|
||||||
|
.count-badge {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #3978e0;
|
||||||
|
background: #e8f0ff;
|
||||||
|
border: 1px solid #cddeff;
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 2px 8px;
|
||||||
|
min-width: 28px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ── Vendor tooltip popup ── */
|
||||||
|
.vendor-tooltip {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 9999;
|
||||||
|
width: 280px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: 0 20px 60px rgba(16,43,95,.22), 0 4px 16px rgba(16,43,95,.12);
|
||||||
|
border: 1px solid #dae6ff;
|
||||||
|
padding: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(6px) scale(.97);
|
||||||
|
transition: opacity .18s ease, transform .18s ease;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.vendor-tooltip.visible {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0) scale(1);
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.vtt-logo {
|
||||||
|
width: 100%;
|
||||||
|
height: 160px;
|
||||||
|
background: #f5f8ff;
|
||||||
|
border-bottom: 1px solid #e8f0ff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 12px 20px;
|
||||||
|
}
|
||||||
|
.vtt-logo img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 136px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.vtt-logo-placeholder {
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #3978e0;
|
||||||
|
letter-spacing: .5px;
|
||||||
|
}
|
||||||
|
.vtt-body {
|
||||||
|
padding: 12px 14px 14px;
|
||||||
|
}
|
||||||
|
.vtt-name {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #1a3e79;
|
||||||
|
margin: 0 0 6px;
|
||||||
|
}
|
||||||
|
.vtt-desc {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #4a5d7a;
|
||||||
|
line-height: 1.55;
|
||||||
|
margin: 0 0 10px;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 4;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.vtt-links {
|
||||||
|
display: flex;
|
||||||
|
gap: 6px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.vtt-link {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 4px 9px;
|
||||||
|
border-radius: 999px;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: .15s ease;
|
||||||
|
}
|
||||||
|
.vtt-link.mont {
|
||||||
|
background: linear-gradient(135deg, #1f4ea3, #3978e0);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.vtt-link.site {
|
||||||
|
background: #eef4ff;
|
||||||
|
color: #2a5aaa;
|
||||||
|
border: 1px solid #d0e0ff;
|
||||||
|
}
|
||||||
|
.vtt-link:hover { opacity: .85; }
|
||||||
|
/* Vendor info bar in results */
|
||||||
|
.vendor-info-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 18px;
|
||||||
|
background: linear-gradient(135deg, #f0f5ff 0%, #e8f0ff 100%);
|
||||||
|
border: 1px solid #c8d8f5;
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 16px 20px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
.vendor-info-bar + .vendor-info-bar { margin-top: -8px; }
|
||||||
|
.vib-logo {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 240px;
|
||||||
|
height: 140px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 12px;
|
||||||
|
border: 1px solid #dae6ff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 14px 18px;
|
||||||
|
}
|
||||||
|
.vib-logo img { max-width: 100%; max-height: 112px; object-fit: contain; }
|
||||||
|
.vib-logo-text { font-size: 36px; font-weight: 800; color: #3978e0; }
|
||||||
|
.vib-info { flex: 1; min-width: 0; }
|
||||||
|
.vib-name { font-size: 15px; font-weight: 800; color: #1a3e79; margin: 0 0 5px; }
|
||||||
|
.vib-desc { font-size: 13px; color: #4a5d7a; line-height: 1.55; margin: 0 0 10px; }
|
||||||
|
.vib-links { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||||
|
.vib-link {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 4px 12px;
|
||||||
|
border-radius: 999px;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: .15s ease;
|
||||||
|
}
|
||||||
|
.vib-link.mont { background: linear-gradient(135deg, #1f4ea3, #3978e0); color: #fff; }
|
||||||
|
.vib-link.site { background: #fff; color: #2a5aaa; border: 1px solid #c8d8f5; }
|
||||||
|
.vib-link:hover { opacity: .82; transform: translateY(-1px); }
|
||||||
|
|
||||||
|
/* ── Mobile: no hover tooltips ── */
|
||||||
|
@media (hover: none), (max-width: 768px) {
|
||||||
|
.vendor-tooltip { display: none !important; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Mobile: adaptive vendor info bar ── */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.vendor-info-bar {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
.vib-logo {
|
||||||
|
width: 100%;
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
.vib-logo img { max-height: 90px; }
|
||||||
}
|
}
|
||||||
|
|||||||
|
After Width: | Height: | Size: 451 B |
@@ -4,12 +4,29 @@
|
|||||||
const matrixTable = document.getElementById("matrixTable");
|
const matrixTable = document.getElementById("matrixTable");
|
||||||
const topScroll = document.getElementById("matrixHScroll");
|
const topScroll = document.getElementById("matrixHScroll");
|
||||||
const topScrollInner = document.getElementById("matrixHScrollInner");
|
const topScrollInner = document.getElementById("matrixHScrollInner");
|
||||||
|
document.addEventListener("click", async (event) => {
|
||||||
|
const button = event.target.closest("[data-copy-target]");
|
||||||
|
if (!button) return;
|
||||||
|
const field = document.getElementById(button.dataset.copyTarget);
|
||||||
|
if (!field) return;
|
||||||
|
field.select();
|
||||||
|
field.setSelectionRange(0, field.value.length);
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(field.value);
|
||||||
|
} catch (error) {
|
||||||
|
document.execCommand("copy");
|
||||||
|
}
|
||||||
|
const originalText = button.textContent;
|
||||||
|
button.textContent = "Скопировано";
|
||||||
|
setTimeout(() => {
|
||||||
|
button.textContent = originalText;
|
||||||
|
}, 1600);
|
||||||
|
});
|
||||||
|
|
||||||
if (!matrixForm || !matrixScroll || !matrixTable || !topScroll || !topScrollInner) return;
|
if (!matrixForm || !matrixScroll || !matrixTable || !topScroll || !topScrollInner) return;
|
||||||
|
|
||||||
let isDirty = false;
|
let isDirty = false;
|
||||||
let syncing = false;
|
let syncing = false;
|
||||||
let saveTimer = null;
|
|
||||||
let saveInFlight = false;
|
|
||||||
|
|
||||||
function markDirty() {
|
function markDirty() {
|
||||||
isDirty = true;
|
isDirty = true;
|
||||||
@@ -33,29 +50,9 @@
|
|||||||
syncing = false;
|
syncing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function autoSaveMatrix() {
|
|
||||||
if (saveInFlight) return;
|
|
||||||
saveInFlight = true;
|
|
||||||
try {
|
|
||||||
const formData = new FormData(matrixForm);
|
|
||||||
const response = await fetch(window.location.href, {
|
|
||||||
method: "POST",
|
|
||||||
body: formData,
|
|
||||||
credentials: "same-origin",
|
|
||||||
});
|
|
||||||
if (!response.ok) throw new Error("save failed");
|
|
||||||
isDirty = false;
|
|
||||||
} catch (error) {
|
|
||||||
} finally {
|
|
||||||
saveInFlight = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
matrixForm.addEventListener("change", (event) => {
|
matrixForm.addEventListener("change", (event) => {
|
||||||
if (!(event.target && event.target.matches('input[type="checkbox"]'))) return;
|
if (!(event.target && event.target.matches('input[type="checkbox"]'))) return;
|
||||||
markDirty();
|
markDirty();
|
||||||
if (saveTimer) clearTimeout(saveTimer);
|
|
||||||
saveTimer = setTimeout(autoSaveMatrix, 250);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
matrixForm.addEventListener("submit", () => {
|
matrixForm.addEventListener("submit", () => {
|
||||||
@@ -89,4 +86,20 @@
|
|||||||
window.addEventListener("resize", updateTopScrollWidth);
|
window.addEventListener("resize", updateTopScrollWidth);
|
||||||
updateTopScrollWidth();
|
updateTopScrollWidth();
|
||||||
syncScrollFromMatrix();
|
syncScrollFromMatrix();
|
||||||
|
|
||||||
|
document.addEventListener("click", (event) => {
|
||||||
|
const button = event.target.closest("[data-edit-product]");
|
||||||
|
if (!button) return;
|
||||||
|
const form = document.querySelector(`[data-product-edit="${button.dataset.editProduct}"]`);
|
||||||
|
if (!form) return;
|
||||||
|
form.hidden = !form.hidden;
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener("click", (event) => {
|
||||||
|
const button = event.target.closest("[data-edit-vendor]");
|
||||||
|
if (!button) return;
|
||||||
|
const form = document.querySelector(`[data-vendor-edit="${button.dataset.editVendor}"]`);
|
||||||
|
if (!form) return;
|
||||||
|
form.hidden = !form.hidden;
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -17,10 +17,87 @@
|
|||||||
clearBtn: document.getElementById("clearBtn"),
|
clearBtn: document.getElementById("clearBtn"),
|
||||||
modeInfra: document.getElementById("modeInfra"),
|
modeInfra: document.getElementById("modeInfra"),
|
||||||
modeIb: document.getElementById("modeIb"),
|
modeIb: document.getElementById("modeIb"),
|
||||||
|
resultSection: document.querySelector(".result"),
|
||||||
|
filtersSection: document.querySelector(".board"),
|
||||||
|
activeFilters: document.getElementById("activeFilters"),
|
||||||
|
vendorBadge: document.getElementById("vendorBadge"),
|
||||||
|
categoryBadge: document.getElementById("categoryBadge"),
|
||||||
};
|
};
|
||||||
|
|
||||||
let clickAudioCtx = null;
|
let clickAudioCtx = null;
|
||||||
|
|
||||||
|
// ── Vendor tooltip (desktop / hover-capable devices only) ──
|
||||||
|
const canHover = window.matchMedia('(hover: hover) and (pointer: fine)').matches;
|
||||||
|
const tooltip = document.createElement('div');
|
||||||
|
tooltip.className = 'vendor-tooltip';
|
||||||
|
document.body.appendChild(tooltip);
|
||||||
|
if (canHover) {
|
||||||
|
tooltip.addEventListener('mouseenter', () => { overTooltip = true; clearTimeout(hideTimer); });
|
||||||
|
tooltip.addEventListener('mouseleave', () => { overTooltip = false; hideTooltip(); });
|
||||||
|
}
|
||||||
|
|
||||||
|
let tooltipTimer = null;
|
||||||
|
let hideTimer = null;
|
||||||
|
let overTooltip = false;
|
||||||
|
let vendorMap = {};
|
||||||
|
|
||||||
|
function buildVendorMap() {
|
||||||
|
vendorMap = {};
|
||||||
|
for (const v of state.data.vendors) {
|
||||||
|
vendorMap[v.id] = v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function positionTooltip(chipEl) {
|
||||||
|
const rect = chipEl.getBoundingClientRect();
|
||||||
|
const tw = 280, th = 260;
|
||||||
|
let left = rect.right + 10;
|
||||||
|
let top = rect.top + rect.height / 2 - th / 2;
|
||||||
|
if (left + tw > window.innerWidth - 8) left = rect.left - tw - 10;
|
||||||
|
if (top < 8) top = 8;
|
||||||
|
if (top + th > window.innerHeight - 8) top = window.innerHeight - 8 - th;
|
||||||
|
tooltip.style.left = left + 'px';
|
||||||
|
tooltip.style.top = top + 'px';
|
||||||
|
}
|
||||||
|
|
||||||
|
function showTooltip(chipEl, vendor) {
|
||||||
|
const logo = vendor.logo || '';
|
||||||
|
const desc = vendor.description || '';
|
||||||
|
const mont = vendor.mont_page || '';
|
||||||
|
const site = vendor.website || '';
|
||||||
|
|
||||||
|
let logoHtml = '';
|
||||||
|
if (logo) {
|
||||||
|
logoHtml = `<div class="vtt-logo"><img src="/static/${logo}" alt="${vendor.name}" onerror="this.parentElement.innerHTML='<span class=vtt-logo-placeholder>${vendor.name.slice(0,2).toUpperCase()}</span>'"/></div>`;
|
||||||
|
} else {
|
||||||
|
logoHtml = `<div class="vtt-logo"><span class="vtt-logo-placeholder">${vendor.name.slice(0,2).toUpperCase()}</span></div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
let linksHtml = '';
|
||||||
|
if (mont) linksHtml += `<a class="vtt-link mont" href="${mont}" target="_blank" rel="noopener">MONT ↗</a>`;
|
||||||
|
if (site) linksHtml += `<a class="vtt-link site" href="${site}" target="_blank" rel="noopener">Сайт ↗</a>`;
|
||||||
|
|
||||||
|
tooltip.innerHTML = `
|
||||||
|
${logoHtml}
|
||||||
|
<div class="vtt-body">
|
||||||
|
<div class="vtt-name">${vendor.name}</div>
|
||||||
|
${desc ? `<div class="vtt-desc">${desc}</div>` : ''}
|
||||||
|
${linksHtml ? `<div class="vtt-links">${linksHtml}</div>` : ''}
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
positionTooltip(chipEl);
|
||||||
|
tooltip.classList.add('visible');
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideTooltip(immediate) {
|
||||||
|
clearTimeout(hideTimer);
|
||||||
|
if (immediate) { tooltip.classList.remove('visible'); return; }
|
||||||
|
hideTimer = setTimeout(() => {
|
||||||
|
if (!overTooltip) tooltip.classList.remove('visible');
|
||||||
|
}, 120);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function playScopeClick() {
|
function playScopeClick() {
|
||||||
try {
|
try {
|
||||||
if (!clickAudioCtx) {
|
if (!clickAudioCtx) {
|
||||||
@@ -122,45 +199,70 @@
|
|||||||
const categoryQ = normalize(state.categorySearch);
|
const categoryQ = normalize(state.categorySearch);
|
||||||
|
|
||||||
el.vendorList.innerHTML = "";
|
el.vendorList.innerHTML = "";
|
||||||
|
let vi = 0;
|
||||||
for (const vendor of state.data.vendors) {
|
for (const vendor of state.data.vendors) {
|
||||||
if (vendorQ && !normalize(vendor.name).includes(vendorQ)) continue;
|
if (vendorQ && !normalize(vendor.name).includes(vendorQ)) continue;
|
||||||
const node = document.createElement("button");
|
const node = document.createElement("button");
|
||||||
node.className = "chip";
|
node.className = "chip";
|
||||||
|
vi++;
|
||||||
if (state.selectedVendors.has(vendor.id)) node.classList.add("active");
|
if (state.selectedVendors.has(vendor.id)) node.classList.add("active");
|
||||||
else if (!allowedVendors.has(vendor.id)) node.classList.add("dim");
|
else if (!allowedVendors.has(vendor.id)) node.classList.add("dim");
|
||||||
node.textContent = vendor.name;
|
node.textContent = vendor.name;
|
||||||
node.addEventListener("click", () => {
|
node.addEventListener("click", () => {
|
||||||
if (state.selectedVendors.has(vendor.id)) state.selectedVendors.delete(vendor.id);
|
const wasSelected = state.selectedVendors.has(vendor.id);
|
||||||
else state.selectedVendors.add(vendor.id);
|
state.selectedVendors.clear();
|
||||||
|
if (!wasSelected) state.selectedVendors.add(vendor.id);
|
||||||
render();
|
render();
|
||||||
|
if (wasSelected) scrollAfterDeselect();
|
||||||
|
else scrollToResultsSmooth();
|
||||||
});
|
});
|
||||||
|
if (canHover) {
|
||||||
|
node.addEventListener("mouseenter", () => {
|
||||||
|
clearTimeout(tooltipTimer);
|
||||||
|
tooltipTimer = setTimeout(() => showTooltip(node, vendor), 220);
|
||||||
|
});
|
||||||
|
node.addEventListener("mouseleave", () => {
|
||||||
|
clearTimeout(tooltipTimer);
|
||||||
|
hideTooltip();
|
||||||
|
});
|
||||||
|
}
|
||||||
el.vendorList.appendChild(node);
|
el.vendorList.appendChild(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
el.categoryList.innerHTML = "";
|
el.categoryList.innerHTML = "";
|
||||||
const showOnlyLinkedCategories = state.selectedVendors.size > 0;
|
const showOnlyLinkedCategories = state.selectedVendors.size > 0;
|
||||||
|
let ci = 0;
|
||||||
for (const category of state.data.categories) {
|
for (const category of state.data.categories) {
|
||||||
if (categoryQ && !normalize(category.name).includes(categoryQ)) continue;
|
if (categoryQ && !normalize(category.name).includes(categoryQ)) continue;
|
||||||
if (showOnlyLinkedCategories && !allowedCategories.has(category.id) && !state.selectedCategories.has(category.id)) continue;
|
if (showOnlyLinkedCategories && !allowedCategories.has(category.id) && !state.selectedCategories.has(category.id)) continue;
|
||||||
const node = document.createElement("button");
|
const node = document.createElement("button");
|
||||||
node.className = "chip";
|
node.className = "chip";
|
||||||
|
ci++;
|
||||||
if (state.selectedCategories.has(category.id)) node.classList.add("active");
|
if (state.selectedCategories.has(category.id)) node.classList.add("active");
|
||||||
else if (!allowedCategories.has(category.id)) node.classList.add("dim");
|
else if (!allowedCategories.has(category.id)) node.classList.add("dim");
|
||||||
node.textContent = category.name;
|
node.textContent = category.name;
|
||||||
node.addEventListener("click", () => {
|
node.addEventListener("click", () => {
|
||||||
if (state.selectedCategories.has(category.id)) state.selectedCategories.delete(category.id);
|
const wasSelected = state.selectedCategories.has(category.id);
|
||||||
|
if (wasSelected) state.selectedCategories.delete(category.id);
|
||||||
else state.selectedCategories.add(category.id);
|
else state.selectedCategories.add(category.id);
|
||||||
render();
|
render();
|
||||||
|
if (wasSelected) scrollAfterDeselect();
|
||||||
|
else scrollToResultsSmooth();
|
||||||
});
|
});
|
||||||
el.categoryList.appendChild(node);
|
el.categoryList.appendChild(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
el.stats.textContent = `Вендоров: ${allowedVendors.size}/${state.data.vendors.length} | Категорий: ${allowedCategories.size}/${state.data.categories.length} | Продуктов: ${visibleSets().allowedProducts.size}/${state.data.products.length}`;
|
const ps = visibleSets().allowedProducts.size;
|
||||||
|
el.stats.innerHTML = `<span class="stat-pill">Вендоры <b>${allowedVendors.size}</b> / ${state.data.vendors.length}</span><span class="stat-pill">Категории <b>${allowedCategories.size}</b> / ${state.data.categories.length}</span><span class="stat-pill">Продукты <b>${ps}</b> / ${state.data.products.length}</span>`;
|
||||||
|
if (el.vendorBadge) el.vendorBadge.textContent = allowedVendors.size;
|
||||||
|
if (el.categoryBadge) el.categoryBadge.textContent = allowedCategories.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderResults() {
|
function renderResults() {
|
||||||
const { allowedCategories, allowedVendors, allowedProducts, productsByVendor, categoriesByProduct } = visibleSets();
|
const { allowedCategories, allowedVendors, allowedProducts, productsByVendor, categoriesByProduct } = visibleSets();
|
||||||
const productsById = new Map(state.data.products.map(p => [p.id, p]));
|
const productsById = new Map(state.data.products.map(p => [p.id, p]));
|
||||||
|
const vendorsById = new Map(state.data.vendors.map(v => [v.id, v]));
|
||||||
|
const isIb = state.scope === 'ib';
|
||||||
|
|
||||||
const rows = [];
|
const rows = [];
|
||||||
for (const vendor of state.data.vendors) {
|
for (const vendor of state.data.vendors) {
|
||||||
@@ -174,7 +276,7 @@
|
|||||||
});
|
});
|
||||||
const products = productIds.map(pId => productsById.get(pId)).filter(Boolean);
|
const products = productIds.map(pId => productsById.get(pId)).filter(Boolean);
|
||||||
if (products.length === 0) continue;
|
if (products.length === 0) continue;
|
||||||
rows.push({ vendor: vendor.name, products });
|
rows.push({ vendor, products });
|
||||||
}
|
}
|
||||||
|
|
||||||
el.resultRows.innerHTML = "";
|
el.resultRows.innerHTML = "";
|
||||||
@@ -183,21 +285,62 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Vendor info bars for selected vendors
|
||||||
|
if (state.selectedVendors.size > 0) {
|
||||||
|
for (const vid of state.selectedVendors) {
|
||||||
|
const v = vendorsById.get(vid);
|
||||||
|
if (!v) continue;
|
||||||
|
const bar = document.createElement('div');
|
||||||
|
bar.className = 'vendor-info-bar';
|
||||||
|
const logoInner = v.logo
|
||||||
|
? `<img src="/static/${v.logo}" alt="${v.name}" onerror="this.parentElement.innerHTML='<span class=vib-logo-text>${v.name.slice(0,2).toUpperCase()}</span>'">`
|
||||||
|
: `<span class="vib-logo-text">${v.name.slice(0,2).toUpperCase()}</span>`;
|
||||||
|
let linksHtml = '';
|
||||||
|
if (v.slug) linksHtml += `<a class="vib-link mont" href="/vendor/${v.slug}">Подробнее →</a>`;
|
||||||
|
if (v.mont_page) linksHtml += `<a class="vib-link site" href="${v.mont_page}" target="_blank" rel="noopener">MONT ↗</a>`;
|
||||||
|
if (v.website) linksHtml += `<a class="vib-link site" href="${v.website}" target="_blank" rel="noopener">Сайт ↗</a>`;
|
||||||
|
bar.innerHTML = `
|
||||||
|
<div class="vib-logo">${logoInner}</div>
|
||||||
|
<div class="vib-info">
|
||||||
|
<div class="vib-name">${v.name}</div>
|
||||||
|
${v.description ? `<div class="vib-desc">${v.description}</div>` : ''}
|
||||||
|
${linksHtml ? `<div class="vib-links">${linksHtml}</div>` : ''}
|
||||||
|
</div>`;
|
||||||
|
el.resultRows.appendChild(bar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const row of rows) {
|
for (const row of rows) {
|
||||||
const card = document.createElement("article");
|
const card = document.createElement("article");
|
||||||
card.className = "row-card";
|
card.className = "row-card";
|
||||||
const title = document.createElement("strong");
|
const title = document.createElement("strong");
|
||||||
title.textContent = row.vendor;
|
if (row.vendor.slug) {
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = `/vendor/${row.vendor.slug}`;
|
||||||
|
a.textContent = row.vendor.name;
|
||||||
|
a.style.cssText = "color:inherit;text-decoration:none;";
|
||||||
|
a.addEventListener("mouseenter", () => a.style.textDecoration = "underline");
|
||||||
|
a.addEventListener("mouseleave", () => a.style.textDecoration = "none");
|
||||||
|
title.appendChild(a);
|
||||||
|
} else {
|
||||||
|
title.textContent = row.vendor.name;
|
||||||
|
}
|
||||||
card.appendChild(title);
|
card.appendChild(title);
|
||||||
const tags = document.createElement("div");
|
const tags = document.createElement("div");
|
||||||
tags.className = "tags";
|
tags.className = "tags";
|
||||||
for (const product of row.products) {
|
for (const product of row.products) {
|
||||||
const hasUrl = product.url && String(product.url).trim().length > 0;
|
// IB scope: link to vendor's mont page; infra: link to product url
|
||||||
const tag = document.createElement(hasUrl ? "a" : "span");
|
let url = '';
|
||||||
|
if (isIb) {
|
||||||
|
url = row.vendor.mont_page || '';
|
||||||
|
} else {
|
||||||
|
url = (product.url && String(product.url).trim()) || '';
|
||||||
|
}
|
||||||
|
const tag = document.createElement(url ? "a" : "span");
|
||||||
tag.className = "tag";
|
tag.className = "tag";
|
||||||
tag.textContent = product.name;
|
tag.textContent = product.name;
|
||||||
if (hasUrl) {
|
if (url) {
|
||||||
tag.href = product.url;
|
tag.href = url;
|
||||||
tag.target = "_blank";
|
tag.target = "_blank";
|
||||||
tag.rel = "noopener noreferrer";
|
tag.rel = "noopener noreferrer";
|
||||||
}
|
}
|
||||||
@@ -213,12 +356,86 @@
|
|||||||
el.modeIb.classList.toggle("active", state.scope === "ib");
|
el.modeIb.classList.toggle("active", state.scope === "ib");
|
||||||
document.body.classList.toggle("scope-ib", state.scope === "ib");
|
document.body.classList.toggle("scope-ib", state.scope === "ib");
|
||||||
renderChips();
|
renderChips();
|
||||||
|
renderActiveFilters();
|
||||||
renderResults();
|
renderResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function scrollToResultsSmooth() {
|
||||||
|
if (!el.resultSection) return;
|
||||||
|
const top = Math.max(el.resultSection.getBoundingClientRect().top + window.scrollY - 10, 0);
|
||||||
|
window.scrollTo({ top, behavior: "smooth" });
|
||||||
|
}
|
||||||
|
|
||||||
|
function scrollToFiltersSmooth() {
|
||||||
|
if (!el.filtersSection) return;
|
||||||
|
const top = Math.max(el.filtersSection.getBoundingClientRect().top + window.scrollY - 8, 0);
|
||||||
|
window.scrollTo({ top, behavior: "smooth" });
|
||||||
|
}
|
||||||
|
|
||||||
|
function scrollToTopSmooth() {
|
||||||
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||||
|
}
|
||||||
|
|
||||||
|
function scrollAfterDeselect() {
|
||||||
|
if (window.innerWidth > 980) {
|
||||||
|
scrollToTopSmooth();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
scrollToFiltersSmooth();
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderActiveFilters() {
|
||||||
|
if (!el.activeFilters) return;
|
||||||
|
el.activeFilters.innerHTML = "";
|
||||||
|
|
||||||
|
const vendorsById = new Map(state.data.vendors.map(v => [v.id, v.name]));
|
||||||
|
const categoriesById = new Map(state.data.categories.map(c => [c.id, c.name]));
|
||||||
|
|
||||||
|
const items = [];
|
||||||
|
for (const id of state.selectedVendors) {
|
||||||
|
const name = vendorsById.get(id);
|
||||||
|
if (name) items.push({ kind: "Вендор", name, id, type: "vendor" });
|
||||||
|
}
|
||||||
|
for (const id of state.selectedCategories) {
|
||||||
|
const name = categoriesById.get(id);
|
||||||
|
if (name) items.push({ kind: "Категория", name, id, type: "category" });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.length === 0) {
|
||||||
|
el.activeFilters.style.display = "none";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
el.activeFilters.style.display = "flex";
|
||||||
|
|
||||||
|
for (const item of items) {
|
||||||
|
const node = document.createElement("div");
|
||||||
|
node.className = "active-filter";
|
||||||
|
|
||||||
|
const text = document.createElement("span");
|
||||||
|
text.innerHTML = `<span class="kind">${item.kind}:</span> ${item.name}`;
|
||||||
|
node.appendChild(text);
|
||||||
|
|
||||||
|
const remove = document.createElement("button");
|
||||||
|
remove.className = "remove";
|
||||||
|
remove.type = "button";
|
||||||
|
remove.setAttribute("aria-label", `Убрать фильтр ${item.name}`);
|
||||||
|
remove.textContent = "×";
|
||||||
|
remove.addEventListener("click", () => {
|
||||||
|
if (item.type === "vendor") state.selectedVendors.delete(item.id);
|
||||||
|
else state.selectedCategories.delete(item.id);
|
||||||
|
render();
|
||||||
|
scrollToFiltersSmooth();
|
||||||
|
});
|
||||||
|
node.appendChild(remove);
|
||||||
|
|
||||||
|
el.activeFilters.appendChild(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function loadScopeData(scope) {
|
async function loadScopeData(scope) {
|
||||||
const res = await fetch(`/api/data?scope=${encodeURIComponent(scope)}`);
|
const res = await fetch(`/api/data?scope=${encodeURIComponent(scope)}`);
|
||||||
state.data = await res.json();
|
state.data = await res.json();
|
||||||
|
buildVendorMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
@@ -258,6 +475,7 @@
|
|||||||
el.vendorSearch.value = "";
|
el.vendorSearch.value = "";
|
||||||
el.categorySearch.value = "";
|
el.categorySearch.value = "";
|
||||||
render();
|
render();
|
||||||
|
scrollAfterDeselect();
|
||||||
});
|
});
|
||||||
|
|
||||||
el.modeInfra.addEventListener("click", () => {
|
el.modeInfra.addEventListener("click", () => {
|
||||||
|
|||||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 5.4 KiB |