1
0
mirror of https://github.com/janeczku/calibre-web synced 2026-01-01 11:49:04 +00:00

Moving scrollbar to main panel instead of the body to lock header and sidebar in place

This commit is contained in:
Asher Max Schweigart
2025-04-29 14:11:57 -04:00
parent 4e67a56ed2
commit 4e245def8f
3 changed files with 8006 additions and 7966 deletions

File diff suppressed because one or more lines are too long

View File

@@ -438,3 +438,43 @@ div.log {
.error-list {
margin-top: 5px;
}
body > div.container-fluid > div.row-fluid > div.col-sm-10 {
max-height: calc(100vh - 111px);
overflow-y: auto;
}
body > div.container-fluid > div.row-fluid > div.col-sm-2 {
max-height: calc(100vh - 111px);
overflow-y: auto;
/* hide scrollbar in IE, Edge */
-ms-overflow-style: none;
/* hide scrollbar in Firefox */
scrollbar-width: none;
}
/* hide scrollbar in WebKit browsers (Chrome, Safari, Opera) */
body > div.container-fluid > div.row-fluid > div.col-sm-2::-webkit-scrollbar {
display: none;
}
.scrollable-col {
/* keep vertical scrolling */
overflow-y: auto;
/* hide scrollbar in IE, Edge */
-ms-overflow-style: none;
/* hide scrollbar in Firefox */
scrollbar-width: none;
}
/* hide scrollbar in WebKit browsers (Chrome, Safari, Opera) */
.scrollable-col::-webkit-scrollbar {
display: none;
}
body > div.container-fluid {
padding-right: 0px;
}

View File

@@ -408,17 +408,17 @@ $(function() {
});
// fix for infinite scroll on CaliBlur Theme (#981)
if ($("body").hasClass("blur")) {
$(".col-sm-10").bind("scroll", function () {
if (
$(this).scrollTop() + $(this).innerHeight() >=
$(this)[0].scrollHeight
) {
$loadMore.infiniteScroll("loadNextPage");
window.history.replaceState({}, null, $loadMore.infiniteScroll("getAbsolutePath"));
}
});
}
$(".col-sm-10").bind("scroll", function () {
if (
$(this).scrollTop() + $(this).innerHeight() >=
$(this)[0].scrollHeight
) {
$loadMore.infiniteScroll("loadNextPage");
window.history.replaceState({}, null, $loadMore.infiniteScroll("getAbsolutePath"));
}
});
}
$("#restart").click(function() {