nav: move js and css out of template, provide a help button in the panel on small screens and lots of whitespace cleanup

This commit is contained in:
Mario Vavti
2016-04-15 12:39:22 +02:00
parent ce34c4086d
commit 2cb04ccb8f
3 changed files with 222 additions and 233 deletions

View File

@@ -67,3 +67,15 @@ function makeFullScreen(full) {
$('main').css({'transition': ''});
}
}
/* contextual help */
$(document).mouseup(function (e) {
var container = $("#help-content");
if (!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).length === 0 // ... nor a descendant of the container
&& container.hasClass('help-content-open'))
{
container.removeClass('help-content-open');
}
});