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

@@ -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([]);
}