diff --git a/frontend/index.html b/frontend/index.html index ad781c7..2b4f20f 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -498,7 +498,13 @@ function renderLatexGuide(pre){ var html=''; if(CUR_COURSE && CUR_COURSE!=='common'){ var c=courses.filter(function(x){return x.id===CUR_COURSE;})[0]; - if(c) html+=guideCourse(c); + if(c){ + html+=guideCourse(c); + } else { + /* 该学科无速查表(如代码课):视为未选择,展示全部学科 + Markdown 入门 */ + courses.forEach(function(x){ if(x.id!=='common') html+=guideCourse(x); }); + html+=markdownQuickStart(); + } } else { courses.forEach(function(c){ if(c.id!=='common') html+=guideCourse(c); }); html+=markdownQuickStart(); @@ -545,6 +551,7 @@ function loadLatexChips(){ hint.style.cssText='font-size:11px;color:var(--text3);margin-left:2px'; hint.textContent='· 点击插入模板'; box.appendChild(hint); + latexLive(); // 数据就绪后刷新预览区教程 }).catch(function(){ /* 速查表加载失败:保留最小常用集 */ var box=document.getElementById('latexChips');