folding optional
This commit is contained in:
@@ -4,3 +4,4 @@ config.narrow=500; // less than N pixels window results in single column
|
|||||||
config.title="MDLinks";
|
config.title="MDLinks";
|
||||||
config.favicon=null; // link to favicon
|
config.favicon=null; // link to favicon
|
||||||
config.css=null; // link to style file
|
config.css=null; // link to style file
|
||||||
|
config.foldCategories=true; // in single column mode (< narrow width) fold out-of-screen categories
|
||||||
|
|||||||
@@ -358,6 +358,7 @@ function filter_cookies(cookies,name) {
|
|||||||
}
|
}
|
||||||
function fold_content(name) {
|
function fold_content(name) {
|
||||||
if (!narrow_window()) { return }
|
if (!narrow_window()) { return }
|
||||||
|
if (!config.foldCategories) { return }
|
||||||
var title = document.getElementById("head_"+name);
|
var title = document.getElementById("head_"+name);
|
||||||
var el = document.getElementById("content_"+name);
|
var el = document.getElementById("content_"+name);
|
||||||
el.hidden = ! el.hidden;
|
el.hidden = ! el.hidden;
|
||||||
@@ -365,6 +366,7 @@ function fold_content(name) {
|
|||||||
}
|
}
|
||||||
function fold_initial() {
|
function fold_initial() {
|
||||||
if (!narrow_window()) { return }
|
if (!narrow_window()) { return }
|
||||||
|
if (!config.foldCategories) { return }
|
||||||
var slides = document.getElementsByClassName("head");
|
var slides = document.getElementsByClassName("head");
|
||||||
for(var i = 0; i < slides.length; i++) {
|
for(var i = 0; i < slides.length; i++) {
|
||||||
var el = slides.item(i);
|
var el = slides.item(i);
|
||||||
@@ -395,7 +397,8 @@ var config = {
|
|||||||
style:null, // file to load css from
|
style:null, // file to load css from
|
||||||
favicon:null, // link to favicon file
|
favicon:null, // link to favicon file
|
||||||
narrow:600, // pixel width that is narrow screen = single column table
|
narrow:600, // pixel width that is narrow screen = single column table
|
||||||
arrows:['📙','📚'] // Arrow characters for in/out tab icon
|
arrows:['📙','📚'], // Arrow characters for in/out tab icon
|
||||||
|
foldCategories:true // fold categories in single column mode
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user