diff --git a/apps/web/src/oj/classroom/board.vue b/apps/web/src/oj/classroom/board.vue
index 8d76edb..0b034ba 100644
--- a/apps/web/src/oj/classroom/board.vue
+++ b/apps/web/src/oj/classroom/board.vue
@@ -615,7 +615,13 @@ function shortTitle(title: string, size: number) {
没做 {{ problemStats[selectedIndex]!.none }} 人
-
+
@@ -700,8 +706,10 @@ function shortTitle(title: string, size: number) {
|
- {{ GROUP_LABEL[groupOf(student)] }}
- {{ groupCount[groupOf(student)] }}
+
+ {{ GROUP_LABEL[groupOf(student)] }}
+ {{ groupCount[groupOf(student)] }}
+
|
@@ -1164,6 +1172,14 @@ a.who {
color: inherit;
}
+/* 题多了表格要横着滑,名字钉在左边,不然滑过去就不知道是谁的格子 */
+.grid .name {
+ position: sticky;
+ left: 0;
+ z-index: 1;
+ background: v-bind("theme.cardColor");
+}
+
.grid th.col {
width: 96px;
cursor: pointer;
@@ -1213,6 +1229,12 @@ a.who {
background: v-bind("theme.actionColor");
}
+/* 和名字一样钉在左边:横着滑过去也看得见这一组是什么 */
+.group-label {
+ position: sticky;
+ left: 12px;
+}
+
.group-row .muted {
margin-left: 4px;
font-weight: 400;
@@ -1314,4 +1336,57 @@ a.cell {
.meta {
font-size: var(--oj-fs-sec);
}
+
+/* ---------- 手机 ---------- */
+
+@media (max-width: 768px) {
+ /* 题名占一行(收起钉在右边),人数挪到第二行,别把「人」挤到下一行去 */
+ .panel-head {
+ flex-wrap: wrap;
+ gap: 6px 12px;
+ }
+
+ .panel-head > span {
+ order: 2;
+ white-space: nowrap;
+ }
+
+ .panel-title {
+ flex: 1 1 calc(100% - 50px);
+ min-width: 0;
+ }
+
+ .panel-head .spacer {
+ display: none;
+ }
+
+ .panel-close {
+ order: 1;
+ }
+
+ .err-group {
+ min-width: 0;
+ flex: 1 1 100%;
+ box-sizing: border-box;
+ }
+
+ .start-row {
+ flex-wrap: wrap;
+ }
+
+ .start-input {
+ flex-basis: 100%;
+ order: -1;
+ }
+
+ .grid .name {
+ width: auto;
+ padding-left: 4px;
+ padding-right: 8px;
+ }
+
+ .cell {
+ width: 48px;
+ }
+}
diff --git a/apps/web/src/oj/classroom/components/ExplainModal.vue b/apps/web/src/oj/classroom/components/ExplainModal.vue
index 52a4805..e3aaf74 100644
--- a/apps/web/src/oj/classroom/components/ExplainModal.vue
+++ b/apps/web/src/oj/classroom/components/ExplainModal.vue
@@ -14,6 +14,7 @@ import { onKeyStroke } from "@vueuse/core"
import { useThemeVars } from "naive-ui"
import SubmissionView from "oj/submission/components/SubmissionView.vue"
import UserName from "shared/components/UserName.vue"
+import { useBreakpoints } from "shared/composables/breakpoints"
import type { ClassBoardProblem } from "utils/types"
import ProblemBrief from "./ProblemBrief.vue"
@@ -24,6 +25,9 @@ import ProblemBrief from "./ProblemBrief.vue"
*
* 「题目」按钮:演示错误时题目和代码要并排(用户要的),点了左边出题目,再点收起。
* 平时收着,代码照样占满宽。开没开记在这台电脑上,讲下一个人、下一道题还是那样
+ *
+ * 手机上(老师拿手机看看板):顶上拆成三行 —— 题目和关闭、一排人(横着滑)、两个按钮;
+ * 没有键盘所以不写「← → 换人」;题目展开时叠在代码上面,不并排
*/
const props = defineProps<{
problem: ClassBoardProblem | null
@@ -33,6 +37,7 @@ const show = defineModel("show", { required: true })
const index = defineModel("index", { required: true })
const theme = useThemeVars()
+const { isMobile } = useBreakpoints()
/**
* 颜色走内联的 CSS 变量,不用