mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
36 lines
902 B
JavaScript
36 lines
902 B
JavaScript
Template.layout.helpers({
|
|
pageName : function(){
|
|
if(Router._current){
|
|
var currentPath = Router._current.path;
|
|
var currentRoute = _.findWhere(Router.routes, {originalPath: currentPath});
|
|
if(currentRoute)
|
|
return currentRoute.name;
|
|
}
|
|
},
|
|
backgroundColor: function(){
|
|
return getSetting('backgroundColor');
|
|
},
|
|
secondaryColor: function(){
|
|
return getSetting('secondaryColor');
|
|
},
|
|
buttonColor: function(){
|
|
return getSetting('buttonColor');
|
|
},
|
|
headerColor: function(){
|
|
return getSetting('headerColor');
|
|
},
|
|
extraCode: function(){
|
|
return getSetting('extraCode');
|
|
}
|
|
});
|
|
|
|
Template.layout.created = function(){
|
|
Session.set('currentScroll', null);
|
|
}
|
|
|
|
Template.layout.rendered = function(){
|
|
if(currentScroll=Session.get('currentScroll')){
|
|
$('body').scrollTop(currentScroll);
|
|
Session.set('currentScroll', null);
|
|
}
|
|
}
|