summaryrefslogtreecommitdiff
path: root/head.html
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2023-04-25 01:31:26 +0800
committerMole Shang <[email protected]>2023-04-26 00:21:27 +0800
commit2eff4e22db37eac597aa6da29e15e566044588b1 (patch)
treea4f4860b495e602eedf75d9654c1fd37a128d69c /head.html
parentd5596249f4f02a2c642a2385920a3b76f97f3d13 (diff)
downloadcgit-dark-2eff4e22db37eac597aa6da29e15e566044588b1.tar.gz
cgit-dark-2eff4e22db37eac597aa6da29e15e566044588b1.tar.bz2
cgit-dark-2eff4e22db37eac597aa6da29e15e566044588b1.zip
head.html: migrate to SimpleBar
Diffstat (limited to 'head.html')
-rw-r--r--head.html28
1 files changed, 13 insertions, 15 deletions
diff --git a/head.html b/head.html
index 9840788..da00bea 100644
--- a/head.html
+++ b/head.html
@@ -1,10 +1,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
-<link href="/git/assets/fonts/fonts.min.css" rel="stylesheet" type="text/css">
-<link href="/git/assets/css/gruvbox.css" rel="stylesheet" type="text/css">
-<link href="/git/assets/css/jquery.mCustomScrollbar.min.css" rel="stylesheet" type="text/css">
-<script src="/git/assets/js/jquery.min.js"></script>
-<script src="/git/assets/js/jquery.mCustomScrollbar.min.js"></script>
-<link href="/git/assets/css/cgit.css" rel="stylesheet" type="text/css">
+<link href="/assets/fonts/fonts.min.css" rel="stylesheet" type="text/css">
+<link href="/assets/css/gruvbox.css" rel="stylesheet" type="text/css">
+<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
+<link href="https://cdn.bootcdn.net/ajax/libs/simplebar/6.2.5/simplebar.css" rel="stylesheet">
+<script src="https://cdn.bootcdn.net/ajax/libs/simplebar/6.2.5/simplebar.js"></script>
+<link href="/assets/css/cgit.css" rel="stylesheet" type="text/css">
<script>
function go_responsive() {
/* destroy tables that prevent responsive design */
@@ -40,15 +40,7 @@ function wrap_fat_elements() {
"table.diffstat, table.diff, table.list, table.stats, " +
"table.vgraph, table.hgraph, table.blame"
).wrap("<div class='table-wrap'></div>");
- $('.table-wrap, pre.literal-block').mCustomScrollbar({
- axis: 'x',
- theme: 'minimal',
- autoHideScrollbar: true,
- autoDraggerLength: true,
- scrollInertia: 100,
- mouseWheel: { enable: true, axis: 'x' },
- documentTouchScroll: true
- });
+ $('.table-wrap, pre.literal-block').each((index, el) => new SimpleBar(el));
}
$(function() {
@@ -56,3 +48,9 @@ $(function() {
wrap_fat_elements();
});
</script>
+<style>
+.simplebar-scrollbar::before {
+ background-color: grey;
+ height: 4px;
+}
+</style>