se-hub-33 #33 - Main Menu - More Skeleton

This commit is contained in:
Sagi Dayan 2015-06-16 20:34:37 +03:00
parent 190d9510ba
commit 45f59dcbcb
2 changed files with 150 additions and 35 deletions

View file

@ -2,10 +2,10 @@
body{ body{
font-family: "Alef Hebrew", font-family: "Alef Hebrew",
Helvetica Neue, Helvetica Neue,
Helvetica, Helvetica,
Arial, Arial,
sans-serif; sans-serif;
} }
.menuBtn { .menuBtn {
@ -144,11 +144,11 @@ body.noscroll
} }
.createCampus .createCampus
{ {
position:relative; position:relative;
/*float:right;*/ /*float:right;*/
} }
/*div.img campusAvatar /*div.img campusAvatar
{ {
@ -164,10 +164,77 @@ body.noscroll
border-left: 2px black solid; border-left: 2px black solid;
border-right: 2px black solid; border-right: 2px black solid;
border-radius: 1px black solid; border-radius: 1px black solid;
}*/ }*/
.gray-font{ .gray-font{
color: #7f7f7f; color: #7f7f7f;
font-size: 300%; font-size: 300%;
text-shadow:#e0e0e0 1px 1px 0; text-shadow:#e0e0e0 1px 1px 0;
} }
.user-pane-menu{
width: 100%;
height: 15%;
background-color: #3F51B5;
-webkit-box-shadow: 0px 13px 34px -14px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 13px 34px -14px rgba(0,0,0,0.75);
box-shadow: 0px 13px 34px -14px rgba(0,0,0,0.75);
top: 20px;
position: relative;
}
.user-pane-menu img{
border: 7px rgb(255, 255, 255) solid;
-webkit-border-radius: 100px;
-moz-border-radius: 100px;
border-radius: 50px;
width: 30%;
/*top: -40px;*/
position: relative;
z-index: 50;
}
.se-menu{
/*margin-top: 20%; */
}
.se-menu ul{
list-style: none;
padding: 0;
padding-left: 0;
}
.se-menu li{
width: 100%;
padding: 15px 0px 15px 15px;
font-size: 150%;
}
.se-menu li:hover{
background-color: #E2E2E2;
font-weight: bold;
}
.se-menu li .selected{
background-color: #E2E2E2;
}
.user-box{
width: 100%
}
.user-box img{
width: 100%;
border: 4px #7f7f7f solid;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.user-data{
margin-top: auto;
}
.se-menu ul a{
text-decoration: none !important;
color: #7f7f7f;
}

View file

@ -1,28 +1,76 @@
angular.module('SeHub') angular.module('SeHub')
.controller('mainController', ['$scope', '$rootScope', 'apiService', '$cookies', '$location', function ($scope, $rootScope, apiService, $cookies, $location) { .controller('mainController', ['$scope', '$rootScope', 'apiService', '$cookies', '$location', function($scope, $rootScope, apiService, $cookies, $location) {
var token = $cookies['com.sehub.www']; var token = $cookies['com.sehub.www'];
$scope.loadingData = true; $scope.loadingData = true;
$scope.isInRegisterMode = false; $scope.isInRegisterMode = false;
apiService.getUserByToken(token).success(function(data){ apiService.getUserByToken(token).success(function(data) {
if(data.message == 'No User Found'){ if (data.message == 'No User Found') {
console.error("No User Found!"); console.error("No User Found!");
} }
$scope.user = data; $scope.user = data;
if($scope.user.isFirstLogin){ if ($scope.user.isFirstLogin) {
$scope.menuObj = {}; $scope.menuObj = {};
$scope.isInRegisterMode = true; $scope.isInRegisterMode = true;
$scope.loadingData = false; $scope.loadingData = false;
$location.path('/register') $location.path('/register')
}else{ } else {
$location.path('/home') $location.path('/home')
} }
}) })
$scope.loadingData = false; apiService.getUserByToken(token).success(function(data) // Get user token
{
$scope.user = data;
$scope.loadingData = false;
}]); apiService.getAllCampuses($scope.user.seToken).success(function(data) // Get all the campuses
{
$scope.campuses = data;
}).error(function() {
});
});
$scope.menuItems = [{
"title": "Home",
"icon": "fa fa-home",
"style": "selected",
"route": "/home"
}, {
"title": "My Campuses",
"icon": "fa fa-university",
"style": "selected",
"route": "/campuses"
}, {
"title": "My Classes",
"icon": "fa fa-graduation-cap",
"style": "selected",
"route": "/campuses"
}, {
"title": "My Projects",
"icon": "fa fa-cube",
"style": "selected",
"route": "/campuses"
}, {
"title": "Tasks",
"icon": "fa fa-clipboard",
"style": "selected",
"route": "/campuses"
}, {
"title": "Settings",
"icon": "fa fa-cogs",
"style": "selected",
"route": "/campuses"
}, {
"title": "Log Out",
"icon": "fa fa-power-off",
"style": "selected",
"route": "/campuses"
}];
}]);