style(textbooks): компактная кнопка «В лабораторию» (иконка + счётчик)
Кнопка на карточке учебника наследовала .tb-btn{flex:1} и растягивалась
наравне с «Продолжить» — длинный текст переносился на 3 строки, колба
вставала посреди слова. Теперь .tb-lab-btn — компактный квадрат (как
кнопка ДЗ): только колба, при нескольких связях добавляется число;
полное название в title. flex:0 0 auto + white-space:nowrap убирают
перенос, колба тонирована в --violet как научный акцент.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -164,6 +164,13 @@
|
|||||||
width:auto; min-width:42px; padding:9px 12px;
|
width:auto; min-width:42px; padding:9px 12px;
|
||||||
flex:0 0 auto;
|
flex:0 0 auto;
|
||||||
}
|
}
|
||||||
|
.tb-lab-btn {
|
||||||
|
width:auto; min-width:42px; padding:9px 12px;
|
||||||
|
flex:0 0 auto; white-space:nowrap;
|
||||||
|
font-variant-numeric: tabular-nums; font-weight:800;
|
||||||
|
}
|
||||||
|
.tb-lab-btn svg { stroke:var(--violet); flex-shrink:0; }
|
||||||
|
.tb-lab-btn:hover { border-color:var(--violet); background:rgba(155,93,229,.08); }
|
||||||
|
|
||||||
.tb-empty {
|
.tb-empty {
|
||||||
grid-column: 1 / -1;
|
grid-column: 1 / -1;
|
||||||
@@ -521,9 +528,8 @@
|
|||||||
${isTeacher ? `<button class="tb-btn tb-assign-btn" onclick="openAssignModal('${t.slug}', '${esc(t.title)}')" title="Назначить чтение как ДЗ">
|
${isTeacher ? `<button class="tb-btn tb-assign-btn" onclick="openAssignModal('${t.slug}', '${esc(t.title)}')" title="Назначить чтение как ДЗ">
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20M2 12h20"/></svg>
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20M2 12h20"/></svg>
|
||||||
</button>` : ''}
|
</button>` : ''}
|
||||||
${(labLinks[t.slug] && labLinks[t.slug].length) ? `<button class="tb-btn tb-lab-btn" onclick="openLabSim('${esc(labLinks[t.slug][0].id)}', event)" title="Открыть связанную симуляцию в лаборатории">
|
${(labLinks[t.slug] && labLinks[t.slug].length) ? `<button class="tb-btn tb-lab-btn" onclick="openLabSim('${esc(labLinks[t.slug][0].id)}', event)" title="В лабораторию${labLinks[t.slug].length > 1 ? ' — связанных симуляций: ' + labLinks[t.slug].length : ''}" aria-label="В лабораторию">
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 3h6m-4.5 0v5.5l-4 7.5a1 1 0 0 0 .9 1.5h8.2a1 1 0 0 0 .9-1.5l-4-7.5V3"/></svg>
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 3h6m-4.5 0v5.5l-4 7.5a1 1 0 0 0 .9 1.5h8.2a1 1 0 0 0 .9-1.5l-4-7.5V3"/></svg>${labLinks[t.slug].length > 1 ? labLinks[t.slug].length : ''}
|
||||||
В лабораторию${labLinks[t.slug].length > 1 ? ' (' + labLinks[t.slug].length + ')' : ''}
|
|
||||||
</button>` : ''}
|
</button>` : ''}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user