1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20631 from maribu/doc/doxygen/fix-sidenav

doc/doxygen: fix sidenav handling
This commit is contained in:
Dylan Laduranty 2024-04-27 15:56:14 +00:00 committed by GitHub
commit c2bd865060
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,14 +46,10 @@ function resize_content(sidenav)
function resize_handler()
{
if ($(window).width() == window_before) {return;}
var sidenav = $("#side-nav");
if ($(window).width() < 750) {
const threshold = 750;
if ($(window).width() < threshold) {
var toc = $(".toc");
if (window_before >= 750) {
original_sidenav_width = sidenav.width();
}
sidenav.width("0px");
sidenav.css("padding-right", "0px");
sidenav.children(".ui-resizable-e").width("0px");
@ -63,7 +59,9 @@ function resize_handler()
}
else {
var toc = $(".toc-sm");
sidenav.width(parseInt(original_sidenav_width)+"px");
if (window_before < threshold) {
sidenav.width(parseInt(default_sidenav_width)+"px");
}
sidenav.css("padding-right", original_padding);
sidenav.children(".ui-resizable-e").width(original_padding);
sidenav.show();
@ -77,8 +75,8 @@ function resize_handler()
$(document).ready(function() {
var sidenav = $("#side-nav");
original_padding = sidenav.css("padding-right")
window_before = $(window).width()
original_sidenav_width = (window_before >= 740) ? sidenav.width() : 275;
window_before = 0
default_sidenav_width = 300;
resize_handler();
});
$(window).resize(resize_handler);