Match norm finder table to video with row toggles

This commit is contained in:
anor
2026-12-04 17:26:04 +10:00
parent 927ac978ef
commit 5f50dab4ab
5 changed files with 327 additions and 143 deletions
+31 -33
View File
@@ -77,23 +77,37 @@
.tree-list { list-style:none; margin:0; padding:0 0 0 12px; border-left:1px solid var(--line); }
.tree-list button { width:100%; text-align:left; border:0; border-radius:5px; background:transparent;
padding:6px; color:var(--text); font-size:.84rem; line-height:1.3; }
.tree-arrow { display:inline-block; width:17px; color:#526569; }
.tree-root-toggle { width:100%; border:0; background:#e8f0f3; text-align:left;
padding:7px; font-size:.85rem; font-weight:650; }
.tree-list button:hover,.tree-list button[aria-current="true"] { background:#e9f4f1; color:var(--accent); }
.table-panel { min-width:0; }
.table-panel h2 { margin:0; }
.table-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.norm-scroll { max-width:100%; overflow-x:auto; }
.norm-table { min-width:680px; }
.norm-table th { background:#f6f7f4; position:sticky; top:0; z-index:1; }
.norm-table .norm-row:hover { background:#f8faf8; }
.norm-table .norm-row button { min-height:32px; }
.norm-table .norm-name { min-width:240px; }
.norm-table .inline-cell { padding:0; background:#f8faf8; }
.inline-content { padding:16px; border-left:3px solid var(--accent); }
.inline-content .detail-grid { grid-template-columns:minmax(0,1fr); }
.inline-content .panel { border:0; padding:12px 0; background:transparent; }
.inline-content #quote-panel { border-top:1px solid var(--line); }
.inline-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.inline-actions .secondary { min-height:32px; }
.norm-table { min-width:720px; table-layout:fixed; font-size:.78rem; line-height:1.28; }
.norm-table th,.norm-table td { border:1px solid #d9e0e2; padding:4px 6px; vertical-align:middle; }
.norm-table th { background:#eef2f4; position:sticky; top:0; z-index:1; }
.norm-table .norm-row:hover { background:#f2f7f7; }
.norm-table .norm-row td,.norm-table .norm-resource-row td,
.norm-table .norm-work-row td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.norm-table .norm-family-row { background:#e8f0f3; font-weight:650; }
.norm-table .norm-family-row td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.norm-table .norm-section-heading { background:#f7fafb; }
.norm-table .norm-section-heading td:nth-child(2) { text-decoration:underline; }
.norm-table .norm-work-row,.norm-table .norm-resource-row { background:#fbfcfc; }
.norm-table .norm-name { min-width:0; }
.norm-code-cell { white-space:nowrap; }
.norm-toggle { display:inline-grid; place-items:center; width:19px; height:19px;
padding:0; margin-right:2px; border:1px solid #89999b; border-radius:2px;
background:#fff; color:#526569; font-size:.84rem; line-height:1; vertical-align:middle; }
.norm-toggle:hover,.norm-toggle[aria-expanded="true"] { background:#dcebed; color:#164e57; }
.norm-code { margin-left:5px; font-variant-numeric:tabular-nums; }
.norm-tools-row td { background:#f7fafb; }
.norm-tools { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.norm-tools .secondary { min-height:26px; padding:2px 8px; font-size:.75rem; }
.norm-tools .variant-list { width:100%; }
.table-mobile-hint { display:none; }
.breadcrumb { color:var(--muted); font-size:.84rem; overflow-wrap:anywhere; }
.catalog-mobile { display:none; }
[hidden] { display:none !important; }
@@ -104,25 +118,8 @@
.catalog-mobile { display:block; margin-bottom:10px; }
.catalog-tree { position:static; max-height:45vh; margin-bottom:12px; }
.catalog-tree[hidden] { display:none !important; }
.norm-scroll { overflow:visible; }
.norm-table,.norm-table > tbody,.norm-table > tbody > .norm-detail-row,
.norm-table > tbody > .norm-detail-row > td { display:block; min-width:0; width:100%; }
.norm-table thead { display:none; }
.norm-table .norm-row { display:grid; grid-template-columns:minmax(0,1fr) auto;
gap:5px 12px; padding:13px 0; border-top:1px solid var(--line); }
.norm-table .norm-row td { border:0; padding:0; min-width:0; }
.norm-table .norm-row td:nth-child(1) { grid-column:1 / -1; }
.norm-table .norm-row td:nth-child(2) { grid-column:1 / -1; overflow-wrap:anywhere; }
.norm-table .norm-row td:nth-child(3) { grid-column:1; }
.norm-table .norm-row td:nth-child(4) { grid-column:2; }
.norm-table .norm-row td:nth-child(5) { grid-column:1 / -1; }
.norm-table .norm-row .inline-actions { gap:6px; }
.norm-table .norm-row .inline-actions button { flex:1 1 auto; }
.inline-content { padding:12px 10px; }
.inline-content #detail-title { font-size:1.05rem; overflow-wrap:anywhere; }
.inline-content .scroll { overflow-x:auto; }
.inline-content .scroll table { min-width:560px; }
.inline-content .detail-grid { display:block; }
.table-mobile-hint { display:block; }
.norm-table { min-width:760px; }
}
</style>
</head>
@@ -150,7 +147,8 @@
<section id="results-section" class="panel table-panel" aria-label="Нормы сборника">
<div class="table-heading"><h2 id="results-title">Нормы сборника</h2><span id="result-count" class="hint"></span></div>
<p id="breadcrumb" class="breadcrumb"></p>
<div class="norm-scroll"><table class="norm-table"><thead><tr><th>Шифр</th><th>Наименование</th><th>Ед. изм.</th><th class="num">Базисная стоимость</th><th>Действия</th></tr></thead><tbody id="results"></tbody></table></div>
<p class="hint table-mobile-hint">Таблица прокручивается по горизонтали.</p>
<div class="norm-scroll"><table class="norm-table"><colgroup><col style="width:18%"><col style="width:47%"><col style="width:12%"><col style="width:10%"><col style="width:13%"></colgroup><thead><tr><th>Шифр</th><th>Наименование</th><th>Ед. изм.</th><th class="num">Расход</th><th class="num">ПЗ, руб.</th></tr></thead><tbody id="results"></tbody></table></div>
<div class="actions" style="margin-top:16px"><button id="more-results" type="button" class="secondary" hidden>Показать ещё нормы</button></div>
</section>
</div>
@@ -181,6 +179,6 @@
<section id="compare-section" class="section" hidden><h2>Сравнение норм</h2><p id="compare-warning" class="notice" hidden></p>
<div id="comparison" class="comparison"></div></section>
</main>
<script src="/static/norm-finder.js?v=2026-12-04f" defer></script>
<script src="/static/norm-finder.js?v=2026-12-04g" defer></script>
</body>
</html>