fixed scrollbar in left menu

This commit is contained in:
matcornic 2017-07-31 23:20:05 +02:00
parent b39d9528ab
commit 2294a54b36
2 changed files with 11 additions and 3 deletions

View file

@ -2,11 +2,11 @@
- récriture doc -> TODO
- créer une section Showcase
- refaire la possibilité d'overrider le style/script/etc -> TODO
- créer des thèmes de base -> TODO
- ajouter Travis pour tester le thème quotidiennement avec les nouvelles versions de Hugo -> TODO
- créer des jolis thèmes de base (avec des noms) -> TODO
- corriger slider menu qui ne fonctionne plus -> TODO
- Update font awesome -> TODO
- ajouter Travis pour tester le thème quotidiennement avec les nouvelles versions de Hugo -> TODO
- Update font awesome -> OK
- internationalisation -> OK
- Messages: OK
- Ajouter un bouton pour changer de langue : OK

View file

@ -25,6 +25,11 @@ function getScrollBarWidth() {
return (w1 - w2);
};
function setMenuHeight() {
$('#sidebar .highlightable').height($('#sidebar').innerHeight() - $('#header-wrapper').height() - 40);
$('#sidebar .highlightable').perfectScrollbar('update');
}
function fallbackMessage(action) {
var actionMsg = '';
var actionKey = (action === 'cut' ? 'X' : 'C');
@ -44,6 +49,7 @@ function fallbackMessage(action) {
// for the window resize
$(window).resize(function() {
setMenuHeight();
});
// debouncing function from John Hann
@ -84,6 +90,8 @@ jQuery(document).ready(function() {
});
var sidebarStatus = searchStatus = 'open';
$('#sidebar .highlightable').perfectScrollbar();
setMenuHeight();
jQuery('#overlay').on('click', function() {
jQuery(document.body).toggleClass('sidebar-hidden');