formatting
This commit is contained in:
parent
513e19046c
commit
09104bbbeb
@ -3,9 +3,7 @@
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
box-shadow: 2px 2px 5px 3px #666;
|
||||
|
||||
background-color: #EBEBEB;
|
||||
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
z-index: 50;
|
||||
@ -15,7 +13,6 @@
|
||||
padding: 0.5%;
|
||||
padding-left: 1%;
|
||||
float: left;
|
||||
|
||||
-webkit-filter: drop-shadow(2px 2px 5px #333);
|
||||
filter: drop-shadow(2px 2px 5px #333);
|
||||
}
|
||||
@ -36,7 +33,6 @@
|
||||
min-height: 100%;
|
||||
position: absolute;
|
||||
top: 11%;
|
||||
|
||||
background-color: #E5E5E5;
|
||||
background-image: url("banner100.jpg");
|
||||
}
|
||||
@ -45,13 +41,10 @@
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
|
||||
-webkit-filter: drop-shadow(2px 2px 5px #333);
|
||||
filter: drop-shadow(2px 2px 5px #333);
|
||||
}
|
||||
@ -65,7 +58,6 @@
|
||||
.text {
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
|
||||
-webkit-filter: drop-shadow(2px 2px 5px #444);
|
||||
filter: drop-shadow(2px 2px 5px #444);
|
||||
}
|
||||
@ -84,20 +76,15 @@ p.text {
|
||||
#loginButton {
|
||||
font-size: 200%;
|
||||
padding: 2%;
|
||||
|
||||
-webkit-border-radius: 6;
|
||||
-moz-border-radius: 6;
|
||||
border-radius: 6px;
|
||||
|
||||
position: relative;
|
||||
|
||||
background-color: #005CE6;
|
||||
|
||||
-webkit-transition: background-color 0.4s ease;
|
||||
-moz-transition: background-color 0.4s ease;
|
||||
-ms-transition: background-color 0.4s ease;
|
||||
transition: background-color 0.4s ease;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -107,7 +94,6 @@ p.text {
|
||||
|
||||
#loginButton:active {
|
||||
background-color: #FF4D4D;
|
||||
|
||||
-webkit-transition: background-color 0.1s ease;
|
||||
-moz-transition: background-color 0.1s ease;
|
||||
-ms-transition: background-color 0.1s ease;
|
||||
@ -130,7 +116,6 @@ p.text {
|
||||
font-size: 150%;
|
||||
margin: 0;
|
||||
padding: 1%;
|
||||
|
||||
-webkit-filter: drop-shadow(2px 2px 5px #444);
|
||||
filter: drop-shadow(2px 2px 5px #444);
|
||||
}
|
||||
@ -138,7 +123,6 @@ p.text {
|
||||
a {
|
||||
color: #0099CC;
|
||||
text-decoration: none;
|
||||
|
||||
-webkit-transition: color 0.4s ease;
|
||||
-moz-transition: color 0.4s ease;
|
||||
-ms-transition: color 0.4s ease;
|
||||
@ -148,4 +132,3 @@ a {
|
||||
a:hover {
|
||||
color: #00BFFF;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import {
|
||||
Template
|
||||
} from 'meteor/templating';
|
||||
|
||||
import './main.html';
|
||||
|
||||
@ -25,11 +27,11 @@ var calendarColors = {
|
||||
"project": "blue",
|
||||
"normal": "green",
|
||||
"quiz": "black"
|
||||
}
|
||||
};
|
||||
var options = {
|
||||
"privacy": ["Public", "Hidden"],
|
||||
"category": ["Class", "Club", "Other"]
|
||||
}
|
||||
};
|
||||
|
||||
var searchSchools = [];
|
||||
|
||||
@ -38,16 +40,16 @@ Session.set("mode",null); // Change to user preferences
|
||||
|
||||
Template.registerHelper('divColor', (div) => {
|
||||
return themeColors[Cookie.get("theme")][div];
|
||||
})
|
||||
});
|
||||
|
||||
Template.registerHelper('overlayDim', (part) => {
|
||||
var dim = [window.innerWidth * .2,window.innerHeight * .2];
|
||||
var dim = [window.innerWidth * .2, window.innerHeight * 0.2];
|
||||
var width = "width:" + dim[0].toString() + "px;";
|
||||
var height = "height:" + dim[1].toString() + "px;";
|
||||
var margin = "margin-left:" + (-dim[0] / 2).toString() + "px;";
|
||||
var bg = "background-color:"+themeColors[Cookie.get("theme")]["header"]+";";
|
||||
var bg = "background-color:" + themeColors[Cookie.get("theme")].header + ";";
|
||||
return width + height + margin + bg;
|
||||
})
|
||||
});
|
||||
|
||||
Template.main.helpers({
|
||||
schoolName() {
|
||||
@ -73,7 +75,7 @@ Template.main.helpers({
|
||||
} else if (Session.get("sidebar") === "both") {
|
||||
return "0%";
|
||||
} else {
|
||||
return openValues["menu"];
|
||||
return openValues.menu;
|
||||
}
|
||||
},
|
||||
optionsStatus() {
|
||||
@ -82,7 +84,7 @@ Template.main.helpers({
|
||||
} else if (Session.get("sidebar") === "both") {
|
||||
return "0%";
|
||||
} else {
|
||||
return openValues["options"];
|
||||
return openValues.options;
|
||||
}
|
||||
},
|
||||
modeStatus(status) {
|
||||
@ -106,7 +108,11 @@ Template.main.helpers({
|
||||
backgroundColor = calendarColors[current.type];
|
||||
title = current.name;
|
||||
duedate = current.dueDate.toISOString().slice(0, 10);
|
||||
events.push({start: duedate, title: title, backgroundColor: backgroundColor});
|
||||
events.push({
|
||||
start: duedate,
|
||||
title: title,
|
||||
backgroundColor: backgroundColor
|
||||
});
|
||||
});
|
||||
return {
|
||||
height: window.innerHeight * .8,
|
||||
@ -120,13 +126,13 @@ Template.main.helpers({
|
||||
};
|
||||
},
|
||||
calCenter() {
|
||||
var width = window.innerWidth * .85;
|
||||
return "width:"+width.toString()+"px;margin-left:"+(.5*window.innerWidth-.5*width).toString()+"px";
|
||||
var width = window.innerWidth * 0.85;
|
||||
return "width:" + width.toString() + "px;margin-left:" + (0.5 * window.innerWidth - 0.5 * width).toString() + "px";
|
||||
},
|
||||
calbg() {
|
||||
var width = window.innerWidth * .865;
|
||||
var height = window.innerHeight * .76;
|
||||
return "width:"+width.toString()+"px;height:"+height.toString()+"px;margin-left:"+(.5*window.innerWidth-.5*width).toString()+"px;margin-top:"+(.47*window.innerHeight-.5*height).toString()+"px";
|
||||
var width = window.innerWidth * 0.865;
|
||||
var height = window.innerHeight * 0.76;
|
||||
return "width:" + width.toString() + "px;height:" + height.toString() + "px;margin-left:" + (0.5 * window.innerWidth - 0.5 * width).toString() + "px;margin-top:" + (0.47 * window.innerHeight - 0.5 * height).toString() + "px";
|
||||
}
|
||||
});
|
||||
|
||||
@ -134,7 +140,7 @@ Template.main.events({
|
||||
'click .fa-bars' () {
|
||||
var side = Session.get("sidebar");
|
||||
if (side === "menuContainer") {
|
||||
Session.set("sidebar",null)
|
||||
Session.set("sidebar", null);
|
||||
} else if (side === "optionsContainer") {
|
||||
Session.set("sidebar", "both");
|
||||
} else if (side === "both") {
|
||||
@ -146,7 +152,7 @@ Template.main.events({
|
||||
'click .fa-cog' () {
|
||||
var side = Session.get("sidebar");
|
||||
if (side === "optionsContainer") {
|
||||
Session.set("sidebar",null)
|
||||
Session.set("sidebar", null);
|
||||
} else if (side === "menuContainer") {
|
||||
Session.set("sidebar", "both");
|
||||
} else if (side === "both") {
|
||||
|
||||
@ -56,7 +56,6 @@
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
|
||||
position: absolute;
|
||||
top: 43%;
|
||||
left: 2.5%;
|
||||
@ -68,7 +67,6 @@
|
||||
width: 100%;
|
||||
height: 5%;
|
||||
padding: 0.5% 0 0.5% 0;
|
||||
|
||||
background-color: #0D0D0D;
|
||||
}
|
||||
|
||||
@ -84,13 +82,10 @@
|
||||
|
||||
.profOptions {
|
||||
box-shadow: 2px 2px 5px 3px #666;
|
||||
|
||||
position: absolute;
|
||||
display: none;
|
||||
z-index: 5;
|
||||
|
||||
opacity: 0;
|
||||
|
||||
-webkit-transition: opacity 0.4s ease;
|
||||
-moz-transition: opacity 0.4s ease;
|
||||
-ms-transition: opacity 0.4s ease;
|
||||
@ -102,10 +97,8 @@
|
||||
min-width: 10%;
|
||||
padding: 20px;
|
||||
margin: 0;
|
||||
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-transition: box-shadow 0.4s ease;
|
||||
-moz-transition: box-shadow 0.4s ease;
|
||||
-ms-transition: box-shadow 0.4s ease;
|
||||
@ -126,7 +119,6 @@
|
||||
padding: 4%;
|
||||
padding-top: 2.5%;
|
||||
padding-right: 4%;
|
||||
|
||||
box-shadow: 2px 2px 5px 3px #666;
|
||||
}
|
||||
|
||||
@ -145,7 +137,6 @@
|
||||
height: 30%;
|
||||
float: right;
|
||||
border-top: 5px solid #2E4F74;
|
||||
|
||||
-webkit-transition: width 0.4s ease;
|
||||
-moz-transition: width 0.4s ease;
|
||||
-ms-transition: width 0.4s ease;
|
||||
@ -170,12 +161,9 @@
|
||||
.profFunction {
|
||||
margin-right: 1%;
|
||||
padding: 2%;
|
||||
|
||||
border: 2px solid rgba(0, 0, 0, 0.2);
|
||||
|
||||
display: inherit;
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-transition: background-color 0.4s ease;
|
||||
-moz-transition: background-color 0.4s ease;
|
||||
-ms-transition: background-color 0.4s ease;
|
||||
@ -184,10 +172,10 @@
|
||||
|
||||
.profFunction:hover {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
|
||||
}
|
||||
|
||||
.profFunction i, .profFunction h4 {
|
||||
.profFunction i,
|
||||
.profFunction h4 {
|
||||
padding: 1%;
|
||||
}
|
||||
|
||||
@ -200,29 +188,34 @@
|
||||
width: 30%;
|
||||
margin-top: 3%;
|
||||
padding: 1.5% 1% 1.5% 1%;
|
||||
|
||||
-webkit-animation: expand .7s ease 1;
|
||||
animation: expand .7s ease 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes expand {
|
||||
0% { width: 0%; }
|
||||
100% { width: 30%; }
|
||||
0% {
|
||||
width: 0%;
|
||||
}
|
||||
100% {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes expand {
|
||||
0% { width: 0%; }
|
||||
100% { width: 30%; }
|
||||
0% {
|
||||
width: 0%;
|
||||
}
|
||||
100% {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
#label {
|
||||
width: 90%;
|
||||
margin-top: 2.5%;
|
||||
margin-bottom: 2%;
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
box-shadow: none;
|
||||
|
||||
display: table;
|
||||
cursor: default;
|
||||
}
|
||||
@ -231,9 +224,7 @@
|
||||
width: 90%;
|
||||
padding: 1%;
|
||||
padding-right: 100%;
|
||||
|
||||
display: inline-block;
|
||||
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
@ -242,9 +233,7 @@
|
||||
font-style: italic;
|
||||
font-weight: 200;
|
||||
margin-left: 1%;
|
||||
|
||||
color: #999;
|
||||
|
||||
-webkit-filter: none;
|
||||
filter: none;
|
||||
}
|
||||
@ -254,11 +243,9 @@
|
||||
width: 100%;
|
||||
margin-bottom: 3%;
|
||||
padding: 2%;
|
||||
|
||||
box-shadow: 2px 2px 5px 3px #666;
|
||||
display: table;
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-transition: background-color 0.4s ease;
|
||||
-moz-transition: background-color 0.4s ease;
|
||||
-ms-transition: background-color 0.4s ease;
|
||||
@ -327,11 +314,9 @@
|
||||
font-size: 140%;
|
||||
margin: 0 35% 0 35%;
|
||||
padding: 2%;
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.25);
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-transition: background-color 0.4s ease;
|
||||
-moz-transition: background-color 0.4s ease;
|
||||
-ms-transition: background-color 0.4s ease;
|
||||
@ -353,14 +338,11 @@
|
||||
#save {
|
||||
font-size: 90%;
|
||||
background-color: #CC4444;
|
||||
|
||||
box-shadow: -1px 2px 5px 1px #333;
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 10%;
|
||||
z-index: 5;
|
||||
|
||||
-webkit-transition: transform 0.2s ease, background-color 0.1s ease;
|
||||
-moz-transition: transform 0.2s ease, background-color 0.1s ease;
|
||||
-ms-transition: transform 0.2s ease, background-color 0.1s ease;
|
||||
@ -383,9 +365,6 @@
|
||||
font-weight: 200;
|
||||
width: 100%;
|
||||
padding: 8%;
|
||||
|
||||
-webkit-filter: none;
|
||||
filter: none !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import {
|
||||
Template
|
||||
} from 'meteor/templating';
|
||||
|
||||
Session.set("profInputOpen", null);
|
||||
Session.set("profClassTab", "manClass");
|
||||
@ -33,7 +35,9 @@ Template.profile.helpers({
|
||||
collection: classes,
|
||||
field: "name",
|
||||
template: Template.classDisplay,
|
||||
filter: {status: true}
|
||||
filter: {
|
||||
status: true
|
||||
}
|
||||
}]
|
||||
};
|
||||
},
|
||||
@ -64,7 +68,7 @@ Template.profile.helpers({
|
||||
},
|
||||
mainCenter() {
|
||||
var width = window.innerWidth * 1600 / 1920 + 10;
|
||||
return "width:"+width.toString()+"px;margin-left:"+-.5*width.toString()+"px";
|
||||
return "width:" + width.toString() + "px;margin-left:" + -0.5 * width.toString() + "px";
|
||||
},
|
||||
mainHeight() {
|
||||
return window.innerHeight.toString() + "px";
|
||||
@ -80,7 +84,7 @@ Template.profile.helpers({
|
||||
return "width:" + width.toString() + "px;height:" + height.toString() + "px;background-image:url(\'" + banner + "\');background-size:" + width.toString() + "px " + height.toString() + "px";
|
||||
},
|
||||
avatar() {
|
||||
var dim = window.innerWidth * 1600/1920 * .16;
|
||||
var dim = window.innerWidth * 1600 / 1920 * 0.16;
|
||||
if (Meteor.user().profile.avatar !== undefined) {
|
||||
var pic = "\'" + Meteor.user().profile.avatar + "\'";
|
||||
} else {
|
||||
@ -89,8 +93,8 @@ Template.profile.helpers({
|
||||
return "background-image:url(" + pic + ");background-size:" + dim.toString() + "px " + dim.toString() + "px";
|
||||
},
|
||||
avatarDim() {
|
||||
var dim = window.innerWidth * 1600/1920 * .16;
|
||||
return "height:"+dim.toString()+"px;width:"+dim.toString()+"px;top:"+.43*window.innerHeight.toString()+"px;";
|
||||
var dim = window.innerWidth * 1600 / 1920 * 0.16;
|
||||
return "height:" + dim.toString() + "px;width:" + dim.toString() + "px;top:" + 0.43 * window.innerHeight.toString() + "px;";
|
||||
},
|
||||
username() {
|
||||
return Meteor.user().profile.name;
|
||||
@ -117,21 +121,34 @@ Template.profile.helpers({
|
||||
}
|
||||
},
|
||||
classes() {
|
||||
return classes.find( { status: { $eq: true }, privacy: { $eq: false }}, {sort: { subscribers: -1 }}, {limit: 20}).fetch();
|
||||
return classes.find({
|
||||
status: {
|
||||
$eq: true
|
||||
},
|
||||
privacy: {
|
||||
$eq: false
|
||||
}
|
||||
}, {
|
||||
sort: {
|
||||
subscribers: -1
|
||||
}
|
||||
}, {
|
||||
limit: 20
|
||||
}).fetch();
|
||||
},
|
||||
profClassHeight() {
|
||||
return .6*window.innerHeight.toString()+"px";
|
||||
return 0.6 * window.innerHeight.toString() + "px";
|
||||
},
|
||||
classHolderHeight() {
|
||||
return .26*window.innerHeight.toString()+"px";
|
||||
return 0.26 * window.innerHeight.toString() + "px";
|
||||
},
|
||||
profClassTabColor(status) {
|
||||
if (status === Session.get("profClassTab")) {
|
||||
return themeColors[Cookie.get("theme")].highlightText;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
},
|
||||
profClassTabColor(status) {
|
||||
if(status === Session.get("profClassTab")) {
|
||||
return themeColors[Cookie.get("theme")].highlightText;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
},
|
||||
profClassTab(tab) {
|
||||
if (tab === Session.get("profClassTab")) {
|
||||
return true;
|
||||
@ -158,7 +175,7 @@ Template.profile.helpers({
|
||||
confirmText() {
|
||||
return Session.get("confirmText");
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
Template.profile.events({
|
||||
'click profOptions p' (event) {
|
||||
@ -185,7 +202,7 @@ Template.profile.events({
|
||||
}
|
||||
input.value = ele.childNodes[0].nodeValue;
|
||||
input.className = "changeInput";
|
||||
input.style.height = .9*dim.height.toString()+"px";
|
||||
input.style.height = 0.9 * dim.height.toString() + "px";
|
||||
input.style.width = "70%";
|
||||
input.style.padding = "0.1%";
|
||||
input.id = ele.id + "a";
|
||||
@ -289,30 +306,30 @@ Template.profile.events({
|
||||
Session.set("radioDiv", null);
|
||||
Session.set("radioOffset", null);
|
||||
},
|
||||
'click .addClass' () {
|
||||
var functionHolder = document.getElementById("profClassInfoHolder")
|
||||
closeDivFade(functionHolder);
|
||||
setTimeout(function() {
|
||||
Session.set("profClassTab","addClass");
|
||||
openDivFade(functionHolder);
|
||||
},300);
|
||||
},
|
||||
'click .manageClass' () {
|
||||
var functionHolder = document.getElementById("profClassInfoHolder")
|
||||
closeDivFade(functionHolder);
|
||||
setTimeout(function() {
|
||||
Session.set("profClassTab","manClass");
|
||||
openDivFade(functionHolder);
|
||||
},300);
|
||||
},
|
||||
'click .createClass' () {
|
||||
var functionHolder = document.getElementById("profClassInfoHolder")
|
||||
closeDivFade(functionHolder);
|
||||
setTimeout(function() {
|
||||
Session.set("profClassTab","creClass");
|
||||
openDivFade(functionHolder);
|
||||
},300);
|
||||
},
|
||||
'click .addClass' () {
|
||||
var functionHolder = document.getElementById("profClassInfoHolder");
|
||||
closeDivFade(functionHolder);
|
||||
setTimeout(function() {
|
||||
Session.set("profClassTab", "addClass");
|
||||
openDivFade(functionHolder);
|
||||
}, 300);
|
||||
},
|
||||
'click .manageClass' () {
|
||||
var functionHolder = document.getElementById("profClassInfoHolder");
|
||||
closeDivFade(functionHolder);
|
||||
setTimeout(function() {
|
||||
Session.set("profClassTab", "manClass");
|
||||
openDivFade(functionHolder);
|
||||
}, 300);
|
||||
},
|
||||
'click .createClass' () {
|
||||
var functionHolder = document.getElementById("profClassInfoHolder");
|
||||
closeDivFade(functionHolder);
|
||||
setTimeout(function() {
|
||||
Session.set("profClassTab", "creClass");
|
||||
openDivFade(functionHolder);
|
||||
}, 300);
|
||||
},
|
||||
'click .fa-search' () {
|
||||
Session.set("searching", true);
|
||||
},
|
||||
@ -387,7 +404,7 @@ Template.profile.events({
|
||||
},
|
||||
'click #creSubmit' () {
|
||||
var data = getCreateFormData();
|
||||
if(data == null) return;
|
||||
if (data === null) return;
|
||||
Session.set("serverData", data);
|
||||
Session.set("confirm", "createClass");
|
||||
Session.set("confirmText", "Submit request?");
|
||||
@ -400,7 +417,7 @@ Template.profile.events({
|
||||
'focus .op' (event) {
|
||||
event.target.click();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function openDivFade(div) {
|
||||
if (div.className === "profOptions") {
|
||||
@ -427,9 +444,9 @@ function closeInput(sessval) {
|
||||
input.parentNode.removeChild(input);
|
||||
try {
|
||||
var restrict = document.getElementById("restrict");
|
||||
restrict.parentNode.removeChild(restrict)
|
||||
restrict.parentNode.removeChild(restrict);
|
||||
} catch (err) {}
|
||||
if(input.value == "") {
|
||||
if (input.value === "") {
|
||||
span.childNodes[0].nodeValue = "Click here to edit...";
|
||||
} else {
|
||||
span.childNodes[0].nodeValue = input.value;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user