Some reorganization of the main javascript file.

This commit is contained in:
Phuntsok Drak-pa 2019-08-29 13:51:20 +02:00
parent 8104f7b00c
commit 15765cc10d

View File

@ -3,7 +3,6 @@
var light = false; var light = false;
window.onload = function() { window.onload = function() {
$("#table-of-contents").remove();
reorganize_html(); reorganize_html();
create_theme_switcher(); create_theme_switcher();
roll_elems(); roll_elems();
@ -32,6 +31,9 @@ function roll_elems() {
} }
function reorganize_html() { function reorganize_html() {
// Remove table of contents
$("#table-of-contents").remove();
// Move the title out of the content div // Move the title out of the content div
$('#content').before('<div class="h1-container"><div class="highlight-h1"></div></div>'); $('#content').before('<div class="h1-container"><div class="highlight-h1"></div></div>');
$('.title').prependTo($('.h1-container')); $('.title').prependTo($('.h1-container'));
@ -92,5 +94,5 @@ function create_theme_switcher() {
} }
function isEmpty(el) { function isEmpty(el) {
return !$.trim(el.html()) return !$.trim(el.html());
} }