Merge branch 'master' of https://github.com/ksjdragon/hourglass
This commit is contained in:
commit
6f499ad2f9
@ -47,17 +47,20 @@ Session.set("classDispHover",null); // Stores current hovered filter.
|
|||||||
Session.set("commentRestrict",null); // Stores text for comment character restriction.
|
Session.set("commentRestrict",null); // Stores text for comment character restriction.
|
||||||
|
|
||||||
Template.registerHelper('divColor', (div) => { // Reactive color changing based on preferences. Colors stored in themeColors.
|
Template.registerHelper('divColor', (div) => { // Reactive color changing based on preferences. Colors stored in themeColors.
|
||||||
|
if(Meteor.user() === null) return;
|
||||||
if(Meteor.user().profile.preferences === undefined) return;
|
if(Meteor.user().profile.preferences === undefined) return;
|
||||||
return themeColors[Meteor.user().profile.preferences.theme][div];
|
return themeColors[Meteor.user().profile.preferences.theme][div];
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.registerHelper('textColor', () => { // Reactive color for text.
|
Template.registerHelper('textColor', () => { // Reactive color for text.
|
||||||
|
if(Meteor.user() === null) return;
|
||||||
if(Meteor.user().profile.preferences === undefined) return;
|
if(Meteor.user().profile.preferences === undefined) return;
|
||||||
document.getElementsByTagName("body")[0].style.color = themeColors[Meteor.user().profile.preferences.theme].text;
|
document.getElementsByTagName("body")[0].style.color = themeColors[Meteor.user().profile.preferences.theme].text;
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.registerHelper('overlayDim', (part) => { // Gets size of the overlay container.
|
Template.registerHelper('overlayDim', (part) => { // Gets size of the overlay container.
|
||||||
|
if(Meteor.user() === null) return;
|
||||||
var dim = [window.innerWidth * 0.25, window.innerHeight * 0.2];
|
var dim = [window.innerWidth * 0.25, window.innerHeight * 0.2];
|
||||||
var width = "width:" + dim[0].toString() + "px;";
|
var width = "width:" + dim[0].toString() + "px;";
|
||||||
var height = "height:" + dim[1].toString() + "px;";
|
var height = "height:" + dim[1].toString() + "px;";
|
||||||
@ -67,6 +70,7 @@ Template.registerHelper('overlayDim', (part) => { // Gets size of the overlay co
|
|||||||
});
|
});
|
||||||
|
|
||||||
Template.registerHelper('myClasses', () => { // Gets all classes and respective works.
|
Template.registerHelper('myClasses', () => { // Gets all classes and respective works.
|
||||||
|
if(Meteor.user() === null) return;
|
||||||
if (Meteor.user().profile.classes === undefined || Meteor.user().profile.classes.length === 0) { // Null checking.
|
if (Meteor.user().profile.classes === undefined || Meteor.user().profile.classes.length === 0) { // Null checking.
|
||||||
Session.set("noclass",true); // Makes sure to display nothing.
|
Session.set("noclass",true); // Makes sure to display nothing.
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
@ -147,9 +147,10 @@ Template.profile.helpers({
|
|||||||
classHolderHeight() { // Dimensions the container for the classes
|
classHolderHeight() { // Dimensions the container for the classes
|
||||||
return 0.26 * window.innerHeight.toString() + "px";
|
return 0.26 * window.innerHeight.toString() + "px";
|
||||||
},
|
},
|
||||||
profClassTabColor(status) { // Change this [Supposed to show the current mode that's selected via color]
|
profClassTabColor(status) { // Change this [Supposed to show the current mode that's selected via color]
|
||||||
|
|
||||||
if (status === Session.get("profClassTab")) {
|
if (status === Session.get("profClassTab")) {
|
||||||
return Session.get("themeColors")[Meteor.user().profile.preferences.theme].highlightText;
|
return themeColors[Meteor.user().profile.preferences.theme].highlightText;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user