Skip to content

Commit 9f6a02f

Browse files
authored
Update viewnews.php
1 parent 54a3e03 commit 9f6a02f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

trunk/web/template/syzoj/viewnews.php

+33
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,38 @@
1212
<div id="content" class="font-content"><?php echo bbcode_to_html($news_content)?></div>
1313
</div>
1414
</div>
15+
<script>
16+
$(document).ready(function(){
17+
marked.use({
18+
// 开启异步渲染
19+
async: true,
20+
pedantic: false,
21+
gfm: true,
22+
mangle: false,
23+
headerIds: false
24+
});
25+
$(".md").each(function(){
26+
$(this).html(marked.parse($(this).text()));
27+
});
28+
// adding note for ```input1 ```output1 in description
29+
for(let i=1;i<10;i++){
30+
$(".language-input"+i).parent().before("<div><?php echo $MSG_Input?>"+i+":</div>");
31+
$(".language-output"+i).parent().before("<div><?php echo $MSG_Output?>"+i+":</div>");
32+
}
33+
$(".md table tr td").css({
34+
"border": "1px solid grey",
35+
"text-align": "center",
36+
"width": "200px",
37+
"height": "30px"
38+
});
1539

40+
$(".md table th").css({
41+
"border": "1px solid grey",
42+
"width": "200px",
43+
"height": "30px",
44+
"background-color": "#9e9e9ea1",
45+
"text-align": "center"
46+
});
47+
});
48+
</script>
1649
<?php include("template/$OJ_TEMPLATE/footer.php");?>

0 commit comments

Comments
 (0)