mobile . themes

This commit is contained in:
2026-03-05 12:57:55 +08:00
parent b5b9f7db06
commit c325007897
62 changed files with 835 additions and 150 deletions

View File

@@ -149,7 +149,7 @@ async function loadQuestions() {
<p class="text-sm text-slate-800 mb-2">${escapeHtml(q.content)}</p>`;
if (q.type === 'choice' && q.options && q.options.length) {
html += '<div class="text-sm text-slate-600 space-y-1 ml-4">';
q.options.forEach(opt => { html += `<div>${escapeHtml(opt)}</div>`; });
q.options.forEach(opt => { html += `<div class="option-text">${opt}</div>`; });
html += '</div>';
}
if (q.answer) {
@@ -162,6 +162,13 @@ async function loadQuestions() {
html += `</div></div>`;
});
container.innerHTML = html;
// 渲染数学公式
if (typeof renderMathInElement === 'function') {
renderMathInElement(container, {
delimiters: [{left:'$$',right:'$$',display:true},{left:'$',right:'$',display:false}],
throwOnError: false
});
}
} catch(e) {
document.getElementById('question-list').innerHTML = '<div class="text-center py-8 text-red-500">加载失败</div>';
}