From 34cd08c4dcd89ca5b6feed84d84d80809da4efdd Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Fri, 7 Dec 2012 10:53:54 -0800 Subject: [PATCH] Make the fixed side bar not fixed if window isn't large enough --- doc/html/header.txt | 17 ++++++++++++++++- doc/html/linuxstyles.css | 1 - 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/html/header.txt b/doc/html/header.txt index b1c296c7c17..012def183d4 100644 --- a/doc/html/header.txt +++ b/doc/html/header.txt @@ -7,7 +7,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="keywords" content="Simple Linux Utility for Resource Management, SLURM, resource management, -Linux clusters, high-performance computing, Livermore Computing"> +Linux clusters, high-performance computing"> <meta name="description" content="Simple Linux Utility for Resource Management"> <title>Simple Linux Utility for Resource Management</title> <link href="linuxstyles.css" rel="stylesheet" type="text/css"> @@ -21,6 +21,21 @@ Linux clusters, high-performance computing, Livermore Computing"> customSearchControl.setResultSetSize(google.search.Search.SMALL_RESULTSET); customSearchControl.draw('cse'); }, true); + +function window_check () +{ + obj = document.getElementById('navigation'); + if ((window.innerWidth>=800) && (window.innerHeight>=700) && + (screen.width>=800) && (screen.height>=700)) { + obj.style.position = 'fixed'; + } else { + obj.style.position = 'absolute'; + } +} + +window.onload = window_check; +window.onresize = window_check; + </script> </head> diff --git a/doc/html/linuxstyles.css b/doc/html/linuxstyles.css index 730856fb08b..947341d1a29 100644 --- a/doc/html/linuxstyles.css +++ b/doc/html/linuxstyles.css @@ -82,7 +82,6 @@ IMG.displayed { border-color:#066cb2; border-style:solid; display:table-cell; - position:fixed; } /* The main text of the page */ -- GitLab