CSS size and zoom fixes
This commit is contained in:
parent
7842b995dc
commit
a5d0d17947
@ -777,7 +777,6 @@ input, textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#bg {
|
#bg {
|
||||||
min-width: 1920px;
|
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|||||||
@ -95,7 +95,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img id="bg" src={{bgSrc}}>
|
<img id="bg" src={{bgSrc}} style="min-width:{{screen}}">
|
||||||
<div id="mainBody{{highlight}}">
|
<div id="mainBody{{highlight}}">
|
||||||
{{#if currMode 'classes'}}
|
{{#if currMode 'classes'}}
|
||||||
<div id="classesMode">
|
<div id="classesMode">
|
||||||
|
|||||||
@ -70,6 +70,12 @@ Template.registerHelper('userProfile', () => {
|
|||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Template.registerHelper('screen', (multiplier, fraction) => {
|
||||||
|
if(multiplier === undefined) return screen.width.toString() + "px";
|
||||||
|
if(fraction === undefined) return (screen.width * parseInt(multiplier)).toString() + "px"
|
||||||
|
return ((screen.width) * parseInt(multiplier) / parseInt(fraction)).toString() + "px";
|
||||||
|
});
|
||||||
|
|
||||||
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.
|
||||||
return themeColors[Session.get("user").preferences.theme][div];
|
return themeColors[Session.get("user").preferences.theme][div];
|
||||||
});
|
});
|
||||||
|
|||||||
@ -4,6 +4,13 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profWrapper {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
#profPage .change {
|
#profPage .change {
|
||||||
font-size: 2.5vh;
|
font-size: 2.5vh;
|
||||||
}
|
}
|
||||||
@ -41,7 +48,6 @@
|
|||||||
#profPage {
|
#profPage {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-right: 10%;
|
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
@ -307,7 +313,7 @@
|
|||||||
|
|
||||||
.classBox {
|
.classBox {
|
||||||
font-size: 2.7vh;
|
font-size: 2.7vh;
|
||||||
width: 39vw;
|
width: 94%;
|
||||||
margin-bottom: 3%;
|
margin-bottom: 3%;
|
||||||
padding: 2%;
|
padding: 2%;
|
||||||
|
|
||||||
@ -493,22 +499,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#createdClasses {
|
#createdClasses {
|
||||||
width: 35vw;
|
width: 500px;
|
||||||
height: 73vh;
|
height: 73vh;
|
||||||
margin-right: -40%;
|
padding: 30px 0 30px 30px;
|
||||||
padding: 2.5% 0 2.5% 2.5%;
|
|
||||||
|
|
||||||
border-top: 5px solid #27646D;
|
border-top: 5px solid #27646D;
|
||||||
box-shadow: -1px 2px 5px 1px #444;
|
box-shadow: -1px 2px 5px 1px #444;
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10vh;
|
top: 10vh;
|
||||||
right: 0;
|
|
||||||
|
|
||||||
-webkit-transition: margin 0.4s ease;
|
-webkit-transition: right 0.4s ease;
|
||||||
-moz-transition: margin 0.4s ease;
|
-moz-transition: right 0.4s ease;
|
||||||
-ms-transition: margin 0.4s ease;
|
-ms-transition: right 0.4s ease;
|
||||||
transition: margin 0.4s ease;
|
transition: right 0.4s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code {
|
#code {
|
||||||
@ -684,22 +688,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#joinPrivClass {
|
#joinPrivClass {
|
||||||
width: 18vw;
|
width: 200px;
|
||||||
margin-bottom: -20%;
|
height: 110px;
|
||||||
padding: 1.5%;
|
padding: 20px;
|
||||||
padding-bottom: 1%;
|
|
||||||
|
|
||||||
border-top: 5px solid #852E6D;
|
border-top: 5px solid #852E6D;
|
||||||
box-shadow: -2px 0px 5px 1px #444;
|
box-shadow: -2px 0px 5px 1px #444;
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 5vw;
|
right: 5vw;
|
||||||
bottom: 0;
|
|
||||||
|
|
||||||
-webkit-transition: margin 0.4s ease;
|
-webkit-transition: bottom 0.4s ease;
|
||||||
-moz-transition: margin 0.4s ease;
|
-moz-transition: bottom 0.4s ease;
|
||||||
-ms-transition: margin 0.4s ease;
|
-ms-transition: bottom 0.4s ease;
|
||||||
transition: margin 0.4s ease;
|
transition: bottom 0.4s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#joinPrivClass h3 {
|
#joinPrivClass h3 {
|
||||||
|
|||||||
@ -2,7 +2,8 @@
|
|||||||
<div class="noScroll">
|
<div class="noScroll">
|
||||||
<div id="mainpage{{userProfile}}" onclick="window.location='/'"><h2>Main Page</h2></div>
|
<div id="mainpage{{userProfile}}" onclick="window.location='/'"><h2>Main Page</h2></div>
|
||||||
<div id="logout2" onclick='document.getElementById("login-buttons-logout").click();'><h2>Logout</h2></div>
|
<div id="logout2" onclick='document.getElementById("login-buttons-logout").click();'><h2>Logout</h2></div>
|
||||||
<div id="profPage" style="background-color:{{divColor 'header'}};{{textColor}}{{loadNew}}">
|
<div id="profWrapper">
|
||||||
|
<div id="profPage" style="background-color:{{divColor 'header'}};min-width:{{screen}}{{textColor}}{{loadNew}}">
|
||||||
<div id="profMainContainer">
|
<div id="profMainContainer">
|
||||||
<div id="profTop">
|
<div id="profTop">
|
||||||
<img id="profBanner" src='{{banner}}' alt="Banner">
|
<img id="profBanner" src='{{banner}}' alt="Banner">
|
||||||
@ -206,6 +207,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="overlay">
|
<div class="overlay">
|
||||||
<div class="overlayCont" style="background-color:{{divColor 'header'}}">
|
<div class="overlayCont" style="background-color:{{divColor 'header'}}">
|
||||||
<p>{{confirmText}}</p>
|
<p>{{confirmText}}</p>
|
||||||
@ -216,7 +218,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="createdClasses" style="background-color:{{divColor 'cards'}}" classid="{{selectedClass '_id'}}">
|
<div id="createdClasses" style="background-color:{{divColor 'cards'}};right:{{ownedStatus}}" classid="{{selectedClass '_id'}}">
|
||||||
<h3>{{selectedClass 'name'}}</h3>
|
<h3>{{selectedClass 'name'}}</h3>
|
||||||
<h4 id="codetext">Code:</h4>
|
<h4 id="codetext">Code:</h4>
|
||||||
<input id="code" value="{{selectedClass 'code'}}" type="text" readonly>
|
<input id="code" value="{{selectedClass 'code'}}" type="text" readonly>
|
||||||
@ -253,7 +255,7 @@
|
|||||||
<div id="deleteClass">Delete Class</div>
|
<div id="deleteClass">Delete Class</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="joinPrivClass" style="background-color:{{divColor 'cards'}}">
|
<div id="joinPrivClass" style="background-color:{{divColor 'cards'}};bottom:{{privStatus}}">
|
||||||
<h3>Enter Code:</h3>
|
<h3>Enter Code:</h3>
|
||||||
<input id="privateCode" type="text" placeholder="Enter code here...">
|
<input id="privateCode" type="text" placeholder="Enter code here...">
|
||||||
<h4 id="privSubmit">Submit</h4>
|
<h4 id="privSubmit">Submit</h4>
|
||||||
|
|||||||
@ -1,14 +1,20 @@
|
|||||||
/* jshint esversion: 6 */
|
/* jshint esversion: 6 */
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Template
|
Template
|
||||||
} from 'meteor/templating';
|
} from 'meteor/templating';
|
||||||
|
|
||||||
|
var openValues = {
|
||||||
|
"owned": "-540px",
|
||||||
|
"priv": "-160px"
|
||||||
|
};
|
||||||
|
|
||||||
confirm = null; // Sets function to execute after confirmation click.
|
confirm = null; // Sets function to execute after confirmation click.
|
||||||
|
|
||||||
// Sets up global variables
|
// Sets up global variables
|
||||||
|
|
||||||
Session.set("profClassTab", "manClass"); // Set default classes card mode to 'Manage Classes.'
|
Session.set("profClassTab", "manClass"); // Set default classes card mode to 'Manage Classes.'
|
||||||
|
Session.set("owned",false); // Status of createdClasses.
|
||||||
|
Session.set("privClass",false); //Status of joinPrivClass.
|
||||||
Session.set("modifying", null); // Stores current open input.
|
Session.set("modifying", null); // Stores current open input.
|
||||||
Session.set("notsearching", true); // If user is searching in search box.
|
Session.set("notsearching", true); // If user is searching in search box.
|
||||||
Session.set("autocompleteDivs", null); // Stores returned autocomplete results.
|
Session.set("autocompleteDivs", null); // Stores returned autocomplete results.
|
||||||
@ -70,25 +76,16 @@ Template.profile.helpers({
|
|||||||
return Session.get("user").name;
|
return Session.get("user").name;
|
||||||
},
|
},
|
||||||
motd() { // Returns the current user's description
|
motd() { // Returns the current user's description
|
||||||
if (Session.get("user").description === "") {
|
if (Session.get("user").description !== "") return Session.get("user").description;
|
||||||
return Session.get("user").description;
|
|
||||||
} else {
|
|
||||||
return "Say something about yourself!";
|
return "Say something about yourself!";
|
||||||
}
|
|
||||||
},
|
},
|
||||||
school() { // Returns the current user's school's name
|
school() { // Returns the current user's school's name
|
||||||
if (Session.get("user").school === "") {
|
if (Session.get("user").school !== "") return Session.get("user").school;
|
||||||
return Session.get("user").school;
|
|
||||||
} else {
|
|
||||||
return "Click here to edit...";
|
return "Click here to edit...";
|
||||||
}
|
|
||||||
},
|
},
|
||||||
grade() { // Returns the current user's grade
|
grade() { // Returns the current user's grade
|
||||||
if (Session.get("user").grade === "") {
|
if (Session.get("user").grade !== "") return Session.get("user").grade + "th";
|
||||||
return Session.get("user").grade + "th";
|
|
||||||
} else {
|
|
||||||
return "Click here to edit...";
|
return "Click here to edit...";
|
||||||
}
|
|
||||||
},
|
},
|
||||||
classes() { // Loads all of the possible classes ( Limit of twenty shown ) ( Sorts by class size )
|
classes() { // Loads all of the possible classes ( Limit of twenty shown ) ( Sorts by class size )
|
||||||
var array = classes.find(
|
var array = classes.find(
|
||||||
@ -111,6 +108,14 @@ Template.profile.helpers({
|
|||||||
}
|
}
|
||||||
return array;
|
return array;
|
||||||
},
|
},
|
||||||
|
ownedStatus() { // Status of createdClasses
|
||||||
|
if(!Session.get("owned")) return openValues.owned;
|
||||||
|
return "0px";
|
||||||
|
},
|
||||||
|
privStatus() {
|
||||||
|
if(!Session.get("privClass")) return openValues.priv;
|
||||||
|
return "0px";
|
||||||
|
},
|
||||||
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 (Session.equals("profClassTab",status)) {
|
if (Session.equals("profClassTab",status)) {
|
||||||
return themeColors[Meteor.user().profile.preferences.theme].highlightText;
|
return themeColors[Meteor.user().profile.preferences.theme].highlightText;
|
||||||
@ -170,7 +175,7 @@ Template.profile.events({
|
|||||||
if(!document.getElementById("createdClasses").contains(event.target) &&
|
if(!document.getElementById("createdClasses").contains(event.target) &&
|
||||||
!Session.equals("code",null) &&
|
!Session.equals("code",null) &&
|
||||||
!event.target.className.includes("fa-times-circle-o")) {
|
!event.target.className.includes("fa-times-circle-o")) {
|
||||||
document.getElementById("createdClasses").style.marginRight = "-40%";
|
Session.set("owned",false);
|
||||||
}
|
}
|
||||||
if(Session.get("changeAdmin") &&
|
if(Session.get("changeAdmin") &&
|
||||||
!document.getElementById("changeAdmin").contains(event.target)) {
|
!document.getElementById("changeAdmin").contains(event.target)) {
|
||||||
@ -179,10 +184,10 @@ Template.profile.events({
|
|||||||
div.removeChild(div.childNodes[3]);
|
div.removeChild(div.childNodes[3]);
|
||||||
div.removeChild(div.childNodes[3]);
|
div.removeChild(div.childNodes[3]);
|
||||||
}
|
}
|
||||||
if(Session.get("privateClass") &&
|
if(Session.get("privClass") &&
|
||||||
|
!(event.target.id === "private") &&
|
||||||
!document.getElementById("joinPrivClass").contains(event.target)) {
|
!document.getElementById("joinPrivClass").contains(event.target)) {
|
||||||
Session.set("privateClass",false);
|
Session.set("privClass",false);
|
||||||
document.getElementById("joinPrivClass").style.marginBottom = "-20%";
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// MAIN BUTTONS
|
// MAIN BUTTONS
|
||||||
@ -275,7 +280,7 @@ Template.profile.events({
|
|||||||
}
|
}
|
||||||
|
|
||||||
Session.set("selectedClass",array);
|
Session.set("selectedClass",array);
|
||||||
document.getElementById("createdClasses").style.marginRight = "0";
|
Session.set("owned",true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
'click .classBox .fa-times' (event) { // Leaves a class
|
'click .classBox .fa-times' (event) { // Leaves a class
|
||||||
@ -296,11 +301,11 @@ Template.profile.events({
|
|||||||
openDivFade(document.getElementsByClassName("overlay")[0]);
|
openDivFade(document.getElementsByClassName("overlay")[0]);
|
||||||
},
|
},
|
||||||
'click #private' (event) { // Joins private class
|
'click #private' (event) { // Joins private class
|
||||||
Session.set("privateClass",true);
|
if(Session.get("privClass")) return;
|
||||||
var input = document.getElementById("privateCode");
|
var input = document.getElementById("privateCode");
|
||||||
input.className = "";
|
input.className = "";
|
||||||
input.placeholder = "Enter code here...";
|
input.placeholder = "Enter code here...";
|
||||||
document.getElementById("joinPrivClass").style.marginBottom = "0";
|
Session.set("privClass",true);
|
||||||
},
|
},
|
||||||
'click #privSubmit' () { // Submits private class code
|
'click #privSubmit' () { // Submits private class code
|
||||||
var input = document.getElementById("privateCode");
|
var input = document.getElementById("privateCode");
|
||||||
@ -309,7 +314,7 @@ Template.profile.events({
|
|||||||
serverData = code;
|
serverData = code;
|
||||||
Meteor.call("joinPrivateClass", code, function(error, result) {
|
Meteor.call("joinPrivateClass", code, function(error, result) {
|
||||||
if(result) {
|
if(result) {
|
||||||
document.getElementById("joinPrivClass").style.marginBottom = "-10%";
|
Session.set("privClass",false);
|
||||||
} else {
|
} else {
|
||||||
input.className = "formInvalid";
|
input.className = "formInvalid";
|
||||||
input.placeholder = "Invalid code.";
|
input.placeholder = "Invalid code.";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user