folding optional

This commit is contained in:
ville rantanen
2017-11-04 14:35:50 +02:00
parent 1276f27fd3
commit 468a00b21d
2 changed files with 5 additions and 1 deletions

View File

@@ -4,3 +4,4 @@ config.narrow=500; // less than N pixels window results in single column
config.title="MDLinks";
config.favicon=null; // link to favicon
config.css=null; // link to style file
config.foldCategories=true; // in single column mode (< narrow width) fold out-of-screen categories

View File

@@ -358,6 +358,7 @@ function filter_cookies(cookies,name) {
}
function fold_content(name) {
if (!narrow_window()) { return }
if (!config.foldCategories) { return }
var title = document.getElementById("head_"+name);
var el = document.getElementById("content_"+name);
el.hidden = ! el.hidden;
@@ -365,6 +366,7 @@ function fold_content(name) {
}
function fold_initial() {
if (!narrow_window()) { return }
if (!config.foldCategories) { return }
var slides = document.getElementsByClassName("head");
for(var i = 0; i < slides.length; i++) {
var el = slides.item(i);
@@ -395,7 +397,8 @@ var config = {
style:null, // file to load css from
favicon:null, // link to favicon file
narrow:600, // pixel width that is narrow screen = single column table
arrows:['&#x1F4D9;','&#x1F4dA;'] // Arrow characters for in/out tab icon
arrows:['&#x1F4D9;','&#x1F4dA;'], // Arrow characters for in/out tab icon
foldCategories:true // fold categories in single column mode
};
</script>