Skip to content

Commit

Permalink
Style fixes and Parsing token fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
BAyzenberg committed Jun 23, 2017
1 parent 155737c commit 57802ec
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 14 deletions.
4 changes: 3 additions & 1 deletion app/component/navbar/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ $small-font: 'Squada One', cursive;
.navbar{
background: $brand-secondary;
top: 0;

width: 100%;
position: fixed;
margin-top: 0%;
}

.title-block{
Expand Down
39 changes: 39 additions & 0 deletions app/component/post/view-post/_view-post.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//::::VARS:::://

$brand-primary: #910a05;
$brand-secondary: #444;
$brand-accent: #dc830c;
$black: #000;
$white: #fff;
$base-pad: 1% 2%;
$btn-margin: .5%;
$title-font: 'Nova Square', cursive;
$small-font: 'Squada One', cursive;

//::::MIXINS:::://
@mixin txtBig {
font-family: $title-font;
color: $black;
font-size: 3vw;
}

@mixin txtSmall {
font-family: $small-font;
color: #fff;
font-size: 2vw;
}
//::::STYLES:::://
.return-btn{
margin: 2% 5%;
}

.vp-li {
@include txtSmall;
display: block;
margin: 2% 5%;
}

.game-names {
@include txtSmall;
color: $brand-accent;
}
4 changes: 2 additions & 2 deletions app/component/post/view-post/view-post-controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

// require('./_view-post-controller.scss')
require('./_view-post.scss');

module.exports = {
template: require('./view-post.html'),
Expand All @@ -17,7 +17,7 @@ module.exports = {

this.post = JSON.parse($window.localStorage.currentPost);
this.showViewPost = true;

};
}],
bindings: {
Expand Down
16 changes: 8 additions & 8 deletions app/component/post/view-post/view-post.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<a href="/#!/home">&larr; return to feed</a>
<section>
<div ng-if="!viewPostCtrl.showEditPost">
<h2> this is the post: {{ viewPostCtrl.post.title }}</h2>
<ul>
<li>Host: {{ viewPostCtrl.post.host }}</li>
<li>Players: {{ viewPostCtrl.post.groupSize }}</li>
<li>Game: {{ viewPostCtrl.post.game }}</li>
<li>Platform: {{ viewPostCtrl.post.platform }}</li>
<li>From {{ viewPostCtrl.post.startTime }} until {{ viewPostCtrl.post.endTime }}</li>
<h2 class="page-tit">{{ viewPostCtrl.post.title }}</h2>
<a href="/#!/home" class="return-btn">&larr; return to feed</a>
<ul class="gamer-tags">
<li class="vp-li">Host: {{ viewPostCtrl.post.host }}</li>
<li class="vp-li">Players: {{ viewPostCtrl.post.groupSize }}</li>
<li class="vp-li">Game: {{ viewPostCtrl.post.game }}</li>
<li class="vp-li">Platform: {{ viewPostCtrl.post.platform }}</li>
<li class="vp-li">From {{ viewPostCtrl.post.startTime }} until {{ viewPostCtrl.post.endTime }}</li>
</ul>
</div>
</section>
4 changes: 4 additions & 0 deletions app/component/user/edit-user/_edit-user.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ $small-font: 'Squada One', cursive;
margin: $base-pad;
color: #black;
}

.update-button {
display: block;
}
4 changes: 2 additions & 2 deletions app/component/user/edit-user/edit-user.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ <h1 class="page-tit">Edit Profile</h1>
type="text"
ng-model="editUserCtrl.user.lol">

</form>
<button type="submit">Update Info</button>
<button type="submit" class="update-button">Update Info</button>
</form>
</section>
4 changes: 4 additions & 0 deletions app/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ body {
box-shadow: 0px 10px 20px -5px rgba(0,0,0,.8);
}

section {
margin-top: 10%;
}

.title {
@include txtBig;
background-color: $brand-primary;
Expand Down
2 changes: 1 addition & 1 deletion app/service/auth-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = [
$log.debug('#fe-authService.getToken()');

if(token) return $q.resolve(token);
token = $window.localStorage.getItem('token');
token = JSON.parse($window.localStorage.getItem('token'));
if(token) return $q.resolve(token);

return $q.reject(new Error('Token not found'));
Expand Down
1 change: 1 addition & 0 deletions app/service/user-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module.exports = [

return authService.getToken()
.then(token => {
console.log(token);
let url = `${__API_URL__}/api/user`;
let config = {
headers: {
Expand Down

0 comments on commit 57802ec

Please sign in to comment.