fix(web): use hljs in bs5 pages

This commit is contained in:
Baoshuo Ren 2022-10-11 07:50:58 +08:00
parent 1279ccf711
commit 4d68b2237f
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
3 changed files with 8 additions and 3 deletions

View File

@ -222,7 +222,12 @@ EOD
<?php <?php
$REQUIRE_LIB['mathjax'] = ''; $REQUIRE_LIB['mathjax'] = '';
if (isset($REQUIRE_LIB['bootstrap5'])) {
requireLib('hljs');
} else {
$REQUIRE_LIB['shjs'] = ''; $REQUIRE_LIB['shjs'] = '';
}
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - ' . UOJLocale::get('problems::problem')) ?> <?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - ' . UOJLocale::get('problems::problem')) ?>

View File

@ -36,7 +36,7 @@
$all_tags = DB::selectAll("select distinct tag from blogs_tags where blog_id in (select id from blogs where $blogs_cond)"); $all_tags = DB::selectAll("select distinct tag from blogs_tags where blog_id in (select id from blogs where $blogs_cond)");
requireLib('mathjax'); requireLib('mathjax');
requireLib('shjs'); requireLib('hljs');
?> ?>
<?php echoUOJPageHeader('日志') ?> <?php echoUOJPageHeader('日志') ?>

View File

@ -23,7 +23,7 @@
$REQUIRE_LIB['mathjax'] = ''; $REQUIRE_LIB['mathjax'] = '';
if (isset($REQUIRE_LIB['bootstrap5'])) { if (isset($REQUIRE_LIB['bootstrap5'])) {
$REQUIRE_LIB['hljs'] = ''; requireLib('hljs');
} else { } else {
$REQUIRE_LIB['shjs'] = ''; $REQUIRE_LIB['shjs'] = '';
} }