-
-
+
-
diff --git a/web/app/controllers/submissions_list.php b/web/app/controllers/submissions_list.php
index d99fbe7..ddc4acc 100644
--- a/web/app/controllers/submissions_list.php
+++ b/web/app/controllers/submissions_list.php
@@ -39,7 +39,7 @@
}
- if (!isset($_COOKIE['bootstrap4'])){
+ if (!isset($_COOKIE['bootstrap4'])) {
$REQUIRE_LIB['bootstrap5'] = '';
}
?>
diff --git a/web/app/libs/uoj-html-lib.php b/web/app/libs/uoj-html-lib.php
index 8b76315..2d3baf9 100644
--- a/web/app/libs/uoj-html-lib.php
+++ b/web/app/libs/uoj-html-lib.php
@@ -63,7 +63,7 @@ function becomeMsgPage($msg, $title = '消息') {
if (UOJContext::isAjax()) {
die($msg);
} else {
- if (!isset($_COOKIE['bootstrap4'])){
+ if (!isset($_COOKIE['bootstrap4'])) {
$REQUIRE_LIB['bootstrap5'] = '';
}
diff --git a/web/app/views/page-header.php b/web/app/views/page-header.php
index 89f8f20..d84134f 100644
--- a/web/app/views/page-header.php
+++ b/web/app/views/page-header.php
@@ -91,6 +91,7 @@
= HTML::js_src('/js/popper.min.js?v=2019.5.31') ?>
= HTML::js_src('/js/bootstrap.min.js?v=2019.5.31') ?>
+
= HTML::js_src('/js/color-converter.min.js') ?>
diff --git a/web/css/uoj-bs5.css b/web/css/uoj-bs5.css
index 2a01b3d..b1bcd05 100644
--- a/web/css/uoj-bs5.css
+++ b/web/css/uoj-bs5.css
@@ -43,6 +43,40 @@ label {
float: right;
}
+.uoj-problem-list-table > tbody > tr:last-child,
.uoj-submissions-table > tbody > tr:last-child {
border-bottom-color: transparent;
}
+
+.uoj-click-zan-block {
+ display: inline-block;
+ min-width: 140px;
+ text-align: left;
+}
+
+.uoj-click-zan-up, .uoj-click-zan-down, .uoj-click-zan-cnt {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.uoj-click-zan-block-cur-up .uoj-click-zan-up {
+ color: green;
+ font-weight: 700;
+}
+.uoj-click-zan-block-cur-down .uoj-click-zan-down {
+ color: red;
+ font-weight: 700;
+}
+.uoj-click-zan-block-cur-down .uoj-click-zan-up, .uoj-click-zan-block-cur-up .uoj-click-zan-down {
+ color: gray;
+}
+
+.uoj-click-zan-block-positive .uoj-click-zan-cnt {
+ color: green;
+}
+.uoj-click-zan-block-neutral .uoj-click-zan-cnt {
+ color: gray;
+}
+.uoj-click-zan-block-negative .uoj-click-zan-cnt {
+ color: red;
+}
diff --git a/web/js/uoj.js b/web/js/uoj.js
index 4516bf5..0f6af74 100644
--- a/web/js/uoj.js
+++ b/web/js/uoj.js
@@ -297,15 +297,22 @@ $.fn.click_zan_block = function() {
$(this).addClass('uoj-click-zan-block-negative');
}
+ var up_icon_html = isBootstrap5Page
+ ? '
'
+ : '
';
+ var down_icon_html = isBootstrap5Page
+ ? '
'
+ : '
';
+
var node = this;
- var up_node = $('
'+uojLocale('click-zan::good')+'').click(function(e) {
+ var up_node = $('
'+up_icon_html+uojLocale('click-zan::good')+'').click(function(e) {
e.preventDefault();
click_zan(id, type, 1, node);
- });
- var down_node = $('
'+uojLocale('click-zan::bad')+'').click(function(e) {
+ }).addClass(isBootstrap5Page ? 'text-decoration-none' : '');
+ var down_node = $('
'+down_icon_html+uojLocale('click-zan::bad')+'').click(function(e) {
e.preventDefault();
click_zan(id, type, -1, node);
- });
+ }).addClass(isBootstrap5Page ? 'text-decoration-none' : '');
$(this)
.append(up_node)