Curated source subset assembled by klammertext-dev's doc/make_dist.sh: the Klammermachine (mac), the Standard Klammer Set (sks), the commands (com), editor plugins and install guides (doc), a test subset (tst), and lib/bin placeholders. Builds with 'make -C com'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
|
|
function show_navigation_items(show_item) {
|
|
show_item = show_item === undefined ? true : false;
|
|
K.getv(".depthchoice").forEach(function (o) {
|
|
//K.visible(o, "hide");
|
|
K.get(o).hidden = !show_item;
|
|
});
|
|
["textshow", "next", "previous", "fit", "linkshow"].forEach(function (o) {
|
|
K.get("#"+o).hidden = !show_item;
|
|
});
|
|
}
|
|
|
|
|
|
function get_height(name) {
|
|
let div = K.get(name);
|
|
let result = 0;
|
|
if (div !== null) {
|
|
result = K.height(div);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
function frame_resize() {
|
|
let nav = K.get("#nav");
|
|
let nav_height = (nav ? get_height(nav) : 0);
|
|
let content_height = window.innerHeight
|
|
- get_height("#title") - nav_height - get_height("#status") + 1;
|
|
K.height("#middle", content_height);
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener("load", function (event) {
|
|
window.addEventListener("resize", function (e) {
|
|
frame_resize();
|
|
});
|
|
|
|
frame_resize();
|
|
if (typeof resize_toc === "function") resize_toc(true);
|
|
|
|
//let endspace_height = "calc(110% - " + K.height("#title")
|
|
// + " - " + K.height("#nav") + ")";
|
|
//K.style(".endspace", "height", endspace_height);
|
|
|
|
});
|