feat: 调整全局和管理员字体大小,优化样式

This commit is contained in:
2026-04-12 13:59:18 +08:00
parent af78359d94
commit bae46aef77
6 changed files with 12 additions and 252 deletions

View File

@@ -65,9 +65,6 @@
.ui.list .list > .item,
.ui.statistic > .value,
.ui.statistic > .label,
.vditor,
.vditor-reset,
.vditor-reset *,
.ace_editor,
.ace_editor textarea,
.ace_content,

View File

@@ -15,11 +15,11 @@
"Sarasa Gothic SC", Consolas, "Cascadia Mono", "Cascadia Code",
"Fira Mono", "JetBrains Mono", "Liberation Mono", Menlo, Monaco,
"Courier New", monospace;
--hustoj-global-font-size: 26px;
--hustoj-global-font-size: 24px;
--hustoj-global-line-height: 1.6;
--hustoj-global-code-font-size: 24px;
--hustoj-global-heading-size: 30px;
--hustoj-global-subheading-size: 28px;
--hustoj-global-heading-size: 24px;
--hustoj-global-subheading-size: 24px;
}
.ui.header,
@@ -96,9 +96,6 @@ h5,
.ui.list .list > .item,
.ui.statistic > .value,
.ui.statistic > .label,
.vditor,
.vditor-reset,
.vditor-reset *,
.ace_editor,
.ace_editor textarea,
.ace_content,
@@ -124,9 +121,6 @@ h5,
.ui.list .list > .item,
.ui.statistic > .value,
.ui.statistic > .label,
.vditor,
.vditor-reset,
.vditor-reset *,
pre,
code,
.ace_editor,
@@ -146,8 +140,7 @@ code,
.ace_gutter,
.ace_line,
.ace_text-layer,
.sample-box code,
.vditor-reset pre code {
.sample-box code {
font-size: var(--hustoj-global-code-font-size) !important;
}

View File

@@ -110,26 +110,6 @@
overflow-wrap: anywhere;
}
.docs-render .vditor-reset {
font-size: 16px;
line-height: 1.8;
}
.docs-render table tr td {
border: 1px solid #d1d5db;
text-align: center;
min-width: 120px;
height: 30px;
}
.docs-render table th {
border: 1px solid #d1d5db;
min-width: 120px;
height: 30px;
background-color: #eff6ff;
text-align: center;
}
@media (max-width: 991px) {
.docs-shell {
flex-direction: column;

View File

@@ -660,46 +660,9 @@ if ($pr_flag) {
$(document).ready(function () {
$("#creator").load("problem-ajax.php?pid=<?php echo $id ?>");
function addMarkdownInputOutputLabels() {
for (let i = 1; i < 10; i++) {
$(".language-input" + i).parent().each(function () {
if ($(this).prev('.hustoj-md-io-label').length === 0) {
$(this).before("<div class='hustoj-md-io-label'><?php echo $MSG_Input ?>" + i + ":</div>");
}
});
$(".language-output" + i).parent().each(function () {
if ($(this).prev('.hustoj-md-io-label').length === 0) {
$(this).before("<div class='hustoj-md-io-label'><?php echo $MSG_Output ?>" + i + ":</div>");
}
});
}
}
function styleMarkdownTables() {
$(".md table tr td").css({
"border": "1px solid grey",
"text-align": "center",
"width": "200px",
"height": "30px"
});
$(".md table th").css({
"border": "1px solid grey",
"width": "200px",
"height": "30px",
"background-color": "#9e9e9ea1",
"text-align": "center"
});
}
function renderProblemMarkdown() {
<?php if (isset($OJ_MARKDOWN) && $OJ_MARKDOWN) { ?>
return HustOJVditor.renderMarkdownBlocks('.md').then(function () {
addMarkdownInputOutputLabels();
styleMarkdownTables();
$('.md .hustoj-vditor-sample-heading').addClass('ui top attached block header sample-header');
$('.md pre.hustoj-vditor-sample-box').addClass('ui bottom attached segment font-content sample-box');
});
return HustOJVditor.renderMarkdownBlocks('.md');
<?php } ?>
return Promise.resolve([]);
}