diff --git a/frontend/index.html b/frontend/index.html index d4879c0..66415cd 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -59,11 +59,11 @@ body.no-side .main-inner{gap:0} /* 布局规则(响应式):宽<860 或 高≥1000 → 上下布局;其余(宽屏矮窗)→ 左右分屏 上下布局时去掉对话流下方小输入框(输入统一走底部编辑器),侧栏收起为抽屉 */ .main-inner{flex:1;display:flex;min-height:0;flex-direction:row} -.chat{width:46%;min-width:400px;border-right:1px solid var(--line);border-bottom:none;background:var(--card);display:flex;flex-direction:column;min-height:0;flex:none} +.chat{flex:1 1 46%;min-width:0;max-width:58%;overflow-x:hidden;border-right:1px solid var(--line);border-bottom:none;background:var(--card);display:flex;flex-direction:column;min-height:0} .editor{flex:1;min-height:0} @media (max-width:859px), (min-height:1000px){ .main-inner{flex-direction:column} - .chat{width:100%;min-width:0;border-right:none;border-bottom:1px solid var(--line);flex:5} + .chat{width:100%;min-width:0;max-width:none;border-right:none;border-bottom:1px solid var(--line);flex:5} .editor{flex:4;min-height:180px} .side{position:fixed;left:0;top:52px;bottom:0;z-index:60;width:224px;transform:translateX(-102%);transition:transform .2s ease;box-shadow:4px 0 18px rgba(20,28,40,.16)} .side.open{transform:translateX(0)} @@ -114,12 +114,12 @@ body.no-side .main-inner{gap:0} .judge-card .mdtable{width:100%;border-collapse:collapse;font-size:11.5px;margin:4px 0 8px;background:#fff} .judge-card .mdtable th,.judge-card .mdtable td{border:1px solid #e4e8ee;padding:4px 8px;text-align:left;word-break:break-all;white-space:pre-wrap} .judge-card .mdtable th{background:#f3f5f7;color:#57606a;font-weight:600} -.jc-code{background:#f6f8fa;color:#24292f;font-family:var(--mono);font-size:12px;line-height:1.6;padding:10px;border-radius:6px;border:1px solid #e4e8ee;white-space:pre-wrap;word-break:break-word;overflow:visible;max-height:none} +.jc-code{background:#f6f8fa;color:#24292f;font-family:var(--mono);font-size:12px;line-height:1.6;padding:10px;border-radius:6px;border:1px solid #e4e8ee;white-space:pre-wrap;word-break:break-word;overflow-x:auto;overflow-y:hidden;max-height:none} /* Markdown 代码块 */ .md-code{background:#2d3a4d;border-radius:8px;margin:6px 0;overflow:hidden} .md-code .md-code-lang{display:inline-block;background:#3d4c63;color:#a8c0e0;font-size:10.5px;padding:2px 10px;border-radius:0 0 6px 0;font-family:var(--mono)} .md-code{font-family:var(--mono);font-size:12.5px;line-height:1.6;margin:6px 0} -.md-code pre{background:#f6f8fa;color:#24292f;font-family:var(--mono);font-size:12.5px;line-height:1.6;padding:10px 12px;white-space:pre-wrap;word-break:break-word;overflow:visible;margin:0;max-height:none;border:1px solid #e4e8ee;border-radius:0 0 6px 6px} +.md-code pre{background:#f6f8fa;color:#24292f;font-family:var(--mono);font-size:12.5px;line-height:1.6;padding:10px 12px;white-space:pre-wrap;word-break:break-word;overflow-x:auto;overflow-y:hidden;margin:0;max-height:none;border:1px solid #e4e8ee;border-radius:0 0 6px 6px} .md-code pre code{background:transparent;padding:0;font-family:var(--mono)} .md-code-bar{display:flex;align-items:center;gap:8px;background:#eef1f4;border:1px solid #e4e8ee;border-bottom:none;border-radius:6px 6px 0 0;padding:3px 8px} .md-code-bar .md-code-lang{display:inline-block;background:#e2e8f0;color:#4b5563;font-size:10.5px;padding:2px 6px;border-radius:4px;font-family:var(--mono);flex:1} @@ -154,6 +154,7 @@ body.no-side .main-inner{gap:0} .morph-tabs button{border:none;background:transparent;padding:4px 13px;border-radius:6px;cursor:pointer;color:var(--text2);font-size:12px;font-family:var(--sans);line-height:1.4} .morph-tabs button.on{background:var(--blue);color:#fff;font-weight:600} #codeLang{min-width:84px;border:1px solid var(--line);border-radius:6px;padding:3px 8px;font-size:12px;font-family:inherit;background:#fff;color:var(--text);cursor:pointer} +#codeLang:disabled,#judgeBtn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(1)} /* 统一输入区:宽屏左右分布(输入左、Markdown 预览右) */ .editor-body{flex:1;display:flex;flex-direction:row;min-height:0;padding:12px 14px;gap:10px} .md-editor{flex:1;min-width:0;display:flex;flex-direction:column} @@ -320,7 +321,7 @@ window.MathJax = { startup:{ready:()=>{MathJax.startup.defaultReady();MathJax.startup.promise.then(()=>{window.__mjReady=true;});}} }; - +