Vulcan/client/views/common/layout.js

37 lines
872 B
JavaScript
Raw Normal View History

Template.layout.helpers({
pageName : function(){
getCurrentTemplate();
2013-02-14 10:17:26 +09:00
},
backgroundColor: function(){
return getSetting('backgroundColor');
2013-02-14 10:17:26 +09:00
},
secondaryColor: function(){
return getSetting('secondaryColor');
2013-02-14 10:17:26 +09:00
},
buttonColor: function(){
return getSetting('buttonColor');
2013-02-14 10:17:26 +09:00
},
headerColor: function(){
return getSetting('headerColor');
2013-02-28 09:19:08 +09:00
},
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);
}
// set title
var title = getSetting("title");
var tagline = getSetting("tagline");
document.title = (tagline ? title+': '+tagline : title) || "";
}