interface redistributed, user side panel added

This commit is contained in:
nau
2016-09-06 17:46:33 +02:00
parent a572462e82
commit 1bfdc2af45
4 changed files with 107 additions and 78 deletions

View File

@@ -38,7 +38,7 @@ router.get('/', function(req, res) {
res.send("Hello world!"); res.send("Hello world!");
}); });
app.use(router);*/ app.use(router);*/
app.use(express.static(__dirname + '/web')); app.use(express.static(__dirname + '/webapp'));
//CORS //CORS

View File

@@ -4,7 +4,12 @@ angular.module('workApp', ['chart.js'])
$scope, $scope,
$interval $interval
) { ) {
$scope.username="user"; $scope.user={
username: "Arnau",
avatar: "toucan",
github: "https://github.com/idoctnef",
totalWorkedTime: 4520
};
//localStorage.clear(); //localStorage.clear();
$scope.working=false; $scope.working=false;
$scope.projects=[]; $scope.projects=[];

View File

@@ -23,7 +23,7 @@
<nav> <nav>
<div class="nav-wrapper blue-grey darken-1"> <div class="nav-wrapper blue-grey darken-1">
<a href="#" class="brand-logo">Open Work Time <small>- online version</small></a> <a href="#" class="brand-logo">Open Work Time <small>- v0.1</small></a>
<ul id="nav-mobile" class="right"> <ul id="nav-mobile" class="right">
<li> <li>
<a ng-click="openCode()" target="_blank"> <a ng-click="openCode()" target="_blank">
@@ -44,9 +44,25 @@
</div> </div>
</nav> </nav>
<div class="">
<div class="row"> <div class="row">
<div class="card blue-grey lighten-4 col s12 m5 l5"> <div class="col s12 m4 l3 blue-grey lighten-2">
<!-- Grey navigation panel -->
<div class="o_user_title center-align">
<img ng-src="img/avatars/{{user.avatar}}.png" alt="" class="circle responsive-img blue-grey lighten-4">
<h3>{{user.username}}</h3>
</div>
<p>
Users's github: <a ng-href="{{user.github}}">{{user.github}}</a>
</p>
<p>
Total worked time: {{user.totalWorkedTime | secondsToDateTime | date:'HH:mm'}}h
</p>
</div>
<div class="col s12 m8 l9">
<div class="row">
<div class="card blue-grey lighten-4 col s12 m12 l5">
<div class="card-content"> <div class="card-content">
<span class="card-title">Projects</span> <span class="card-title">Projects</span>
<div class="collection"> <div class="collection">
@@ -90,7 +106,7 @@
</div> </div>
</div> </div>
<div ng-show="currentproject.title" class="card blue-grey lighten-4 col s12 m7 l7"> <div ng-show="currentproject.title" class="card blue-grey lighten-4 col s12 m12 l7">
<div class="card-content"> <div class="card-content">
<span class="card-title"> <span class="card-title">
<img ng-src="img/{{currentproject.icon}}.png" class="o_project_title_img"/> <img ng-src="img/{{currentproject.icon}}.png" class="o_project_title_img"/>
@@ -119,7 +135,7 @@
</div> </div>
</div> </div>
<div ng-show="!currentproject.title" class="card blue-grey lighten-4 col s12 m7 l7" style="height: 200px;"> <div ng-show="!currentproject.title" class="card blue-grey lighten-4 col s12 m12 l7" style="height: 200px;">
<span class="card-title"> <span class="card-title">
Select a project Select a project
</span> </span>
@@ -128,7 +144,7 @@
</div> </div>
</div> </div>
</div>
<!-- ELECTRON <!-- ELECTRON
Insert this line above script imports Insert this line above script imports

View File

@@ -18,3 +18,11 @@
.o_float_right{ .o_float_right{
float: right; float: right;
} }
.o_user_title{
width: 70%;
max-width: 150px;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
}