Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 30220ccad2 | |||
| 342d9e3cfc |
|
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 13 KiB |
@@ -1,7 +1,7 @@
|
|||||||
:root { --b:#1f4ea3; --line:#cfe0ff; }
|
:root { --b:#1f4ea3; --line:#cfe0ff; }
|
||||||
* { box-sizing: border-box; }
|
* { box-sizing: border-box; }
|
||||||
body { margin:0; font-family:Manrope,sans-serif; background:#f0f5ff; color:#1a2746; }
|
body { margin:0; font-family:Manrope,sans-serif; background:#f0f5ff; color:#1a2746; }
|
||||||
body.ib { background:#fff1f1; }
|
body.ib { background:#eefaf3; }
|
||||||
.wrap { width:min(1600px, calc(100% - 24px)); margin:12px auto 24px; }
|
.wrap { width:min(1600px, calc(100% - 24px)); margin:12px auto 24px; }
|
||||||
.top {
|
.top {
|
||||||
background: linear-gradient(130deg, #1f4ea3, #3977df);
|
background: linear-gradient(130deg, #1f4ea3, #3977df);
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
align-items:center;
|
align-items:center;
|
||||||
gap:10px;
|
gap:10px;
|
||||||
}
|
}
|
||||||
body.ib .top { background: linear-gradient(130deg, #9b2f3a, #c24a56); }
|
body.ib .top { background: linear-gradient(130deg, #1f7a4a, #37a96b); }
|
||||||
.scope-switch { display:flex; gap:8px; }
|
.scope-switch { display:flex; gap:8px; }
|
||||||
.scope-chip {
|
.scope-chip {
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
@@ -75,3 +75,88 @@
|
|||||||
th:first-child { z-index: 3; }
|
th:first-child { z-index: 3; }
|
||||||
td input { transform: scale(1.05); }
|
td input { transform: scale(1.05); }
|
||||||
.matrix-tip { margin:0 0 6px; font-size:12px; color:#37507d; }
|
.matrix-tip { margin:0 0 6px; font-size:12px; color:#37507d; }
|
||||||
|
|
||||||
|
@media (max-width: 980px) {
|
||||||
|
.wrap {
|
||||||
|
width: calc(100% - 16px);
|
||||||
|
margin: 8px auto 16px;
|
||||||
|
}
|
||||||
|
.top {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
.top > div:last-child {
|
||||||
|
width: 100%;
|
||||||
|
display: grid !important;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
}
|
||||||
|
.top > div:last-child a,
|
||||||
|
.top > div:last-child form,
|
||||||
|
.top > div:last-child button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.scope-switch {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.scope-chip {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
.lists {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
.list-box {
|
||||||
|
max-height: 300px;
|
||||||
|
}
|
||||||
|
.list-item {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.matrix-wrap {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
.matrix-scroll {
|
||||||
|
max-height: 62vh;
|
||||||
|
}
|
||||||
|
th, td {
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
th:first-child,
|
||||||
|
td:first-child {
|
||||||
|
min-width: 170px;
|
||||||
|
}
|
||||||
|
input[type="text"],
|
||||||
|
select,
|
||||||
|
button {
|
||||||
|
min-height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.top > div:last-child {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
.inline-product {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
.matrix-h-scroll {
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
.matrix-scroll::-webkit-scrollbar,
|
||||||
|
.matrix-h-scroll::-webkit-scrollbar {
|
||||||
|
height: 18px;
|
||||||
|
width: 12px;
|
||||||
|
}
|
||||||
|
th:first-child,
|
||||||
|
td:first-child {
|
||||||
|
min-width: 145px;
|
||||||
|
}
|
||||||
|
.matrix-tip {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -48,63 +48,15 @@
|
|||||||
box-shadow: 0 8px 18px rgba(24, 124, 72, .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 {
|
||||||
position: fixed;
|
margin-bottom: 12px;
|
||||||
top: 14px;
|
display: flex;
|
||||||
left: 16px;
|
justify-content: flex-start;
|
||||||
z-index: 200;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero {
|
.hero {
|
||||||
@@ -154,14 +106,10 @@
|
|||||||
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(119px, 16.8vw, 196px);
|
width: clamp(170px, 24vw, 280px);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -190,14 +138,6 @@
|
|||||||
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;
|
||||||
@@ -206,36 +146,7 @@
|
|||||||
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 {
|
||||||
@@ -269,23 +180,11 @@
|
|||||||
|
|
||||||
.card h2 {
|
.card h2 {
|
||||||
margin: 0 0 10px;
|
margin: 0 0 10px;
|
||||||
font-size: 12px;
|
font-size: 14px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 1.1px;
|
letter-spacing: .9px;
|
||||||
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 {
|
||||||
@@ -357,18 +256,9 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background: linear-gradient(140deg, #0d7e59, #0a6648);
|
background: linear-gradient(140deg, #0d7e59, #0a6648);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 9px 18px;
|
padding: 9px 14px;
|
||||||
font-weight: 800;
|
font-weight: 700;
|
||||||
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 {
|
||||||
@@ -384,18 +274,14 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 14px;
|
margin-bottom: 12px;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding-bottom: 12px;
|
|
||||||
border-bottom: 1px solid #e2ecff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.result-head h3 {
|
.result-head h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 16px;
|
font-size: 17px;
|
||||||
color: #1f3f77;
|
color: #1f3f77;
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: .2px;
|
|
||||||
}
|
}
|
||||||
.active-filters {
|
.active-filters {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -456,46 +342,17 @@
|
|||||||
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 {
|
.row-card strong { color: #1a3e79; font-size: 14px; }
|
||||||
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: linear-gradient(135deg, #f0f6ff, #e4efff);
|
background: #eaf2ff;
|
||||||
color: #1e4a8d;
|
color: #234b89;
|
||||||
padding: 4px 10px;
|
padding: 4px 8px;
|
||||||
border: 1px solid #c8dcff;
|
border: 1px solid #d2e3ff;
|
||||||
font-weight: 600;
|
|
||||||
transition: .16s ease;
|
|
||||||
}
|
|
||||||
.tag:hover {
|
|
||||||
background: linear-gradient(135deg, #e4efff, #d4e6ff);
|
|
||||||
}
|
}
|
||||||
a.tag {
|
a.tag {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -506,12 +363,7 @@
|
|||||||
a.tag::after {
|
a.tag::after {
|
||||||
content: "↗";
|
content: "↗";
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
opacity: .8;
|
opacity: .85;
|
||||||
}
|
|
||||||
a.tag:hover {
|
|
||||||
background: linear-gradient(135deg, #daeaff, #c8ddff);
|
|
||||||
transform: translateY(-1px);
|
|
||||||
box-shadow: 0 4px 8px rgba(30, 74, 141, .12);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.credit {
|
.credit {
|
||||||
@@ -522,28 +374,25 @@
|
|||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
#btn-contact-ruslan {
|
.credit .name {
|
||||||
font-family: Caveat, cursive;
|
font-family: Caveat, cursive;
|
||||||
font-size: 21px;
|
font-size: 14px;
|
||||||
color: #1c3f7c;
|
color: #1c3f7c;
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0;
|
|
||||||
line-height: 1;
|
|
||||||
transition: opacity .15s ease, transform .15s ease;
|
|
||||||
}
|
}
|
||||||
#btn-contact-ruslan:hover {
|
.credit a {
|
||||||
opacity: .75;
|
font-size: 7px;
|
||||||
transform: scale(1.04);
|
color: #2f5fae;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 980px) {
|
@media (max-width: 980px) {
|
||||||
.brand-logo { max-width: 160px; }
|
.brand-logo { max-width: 240px; }
|
||||||
.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; }
|
||||||
#btn-contact-ruslan { font-size: 14px; }
|
.credit .name { font-size: 8px; }
|
||||||
|
.credit a { font-size: 6px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
@@ -552,16 +401,10 @@
|
|||||||
margin: 10px auto 18px;
|
margin: 10px auto 18px;
|
||||||
}
|
}
|
||||||
.brand-strip {
|
.brand-strip {
|
||||||
position: fixed;
|
margin-bottom: 8px;
|
||||||
top: 10px;
|
|
||||||
left: 10px;
|
|
||||||
z-index: 200;
|
|
||||||
}
|
}
|
||||||
.brand-logo {
|
.brand-logo {
|
||||||
width: clamp(110px, 36vw, 170px);
|
width: clamp(132px, 42vw, 190px);
|
||||||
}
|
|
||||||
.wrap {
|
|
||||||
padding-top: 60px;
|
|
||||||
}
|
}
|
||||||
.hero {
|
.hero {
|
||||||
padding: 16px 14px 20px;
|
padding: 16px 14px 20px;
|
||||||
@@ -574,20 +417,11 @@
|
|||||||
.hero p {
|
.hero p {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.mode-switch-row {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
.mode-switch {
|
.mode-switch {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
}
|
}
|
||||||
.polygon-btn {
|
|
||||||
width: 100%;
|
|
||||||
justify-content: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
.mode-btn {
|
.mode-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 42px;
|
min-height: 42px;
|
||||||
@@ -640,9 +474,8 @@
|
|||||||
background: rgba(255, 255, 255, .86);
|
background: rgba(255, 255, 255, .86);
|
||||||
border: 1px solid #dbe6ff;
|
border: 1px solid #dbe6ff;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 4px 8px;
|
padding: 4px 6px;
|
||||||
}
|
}
|
||||||
#btn-contact-ruslan { font-size: 12px; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 420px) {
|
@media (max-width: 420px) {
|
||||||
@@ -657,220 +490,3 @@
|
|||||||
font-size: 11px;
|
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; }
|
|
||||||
}
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 451 B |
@@ -4,29 +4,12 @@
|
|||||||
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;
|
||||||
@@ -50,9 +33,29 @@
|
|||||||
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", () => {
|
||||||
@@ -86,20 +89,4 @@
|
|||||||
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;
|
|
||||||
});
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -20,84 +20,10 @@
|
|||||||
resultSection: document.querySelector(".result"),
|
resultSection: document.querySelector(".result"),
|
||||||
filtersSection: document.querySelector(".board"),
|
filtersSection: document.querySelector(".board"),
|
||||||
activeFilters: document.getElementById("activeFilters"),
|
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) {
|
||||||
@@ -199,45 +125,31 @@
|
|||||||
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", () => {
|
||||||
const wasSelected = state.selectedVendors.has(vendor.id);
|
const wasSelected = state.selectedVendors.has(vendor.id);
|
||||||
state.selectedVendors.clear();
|
if (wasSelected) state.selectedVendors.delete(vendor.id);
|
||||||
if (!wasSelected) state.selectedVendors.add(vendor.id);
|
else state.selectedVendors.add(vendor.id);
|
||||||
render();
|
render();
|
||||||
if (wasSelected) scrollAfterDeselect();
|
if (wasSelected) scrollAfterDeselect();
|
||||||
else scrollToResultsSmooth();
|
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;
|
||||||
@@ -252,17 +164,12 @@
|
|||||||
el.categoryList.appendChild(node);
|
el.categoryList.appendChild(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ps = visibleSets().allowedProducts.size;
|
el.stats.textContent = `Вендоров: ${allowedVendors.size}/${state.data.vendors.length} | Категорий: ${allowedCategories.size}/${state.data.categories.length} | Продуктов: ${visibleSets().allowedProducts.size}/${state.data.products.length}`;
|
||||||
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) {
|
||||||
@@ -276,7 +183,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, products });
|
rows.push({ vendor: vendor.name, products });
|
||||||
}
|
}
|
||||||
|
|
||||||
el.resultRows.innerHTML = "";
|
el.resultRows.innerHTML = "";
|
||||||
@@ -285,62 +192,21 @@
|
|||||||
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");
|
||||||
if (row.vendor.slug) {
|
title.textContent = row.vendor;
|
||||||
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) {
|
||||||
// IB scope: link to vendor's mont page; infra: link to product url
|
const hasUrl = product.url && String(product.url).trim().length > 0;
|
||||||
let url = '';
|
const tag = document.createElement(hasUrl ? "a" : "span");
|
||||||
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 (url) {
|
if (hasUrl) {
|
||||||
tag.href = url;
|
tag.href = product.url;
|
||||||
tag.target = "_blank";
|
tag.target = "_blank";
|
||||||
tag.rel = "noopener noreferrer";
|
tag.rel = "noopener noreferrer";
|
||||||
}
|
}
|
||||||
@@ -435,7 +301,6 @@
|
|||||||
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() {
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |