mobile page start
This commit is contained in:
parent
cced1ee2a6
commit
77f8772be8
@ -902,7 +902,7 @@ startDragula = function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function myClasses() {
|
myClasses = function() {
|
||||||
var array = [];
|
var array = [];
|
||||||
var courses = Session.get("user").classes;
|
var courses = Session.get("user").classes;
|
||||||
var classDisp = Session.get("classDisp"); // Get sidebar class filter.
|
var classDisp = Session.get("classDisp"); // Get sidebar class filter.
|
||||||
|
|||||||
37
hourglass/client/mobile/mobile.css
Normal file
37
hourglass/client/mobile/mobile.css
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#mobileHeader h2 {
|
||||||
|
font-size: 3vh;
|
||||||
|
font-weight: 200;
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
|
height: 6vh;
|
||||||
|
|
||||||
|
display: inline;
|
||||||
|
|
||||||
|
line-height: 6vh;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mobileHeader .fa-bars {
|
||||||
|
height: 6vh;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mobileBody {
|
||||||
|
width: 100%;
|
||||||
|
height: 94vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobileClass {
|
||||||
|
width: 100%;
|
||||||
|
height: 10vh;
|
||||||
|
border-bottom: 1px solid #AAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobileClassContent {
|
||||||
|
padding: 2vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobileClassContent h4 {
|
||||||
|
font-size: 3vh;
|
||||||
|
|
||||||
|
}
|
||||||
18
hourglass/client/mobile/mobile.html
Normal file
18
hourglass/client/mobile/mobile.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<template name="mobile">
|
||||||
|
<div class="noScroll">
|
||||||
|
<header id="mobileHeader" style="background-color:{{divColor 'mainColor'}}">
|
||||||
|
<i class="fa fa-bars" style="color:{{iconStatus}}" aria-hidden="true"></i>
|
||||||
|
<h2>{{schoolName}}</h2>
|
||||||
|
</header>
|
||||||
|
<div id="mobileBody" style="background-color:{{divColor 'secondaryColor'}}">
|
||||||
|
{{#each myWork}}
|
||||||
|
<div class="mobileClass">
|
||||||
|
<div class="mobileType"></div>
|
||||||
|
<div class="mobileClassContent">
|
||||||
|
<h4>{{name}}</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
26
hourglass/client/mobile/mobile.js
Normal file
26
hourglass/client/mobile/mobile.js
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Session.set("mobileWork", []);
|
||||||
|
|
||||||
|
Template.mobile.rendered = function() {
|
||||||
|
document.getElementsByTagName("body")[0].style.color = Session.get("user").preferences.theme.textColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
Template.mobile.helpers({
|
||||||
|
schoolName() { // Finds the name of the user's school.
|
||||||
|
if (Session.get("user").school === undefined || Session.get("user").school === null) return;
|
||||||
|
return Session.get("user").school;
|
||||||
|
},
|
||||||
|
iconStatus() {
|
||||||
|
return (Session.get("sidebarMode") === "mobile") ? Session.get("user").preferences.theme.iconHighlight : "";
|
||||||
|
},
|
||||||
|
myWork() {
|
||||||
|
var array = myClasses();
|
||||||
|
var allWork = [];
|
||||||
|
for(var i = 0; i < array.length; i++) {
|
||||||
|
for(var j = 0; j < array[i].thisClassWork.length; j++) {
|
||||||
|
allWork.push(array[i].thisClassWork[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Session.set("mobileWork", allWork);
|
||||||
|
return allWork;
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -31,6 +31,7 @@ Router.route('/', {
|
|||||||
} else {
|
} else {
|
||||||
Session.set("user", Meteor.user().profile);
|
Session.set("user", Meteor.user().profile);
|
||||||
this.render("main");
|
this.render("main");
|
||||||
|
//this.render("mobile");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user