diff --git a/hourglass/client/main/main.js b/hourglass/client/main/main.js index b7b93f8..ea95c39 100644 --- a/hourglass/client/main/main.js +++ b/hourglass/client/main/main.js @@ -902,7 +902,7 @@ startDragula = function() { }); }; -function myClasses() { +myClasses = function() { var array = []; var courses = Session.get("user").classes; var classDisp = Session.get("classDisp"); // Get sidebar class filter. diff --git a/hourglass/client/mobile/mobile.css b/hourglass/client/mobile/mobile.css new file mode 100644 index 0000000..87de409 --- /dev/null +++ b/hourglass/client/mobile/mobile.css @@ -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; + +} \ No newline at end of file diff --git a/hourglass/client/mobile/mobile.html b/hourglass/client/mobile/mobile.html new file mode 100644 index 0000000..36dc6db --- /dev/null +++ b/hourglass/client/mobile/mobile.html @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/hourglass/client/mobile/mobile.js b/hourglass/client/mobile/mobile.js new file mode 100644 index 0000000..201d0da --- /dev/null +++ b/hourglass/client/mobile/mobile.js @@ -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; + } +}); \ No newline at end of file diff --git a/hourglass/lib/router.js b/hourglass/lib/router.js index c824811..c4ccb3d 100644 --- a/hourglass/lib/router.js +++ b/hourglass/lib/router.js @@ -31,6 +31,7 @@ Router.route('/', { } else { Session.set("user", Meteor.user().profile); this.render("main"); + //this.render("mobile"); } } }