use a smooth animation to fade in the navigation
This avoids the flash of unstyled/unprocessed content
This commit is contained in:
parent
0e28800ba7
commit
4ac10cf3be
2 changed files with 8 additions and 0 deletions
|
@ -135,6 +135,11 @@ class Template {
|
|||
} else {
|
||||
// main navigation, loaded from standard sidebar, fixed up by javascript
|
||||
$nav = '<nav class="nav-main">';
|
||||
// immeadiately hide the navigation (if javascript available)
|
||||
// it will be restyled and made visible again by our script later
|
||||
$nav .= '<script type="application/javascript">
|
||||
document.getElementsByClassName("nav-main")[0].style.visibility = "hidden";
|
||||
</script>';
|
||||
$nav .= tpl_include_page($conf['sidebar'], false, true);
|
||||
$nav .= '</nav>';
|
||||
}
|
||||
|
|
|
@ -144,6 +144,9 @@ jQuery(function () {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
// fade in the navigation (was hidden until now
|
||||
$main.css({opacity: 0, visibility: "visible"}).animate({opacity: 1}, 200);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue