Browse Source

enhance style

root 2 years ago
parent
commit
13307ad00e
2 changed files with 18 additions and 8 deletions
  1. 2 2
      js/score.js
  2. 16 6
      score/index.html

+ 2 - 2
js/score.js

@@ -228,10 +228,10 @@ var personScoreList = []
 function procName(str, o = 0) {
     if (o) {
         if (str[0] == '第') return '';
-        else return `data-toggle="tooltip" data-placement="left" title="${str.match('-') ? str.slice(str.split('-')[0].length + 1) : ''}"`
+        else return `data-toggle="tooltip" data-placement="left" title="${str.match(/[-_]/g) ? str.slice(str.split(/[-_]/g)[0].length + 1) : ''}"`
     }
     if (str[0] == '第') return str.slice(1, str.length - 1) + ':';
-    else return str.split('-')[0] + '.';
+    else return str.split(/[-_]/g)[0] + '.';
 }
 function getSec(id, force, force2) {
     if (!force && !$('.nav-tabs>li')[3].classList[0]) return

+ 16 - 6
score/index.html

@@ -15,6 +15,22 @@
     <link rel="stylesheet" href="/css/style.css">
     <script type="text/javascript" src="/js/score.js"></script>
     <style>
+
+        .btn.btn-how {
+            min-height: 35px;
+            margin-right: 1px;
+            margin-left: 1px;
+        }
+
+        .btn.btn-how.active {
+            margin-right: 3px;
+            margin-left: 3px;
+            min-height: 40px;
+            border-bottom: none;
+            border-bottom-left-radius: 0;
+            border-bottom-right-radius: 0;
+        }
+
         body {
             transition-duration: 300ms;
         }
@@ -50,12 +66,6 @@
             box-shadow: inset 0 3px 3px rgb(0 0 0 / 5%);
         }
 
-        .btn.btn-how {
-            border-bottom: none;
-            border-bottom-left-radius: 0;
-            border-bottom-right-radius: 0;
-        }
-
         img {
             transition-duration: 300ms;
             border: 3px dotted grey;