Implement default mode, css fixes
This commit is contained in:
parent
f09532438e
commit
53b69348d1
@ -622,9 +622,6 @@ input, textarea {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
|
|
||||||
display: none;
|
|
||||||
opacity: 0;
|
|
||||||
|
|
||||||
-webkit-transition: opacity 0.4s ease;
|
-webkit-transition: opacity 0.4s ease;
|
||||||
-moz-transition: opacity 0.4s ease;
|
-moz-transition: opacity 0.4s ease;
|
||||||
-ms-transition: opacity 0.4s ease;
|
-ms-transition: opacity 0.4s ease;
|
||||||
@ -676,6 +673,10 @@ input, textarea {
|
|||||||
padding: 0.5% 0 0.5% 0 !important;
|
padding: 0.5% 0 0.5% 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fc td {
|
||||||
|
border: solid 1px #C5C5C5;
|
||||||
|
}
|
||||||
|
|
||||||
.fc-button {
|
.fc-button {
|
||||||
background-color: rgba(255,255,255,0.5) !important;
|
background-color: rgba(255,255,255,0.5) !important;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
@ -752,5 +753,5 @@ input, textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.inputRadioPref {
|
.inputRadioPref {
|
||||||
margin-bottom: 6%;
|
margin-top: 6%;
|
||||||
}
|
}
|
||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<template name="main">
|
<template name="main">
|
||||||
{{> loginButtons}}
|
{{> loginButtons}}
|
||||||
<header style="background-color:{{divColor 'header'}}{{textColor}}">
|
<header style="background-color:{{divColor 'header'}}{{textColor}}{{defaultMode}}">
|
||||||
<div id="aboveBar">
|
<div id="aboveBar">
|
||||||
<i class="fa fa-bars" aria-hidden="true" style="color:{{iconColor 'menu'}}"></i>
|
<i class="fa fa-bars" aria-hidden="true" style="color:{{iconColor 'menu'}}"></i>
|
||||||
<h1>Hourglass</h1><h2>{{schoolName}}</h2>
|
<h1>Hourglass</h1><h2>{{schoolName}}</h2>
|
||||||
@ -89,7 +89,7 @@
|
|||||||
|
|
||||||
{{#if currMode 'calendar'}}
|
{{#if currMode 'calendar'}}
|
||||||
<div id="calbg" style="{{calbg}}"></div>
|
<div id="calbg" style="{{calbg}}"></div>
|
||||||
<div id="calendar" style="{{calCenter}}">
|
<div id="calendar" style="{{calCenter}}{{calColor}}">
|
||||||
{{> fullcalendar calendarOptions}}
|
{{> fullcalendar calendarOptions}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -164,7 +164,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="classesMode">
|
<template name="classesMode">
|
||||||
<div class="mainClass" style="background-color:{{divColor 'header'}}">
|
<div class="mainClass" style="background-color:{{divColor 'classes'}}">
|
||||||
<div class="classInfo"> <!-- class color -->
|
<div class="classInfo"> <!-- class color -->
|
||||||
<h3 class="mainClassName">{{name}}</h3>
|
<h3 class="mainClassName">{{name}}</h3>
|
||||||
<p class="mainClassHour">{{hour}}</p>
|
<p class="mainClassHour">{{hour}}</p>
|
||||||
|
|||||||
@ -18,6 +18,8 @@ var themeColors = {
|
|||||||
"statusIcons": "#33ADFF",
|
"statusIcons": "#33ADFF",
|
||||||
"highlightText": "#FF1A1A",
|
"highlightText": "#FF1A1A",
|
||||||
"cards": "#FEFEFE",
|
"cards": "#FEFEFE",
|
||||||
|
"classes":"#EBEBEB",
|
||||||
|
"calendar": "#000",
|
||||||
"text": "#000"
|
"text": "#000"
|
||||||
},
|
},
|
||||||
"dark": {
|
"dark": {
|
||||||
@ -28,6 +30,9 @@ var themeColors = {
|
|||||||
"statusIcons": "#33ADFF",
|
"statusIcons": "#33ADFF",
|
||||||
"highlightText": "#FF1A1A",
|
"highlightText": "#FF1A1A",
|
||||||
"cards": "#050505",
|
"cards": "#050505",
|
||||||
|
"classes":"#46396E",
|
||||||
|
"calendar": "#000",
|
||||||
|
//30313B
|
||||||
"text": "#F6F6F6"
|
"text": "#F6F6F6"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -128,6 +133,10 @@ Template.main.helpers({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
defaultMode() {
|
||||||
|
Session.set("mode",Meteor.user().profile.preferences.mode);
|
||||||
|
return;
|
||||||
|
},
|
||||||
bgSrc() {
|
bgSrc() {
|
||||||
var dim = [window.innerWidth, window.innerHeight];
|
var dim = [window.innerWidth, window.innerHeight];
|
||||||
var pic = "Backgrounds/"+themeColors[Meteor.user().profile.preferences.theme].background;
|
var pic = "Backgrounds/"+themeColors[Meteor.user().profile.preferences.theme].background;
|
||||||
@ -159,7 +168,8 @@ Template.main.helpers({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
currMode(name) {
|
currMode(name) {
|
||||||
if (name === Session.get("mode")) {
|
var mode = Session.get("mode");
|
||||||
|
if (name === mode) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -225,7 +235,10 @@ Template.main.helpers({
|
|||||||
},
|
},
|
||||||
calCenter() {
|
calCenter() {
|
||||||
var width = window.innerWidth * 0.85;
|
var width = window.innerWidth * 0.85;
|
||||||
return "width:" + width.toString() + "px;margin-left:" + (0.5 * window.innerWidth - 0.5 * width).toString() + "px";
|
return "width:" + width.toString() + "px;margin-left:" + (0.5 * window.innerWidth - 0.5 * width).toString() + "px;";
|
||||||
|
},
|
||||||
|
calColor() {
|
||||||
|
return "color:"+themeColors[Meteor.user().profile.preferences.theme].calendar;
|
||||||
},
|
},
|
||||||
calbg() {
|
calbg() {
|
||||||
var width = window.innerWidth * 0.865;
|
var width = window.innerWidth * 0.865;
|
||||||
@ -378,7 +391,7 @@ Template.main.events({
|
|||||||
!event.target.parentNode.className.includes("workOptions") &&
|
!event.target.parentNode.className.includes("workOptions") &&
|
||||||
!event.target.parentNode.className.includes("prefOptions") &&
|
!event.target.parentNode.className.includes("prefOptions") &&
|
||||||
event.target.readOnly !== true) {
|
event.target.readOnly !== true) {
|
||||||
if(Session.equals("sidebar","optionsContainer")) {
|
if(Session.equals("sidebar","optionsContainer") || Session.equals("sidebar","both")) {
|
||||||
var radio = "prefOptions";
|
var radio = "prefOptions";
|
||||||
} else {
|
} else {
|
||||||
var radio = "workOptions";
|
var radio = "workOptions";
|
||||||
@ -478,7 +491,7 @@ Template.main.events({
|
|||||||
var op = event.target;
|
var op = event.target;
|
||||||
Session.set("radioDiv", op.getAttribute("op"));
|
Session.set("radioDiv", op.getAttribute("op"));
|
||||||
Session.set("radioOffset", op.getAttribute("opc"));
|
Session.set("radioOffset", op.getAttribute("opc"));
|
||||||
if(Session.equals("sidebar","optionsContainer")) {
|
if(Session.equals("sidebar","optionsContainer") || Session.equals("sidebar","both")) {
|
||||||
var radio = "prefOptions";
|
var radio = "prefOptions";
|
||||||
} else {
|
} else {
|
||||||
var radio = "workOptions";
|
var radio = "workOptions";
|
||||||
@ -645,7 +658,7 @@ function sendData(funcName) {
|
|||||||
function closeInput(sessval) {
|
function closeInput(sessval) {
|
||||||
var input = document.getElementById(sessval + "a");
|
var input = document.getElementById(sessval + "a");
|
||||||
var span = document.getElementById(sessval);
|
var span = document.getElementById(sessval);
|
||||||
if(Session.equals("sidebar","optionsContainer")) {
|
if(Session.equals("sidebar","optionsContainer") || Session.equals("sidebar","both")) {
|
||||||
var color = "#000";
|
var color = "#000";
|
||||||
} else {
|
} else {
|
||||||
var color = "#8C8C8C";
|
var color = "#8C8C8C";
|
||||||
@ -663,14 +676,15 @@ function closeInput(sessval) {
|
|||||||
}
|
}
|
||||||
span.style.display = "initial";
|
span.style.display = "initial";
|
||||||
Session.set("modifying", null);
|
Session.set("modifying", null);
|
||||||
if(!Session.get("newWork") && !Session.equals("sidebar","optionsContainer")) {
|
|
||||||
|
if(Session.equals("sidebar","optionsContainer") || Session.equals("sidebar","both")) {
|
||||||
|
Session.set("serverData",getPreferencesData());
|
||||||
|
sendData("editProfile");
|
||||||
|
} else if(!Session.get("newWork")) {
|
||||||
if(getHomeworkFormData() === null) return;
|
if(getHomeworkFormData() === null) return;
|
||||||
Session.set("serverData",Session.get("currentWork"));
|
Session.set("serverData",Session.get("currentWork"));
|
||||||
sendData("editWork");
|
sendData("editWork");
|
||||||
} else if(Session.equals("sidebar","optionsContainer")) {
|
}
|
||||||
Session.set("serverData",getPreferencesData());
|
|
||||||
sendData("editProfile");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getHomeworkFormData() {
|
function getHomeworkFormData() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user