2012-09-25 09:20:49 +09:00
|
|
|
Template.nav.events = {
|
|
|
|
'click #logout': function(event){
|
2012-08-31 19:41:54 -04:00
|
|
|
event.preventDefault();
|
2012-09-25 09:20:49 +09:00
|
|
|
Meteor.logout();
|
2012-08-31 19:41:54 -04:00
|
|
|
}
|
2012-09-18 10:00:53 +09:00
|
|
|
, 'click #mobile-menu': function(event){
|
|
|
|
event.preventDefault();
|
|
|
|
$.pageslide({
|
|
|
|
href: '#pageslide',
|
|
|
|
iframe: false
|
|
|
|
});
|
|
|
|
}
|
2012-09-19 10:12:51 +09:00
|
|
|
|
2012-09-19 09:03:25 +09:00
|
|
|
, 'click .login-header': function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
Router.navigate('account', {trigger:true});
|
|
|
|
}
|
2012-09-29 12:28:51 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
Template.nav.helpers({
|
|
|
|
site_title: function(){
|
|
|
|
return getSetting('title');
|
2012-10-05 11:02:03 +09:00
|
|
|
},
|
2012-09-29 12:28:51 +09:00
|
|
|
|
2012-10-05 11:02:03 +09:00
|
|
|
logo_url: function(){
|
2012-09-29 12:28:51 +09:00
|
|
|
return getSetting('logoUrl');
|
2012-10-05 11:02:03 +09:00
|
|
|
},
|
2012-09-29 12:28:51 +09:00
|
|
|
|
2012-10-05 11:02:03 +09:00
|
|
|
logo_height: function(){
|
2012-09-29 12:28:51 +09:00
|
|
|
return getSetting('logoHeight');
|
2012-10-05 11:02:03 +09:00
|
|
|
},
|
2012-09-29 12:28:51 +09:00
|
|
|
|
2012-10-05 11:02:03 +09:00
|
|
|
logo_width: function(){
|
2012-09-29 12:28:51 +09:00
|
|
|
return getSetting('logoWidth');
|
2012-10-05 11:02:03 +09:00
|
|
|
},
|
2012-09-29 12:28:51 +09:00
|
|
|
|
2012-10-05 11:02:03 +09:00
|
|
|
logo_top: function(){
|
2012-09-29 12:28:51 +09:00
|
|
|
return Math.floor((70-getSetting('logoHeight'))/2);
|
2012-10-05 11:02:03 +09:00
|
|
|
},
|
2012-09-29 12:28:51 +09:00
|
|
|
|
2012-10-05 11:02:03 +09:00
|
|
|
logo_offset: function(){
|
2012-09-29 12:28:51 +09:00
|
|
|
return -Math.floor(getSetting('logoWidth')/2);
|
2012-10-05 11:02:03 +09:00
|
|
|
},
|
|
|
|
|
|
|
|
intercom: function(){
|
|
|
|
return !!getSetting('intercomId');
|
2012-09-29 12:28:51 +09:00
|
|
|
}
|
|
|
|
});
|