style(前台): 页面整体放大一档,列表不再挤成一团;宽屏上内容居中,不再铺满到两边
Deploy / deploy (push) Canceled after 0s

- index.css 加一张 --oj-* 尺寸表和 .oj-page 外壳,二十几个前台页面改成引用它:
  正文 14→15、页标题 20→24、题目/提交列表行高 40→48、比赛/公告 56、筛选控件 28→34
- 阅读型页面限宽 1200 居中;题目/提交列表 1600、比赛详情 1400、排名 1280、班级 PK 1440
- 1280 宽的筛选条放大后放不下,题目/提交列表在 1366 以下退回 13px 的字
- 班级 PK 五个班起格子里不写「一次 x%」(只剩「一次 8…」);赛跑图线尾的数字不再被截掉
- 手机上比赛列表的「没参加」挪到比赛名下面;题单里「以前做对过 · 旧代码先藏着」缩成「做对过」
- 题目详情页(编辑器)和后台不在这一轮

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-10 12:43:12 +08:00
1 parent 45d79ed366
commit 1e441411a5
43 files changed
+1016 -752

No files matched your search

@@ -85,8 +85,8 @@ function hint(tag: KnowledgeLevel) {
<style scoped>
.knowledge {
max-width: 610px;
margin: 16px auto 0;
max-width: 760px;
margin: var(--oj-gap) auto 0;
}
.row {
@@ -125,11 +125,11 @@ function hint(tag: KnowledgeLevel) {
}
.level {
font-size: 13px;
font-size: var(--oj-fs-sec);
color: #18a058;
}
.meta {
font-size: 12px;
font-size: var(--oj-fs-meta);
}
</style>
+17 -14
View File
@@ -151,8 +151,8 @@ onMounted(() => {
<template>
<n-flex class="wrapper" vertical justify="center" align="center" v-if="!loading && profile">
<n-image
:width="96"
:height="96"
:width="112"
:height="112"
:src="profile.avatar"
:preview-disabled="isDefaultAvatar"
object-fit="cover"
@@ -257,14 +257,14 @@ onMounted(() => {
</template>
<style scoped>
.wrapper {
max-width: 610px;
margin: 16px auto 0;
max-width: 760px;
margin: var(--oj-gap) auto 0;
}
.stats {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
gap: 16px;
}
@media (max-width: 600px) {
@@ -277,43 +277,46 @@ onMounted(() => {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 14px 8px;
border-radius: 8px;
gap: 6px;
padding: 20px 12px;
border-radius: var(--oj-radius);
border: 1px solid rgba(128, 128, 128, 0.2);
}
.stat-value {
font-size: 22px;
font-size: 26px;
font-weight: 700;
line-height: 1.2;
}
.stat-label {
font-size: 13px;
font-size: var(--oj-fs-sec);
}
.stat-value.date {
font-size: 16px;
font-size: 18px;
padding: 3px 0;
white-space: nowrap;
}
h2 {
margin: 0;
font-weight: normal;
margin: 4px 0 0;
font-weight: 600;
font-size: var(--oj-fs-title);
}
.desc {
margin: 0 auto;
word-wrap: break-word;
max-width: 100%;
font-size: var(--oj-fs-body);
}
.achievement-title {
font-weight: 600;
font-size: var(--oj-fs-h2);
}
.achievement-recent {
margin-top: 10px;
margin-top: 14px;
}
.achievement-icon {
display: inline-flex;
+48 -33
View File
@@ -1,38 +1,41 @@
<template>
<n-list v-if="messages.length">
<n-list-item :style="{ overflow: 'auto' }" v-for="(item, index) in messages" :key="index">
<n-flex size="large" vertical>
<n-flex align="center">
<div>发送时间</div>
<div>{{ parseTime(item.createTime, "YYYY年M月D日 HH:mm:ss") }}</div>
<div>发送者</div>
<div>{{ item.sender.username }}</div>
<div class="oj-page message-page">
<h2>消息</h2>
<n-list v-if="messages.length">
<n-list-item :style="{ overflow: 'auto' }" v-for="(item, index) in messages" :key="index">
<n-flex size="large" vertical>
<n-flex align="center">
<div>发送时间</div>
<div>{{ parseTime(item.createTime, "YYYY年M月D日 HH:mm:ss") }}</div>
<div>发送者</div>
<div>{{ item.sender.username }}</div>
</n-flex>
<n-flex align="center">
<div>题目序号</div>
<n-button
text
type="info"
@click="router.push('/problem/' + item.submission.problemDisplayId)"
>
{{ item.submission.problemDisplayId }}
</n-button>
<n-text :type="JUDGE_STATUS[item.submission.result]['type']">
{{ JUDGE_STATUS[item.submission.result]["name"] }}
</n-text>
<Copy :value="item.submission.code" />
</n-flex>
<n-code
:language="LANGUAGE_FORMAT_VALUE[item.submission.language]"
:code="item.submission.code"
show-line-numbers
/>
<div v-html="item.message"></div>
</n-flex>
<n-flex align="center">
<div>题目序号</div>
<n-button
text
type="info"
@click="router.push('/problem/' + item.submission.problemDisplayId)"
>
{{ item.submission.problemDisplayId }}
</n-button>
<n-text :type="JUDGE_STATUS[item.submission.result]['type']">
{{ JUDGE_STATUS[item.submission.result]["name"] }}
</n-text>
<Copy :value="item.submission.code" />
</n-flex>
<n-code
:language="LANGUAGE_FORMAT_VALUE[item.submission.language]"
:code="item.submission.code"
show-line-numbers
/>
<div v-html="item.message"></div>
</n-flex>
</n-list-item>
</n-list>
<n-empty v-else description="没有消息"></n-empty>
<Pagination v-model:limit="query.limit" v-model:page="query.page" :total="total" />
</n-list-item>
</n-list>
<n-empty v-else description="没有消息" style="margin: 48px 0"></n-empty>
<Pagination v-model:limit="query.limit" v-model:page="query.page" :total="total" />
</div>
</template>
<script lang="ts" setup>
import { getMessageList } from "oj/api"
@@ -61,3 +64,15 @@ async function listMessages() {
onMounted(listMessages)
watch(query, listMessages, { deep: true })
</script>
<style scoped>
.message-page h2 {
margin: 0 0 8px;
font-size: var(--oj-fs-title);
}
.message-page :deep(.n-list-item) {
padding: 20px 0;
font-size: var(--oj-fs-sec);
}
</style>
+7 -4
View File
@@ -45,7 +45,7 @@ async function saveProfile() {
</script>
<template>
<n-flex class="container" vertical v-if="userStore.profile">
<h3>个人信息设置</h3>
<h2>个人信息设置</h2>
<n-form>
<n-avatar round :size="120" :src="userStore.profile.avatar" alt="头像" />
<n-form-item label="">
@@ -75,11 +75,14 @@ async function saveProfile() {
</template>
<style scoped>
.container {
max-width: 600px;
max-width: 640px;
margin: 0 auto;
padding-top: 8px;
gap: var(--oj-gap);
}
h3 {
font-weight: normal;
h2 {
margin: 0;
font-size: var(--oj-fs-title);
}
</style>