mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
35 lines
No EOL
1 KiB
JavaScript
35 lines
No EOL
1 KiB
JavaScript
Template[getTemplate('nav')].helpers({
|
|
primaryNav: function () {
|
|
return _.sortBy(primaryNav, 'order');
|
|
},
|
|
hasPrimaryNav: function () {
|
|
return !!primaryNav.length;
|
|
},
|
|
secondaryNav: function () {
|
|
return _.sortBy(secondaryNav, 'order');
|
|
},
|
|
hasSecondaryNav: function () {
|
|
return !!secondaryNav.length;
|
|
},
|
|
dropdownClass: function () {
|
|
return getThemeSetting('useDropdowns', true) ? 'has-dropdown' : 'no-dropdown';
|
|
},
|
|
logoTemplate: function () {
|
|
return getTemplate('logo');
|
|
},
|
|
getTemplate: function () {
|
|
return getTemplate(this.template);
|
|
},
|
|
headerClass: function () {
|
|
var color = getSetting('headerColor');
|
|
return (color == 'white' || color == '#fff' || color == '#ffffff') ? "white-background" : '';
|
|
}
|
|
});
|
|
|
|
Template[getTemplate('nav')].events({
|
|
'click .mobile-menu-button': function(e){
|
|
e.preventDefault();
|
|
e.stopPropagation(); // Make sure we don't immediately close the mobile nav again. See layout.js event handler.
|
|
$('body').toggleClass('mobile-nav-open');
|
|
}
|
|
}); |