fix(phys9): удалить Font Awesome — заменено на inline SVG (Phase 1)
Согласно проектной политике CLAUDE.md «никаких эмодзи и Font Awesome,
только inline SVG .ic», вычистил все 14 вхождений FA из Физики 9.
frontend/textbooks/physics_9_ch{1..5}.html (10 правок):
- Удалён <link rel=stylesheet ... font-awesome.css> (5 файлов)
- Заменён <i class="fas fa-star"></i> на inline SVG звезды (5 мест)
frontend/js/phys9_legacy.js (8 правок):
- fa-lightbulb → SVG лампочки (2 места: подсказка задачи, кнопка «решение»)
- fa-check → SVG галочки (кнопка «Проверить»)
- fa-play → SVG треугольник (кнопка «Запустить»)
- fa-pause → SVG двух полосок (кнопка «Стоп»)
- fa-eye-slash → SVG перечёркнутого глаза («Скрыть решение»)
- fa-sun → SVG солнца (тема — день)
- fa-moon → SVG луны (тема — ночь)
Все SVG имеют атрибут class="ic", stroke=currentColor, viewBox 0 0 24 24
для тёмной темы и масштабируемости.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -2776,14 +2776,14 @@ function renderTask(sec) {
|
||||
<div class="task-card">
|
||||
<div class="task-num">Задача ${s.idx+1} из ${pool.length}${paraBadge}</div>
|
||||
<div class="task-text">${q.q}</div>
|
||||
<div class="task-hint"><i class="fas fa-lightbulb"></i><span>${q.hint}</span></div>
|
||||
<div class="task-hint"><svg class="ic" viewBox="0 0 24 24" style="width:14px;height:14px;display:inline-block;vertical-align:-2px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><path d="M9 18h6M10 22h4M12 2a7 7 0 0 0-4 13c1 1 2 2 2 4h4c0-2 1-3 2-4a7 7 0 0 0-4-13z"/></svg><span>${q.hint}</span></div>
|
||||
<div class="ans-row">
|
||||
<label style="font-weight:700;font-size:.88rem">Ответ:</label>
|
||||
<input class="ans-inp" type="text" id="ainp${sec}" placeholder="?"
|
||||
autocomplete="off"
|
||||
${done ? `disabled style="border-color:var(--${s.results[s.idx] ? 'ok' : 'fail'})"` : ''}>
|
||||
<span class="unit-lbl">${q.unit}</span>
|
||||
${done ? '' : `<button class="btn btn-pri" onclick="checkNum('${sec}')"><i class="fas fa-check"></i> Проверить</button>`}
|
||||
${done ? '' : `<button class="btn btn-pri" onclick="checkNum('${sec}')"><svg class="ic" viewBox="0 0 24 24" style="width:14px;height:14px;display:inline-block;vertical-align:-2px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round"><polyline points="20 6 9 17 4 12"/></svg> Проверить</button>`}
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
@@ -5382,10 +5382,10 @@ function togglePend36() {
|
||||
if (pend36Timer) {
|
||||
clearInterval(pend36Timer);
|
||||
pend36Timer = null;
|
||||
if (btn) btn.innerHTML = '<i class="fas fa-play"></i> Запустить';
|
||||
if (btn) btn.innerHTML = '<svg class="ic" viewBox="0 0 24 24" style="width:14px;height:14px;display:inline-block;vertical-align:-2px;stroke:currentColor;fill:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><polygon points="6 4 20 12 6 20 6 4"/></svg> Запустить';
|
||||
} else {
|
||||
pend36Timer = setInterval(pend36Frame, 30);
|
||||
if (btn) btn.innerHTML = '<i class="fas fa-pause"></i> Стоп';
|
||||
if (btn) btn.innerHTML = '<svg class="ic" viewBox="0 0 24 24" style="width:14px;height:14px;display:inline-block;vertical-align:-2px;stroke:currentColor;fill:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg> Стоп';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5800,10 +5800,10 @@ function toggleSuperAns() {
|
||||
var btn = document.getElementById('superAnsBtn');
|
||||
if (el.style.display === 'none') {
|
||||
el.style.display = 'block';
|
||||
btn.innerHTML = '<i class="fas fa-eye-slash"></i> Скрыть решение';
|
||||
btn.innerHTML = '<svg class="ic" viewBox="0 0 24 24" style="width:14px;height:14px;display:inline-block;vertical-align:-2px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" y1="2" x2="22" y2="22"/></svg> Скрыть решение';
|
||||
} else {
|
||||
el.style.display = 'none';
|
||||
btn.innerHTML = '<i class="fas fa-lightbulb"></i> Показать решение';
|
||||
btn.innerHTML = '<svg class="ic" viewBox="0 0 24 24" style="width:14px;height:14px;display:inline-block;vertical-align:-2px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><path d="M9 18h6M10 22h4M12 2a7 7 0 0 0-4 13c1 1 2 2 2 4h4c0-2 1-3 2-4a7 7 0 0 0-4-13z"/></svg> Показать решение';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5814,12 +5814,12 @@ const themeBtn = document.getElementById('themeBtn');
|
||||
if (themeBtn) {
|
||||
themeBtn.addEventListener('click', () => {
|
||||
const d = document.body.classList.toggle('dark');
|
||||
themeBtn.innerHTML = d ? '<i class="fas fa-sun"></i>' : '<i class="fas fa-moon"></i>';
|
||||
themeBtn.innerHTML = d ? '<svg class="ic" viewBox="0 0 24 24" style="width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/></svg>' : '<svg class="ic" viewBox="0 0 24 24" style="width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></svg>';
|
||||
localStorage.setItem('phys9_theme', d ? '1' : '');
|
||||
});
|
||||
if (localStorage.getItem('phys9_theme') === '1') {
|
||||
document.body.classList.add('dark');
|
||||
themeBtn.innerHTML = '<i class="fas fa-sun"></i>';
|
||||
themeBtn.innerHTML = '<svg class="ic" viewBox="0 0 24 24" style="width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/></svg>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
||||
<link rel="stylesheet" href="/css/phys-textbook-widgets.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"
|
||||
onload="renderMathInElement(document.body,{delimiters:[{left:'$$',right:'$$',display:true},{left:'$',right:'$',display:false},{left:'\\[',right:'\\]',display:true},{left:'\\(',right:'\\)',display:false}],throwOnError:false})"></script>
|
||||
@@ -2092,7 +2091,7 @@ function build_final1(){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-title"><i class="fas fa-star"></i> Интегрированные задачи</div>
|
||||
<div class="section-title"><svg class="ic" viewBox="0 0 24 24" style="width:18px;height:18px;display:inline-block;vertical-align:-3px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg> Интегрированные задачи</div>
|
||||
|
||||
<div class="task-card">
|
||||
<div class="task-num">Задача 1</div>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
||||
<link rel="stylesheet" href="/css/phys-textbook-widgets.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"
|
||||
onload="renderMathInElement(document.body,{delimiters:[{left:'$$',right:'$$',display:true},{left:'$',right:'$',display:false},{left:'\\[',right:'\\]',display:true},{left:'\\(',right:'\\)',display:false}],throwOnError:false})"></script>
|
||||
@@ -1947,7 +1946,7 @@ function build_final2(){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-title"><i class="fas fa-star"></i> Интегрированные задачи</div>
|
||||
<div class="section-title"><svg class="ic" viewBox="0 0 24 24" style="width:18px;height:18px;display:inline-block;vertical-align:-3px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg> Интегрированные задачи</div>
|
||||
|
||||
<div class="task-card">
|
||||
<div class="task-num">Задача 1</div>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
||||
<link rel="stylesheet" href="/css/phys-textbook-widgets.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"
|
||||
onload="renderMathInElement(document.body,{delimiters:[{left:'$$',right:'$$',display:true},{left:'$',right:'$',display:false},{left:'\\[',right:'\\]',display:true},{left:'\\(',right:'\\)',display:false}],throwOnError:false})"></script>
|
||||
@@ -1533,7 +1532,7 @@ function build_final3(){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-title"><i class="fas fa-star"></i> Интегрированные задачи</div>
|
||||
<div class="section-title"><svg class="ic" viewBox="0 0 24 24" style="width:18px;height:18px;display:inline-block;vertical-align:-3px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg> Интегрированные задачи</div>
|
||||
|
||||
<div class="task-card">
|
||||
<div class="task-num">Задача 1</div>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
||||
<link rel="stylesheet" href="/css/phys-textbook-widgets.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"
|
||||
onload="renderMathInElement(document.body,{delimiters:[{left:'$$',right:'$$',display:true},{left:'$',right:'$',display:false},{left:'\\[',right:'\\]',display:true},{left:'\\(',right:'\\)',display:false}],throwOnError:false})"></script>
|
||||
@@ -2303,7 +2302,7 @@ function build_final4(){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-title"><i class="fas fa-star"></i> Интегрированные задачи</div>
|
||||
<div class="section-title"><svg class="ic" viewBox="0 0 24 24" style="width:18px;height:18px;display:inline-block;vertical-align:-3px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg> Интегрированные задачи</div>
|
||||
|
||||
<div class="task-card">
|
||||
<div class="task-num">Задача 1</div>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
||||
<link rel="stylesheet" href="/css/phys-textbook-widgets.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"
|
||||
onload="renderMathInElement(document.body,{delimiters:[{left:'$$',right:'$$',display:true},{left:'$',right:'$',display:false},{left:'\\[',right:'\\]',display:true},{left:'\\(',right:'\\)',display:false}],throwOnError:false})"></script>
|
||||
@@ -1323,7 +1322,7 @@ function build_final5(){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-title"><i class="fas fa-star"></i> Контрольные вопросы по практикуму</div>
|
||||
<div class="section-title"><svg class="ic" viewBox="0 0 24 24" style="width:18px;height:18px;display:inline-block;vertical-align:-3px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg> Контрольные вопросы по практикуму</div>
|
||||
|
||||
<div class="task-card">
|
||||
<div class="task-num">Вопрос 1</div>
|
||||
|
||||
Reference in New Issue
Block a user