Verified Commit 0f4bcff8 authored by Camil Staps's avatar Camil Staps 🚀

Smoother resizing; style of search field

parent caeab913
Pipeline #14664 failed with stage
in 53 seconds
......@@ -26,6 +26,7 @@ a.hidden {
display: flex;
flex-flow: column;
height: 100vh;
max-width: 40%;
min-width: 200px;
overflow: auto;
position: fixed;
......@@ -74,6 +75,11 @@ a.hidden {
overflow: auto;
}
#search input {
box-sizing: border-box;
width: 100%;
}
#search-results ul {
list-style-type: none;
padding-left: 0;
......
......@@ -141,9 +141,11 @@ function highlightCallback(span, cls, str) {
/* Resizable sidebar */
let sidebar = document.getElementById('sidebar');
sidebar.onmousemove = function () {
document.getElementById('content').style.left = this.offsetWidth + 'px';
};
sidebar.onmouseup = function () { /* not every browser supports onresize on div */
let content = document.getElementById('content');
content.style.left = this.offsetWidth + 'px';
this.onmousemove();
sessionStorage['sidebar-width'] = this.offsetWidth;
};
......@@ -184,7 +186,7 @@ function highlightCallback(span, cls, str) {
if (typeof sessionStorage['sidebar-width'] != 'undefined')
sidebar.style.width = sessionStorage['sidebar-width'] + 'px';
sidebar.onmouseup();
sidebar.onmousemove();
if (typeof sessionStorage['toc-height'] != 'undefined')
toc.style.height = sessionStorage['toc-height'] + 'px';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment