From cc2b9f04631045ae9df5892d339618c2905099f7 Mon Sep 17 00:00:00 2001 From: Wesley Batista Date: Thu, 20 Aug 2015 01:41:12 -0300 Subject: [PATCH 01/11] Remove lavish css --- blogproject/web/index.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/blogproject/web/index.html b/blogproject/web/index.html index 2e36cf7..e0cdaf9 100644 --- a/blogproject/web/index.html +++ b/blogproject/web/index.html @@ -34,9 +34,9 @@ - + @@ -55,13 +55,11 @@ - - - -
Polymer HTML5 Blog
-
-
+ + +
+ @@ -74,6 +72,7 @@ + From e5e7c89dd47732d7b949ff40d82c965d3e7bd6c2 Mon Sep 17 00:00:00 2001 From: Wesley Batista Date: Thu, 20 Aug 2015 01:41:29 -0300 Subject: [PATCH 02/11] Remove bootstrap css --- blogproject/web/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/blogproject/web/index.html b/blogproject/web/index.html index e0cdaf9..7dadc51 100644 --- a/blogproject/web/index.html +++ b/blogproject/web/index.html @@ -26,7 +26,6 @@ - From 230540f80e8e16fbabf6767f991434595c4a19a1 Mon Sep 17 00:00:00 2001 From: Wesley Batista Date: Thu, 20 Aug 2015 01:43:43 -0300 Subject: [PATCH 03/11] Change blog structure --- blogproject/web/home/home.css | 37 ++++++++++++++++++++++++++++---- blogproject/web/home/home.html | 17 +++++++++------ blogproject/web/login/login.css | 4 ++-- blogproject/web/login/login.html | 20 ++++++++++++----- blogproject/web/posts/posts.html | 17 ++++++++++----- blogproject/web/posts/posts.js | 20 ++++++----------- 6 files changed, 79 insertions(+), 36 deletions(-) diff --git a/blogproject/web/home/home.css b/blogproject/web/home/home.css index aaceaa9..80dc53d 100644 --- a/blogproject/web/home/home.css +++ b/blogproject/web/home/home.css @@ -1,7 +1,5 @@ body{ font-family: "proxima-nova",sans-serif; - text-align: center; - font-size: 300%; font-weight: 100; } @@ -39,7 +37,7 @@ input[type=checkbox]:focus + label:before { outline: 0; } -.btn{ +/*.btn{ font-size: 140%; text-transform: uppercase; letter-spacing: 1px; @@ -64,9 +62,40 @@ input[type=checkbox]:focus + label:before { color: #666; } } - +*/ h1,h2,h3{ font-weight: 100; + margin: 0; +} +.post-card > div{ + padding: 0 0 0 10px; +} + +.post-card.card-title{ + border-bottom: 1px dotted #ddd; + margin-bottom: 0.3em; +} +.post-card.card-title h2{ + font-size: 2em; + font-weight: normal; +} +.post-card.card-author h3{ + font-size: 0.8em; + font-weight: bold; + text-transform: uppercase; +} +.post-card.card-post{ + +} +.card-post.post-card p { + font-size: 1.7em; + font-weight: normal; +} +.sidebar{ + padding: 150px 0 0 0; +} +.cover { + margin: 60px; } #logo img{ diff --git a/blogproject/web/home/home.html b/blogproject/web/home/home.html index fd58fec..6bc83cf 100644 --- a/blogproject/web/home/home.html +++ b/blogproject/web/home/home.html @@ -1,7 +1,12 @@ -
-

-

Bem-Vindo {{auth.profile.nickname}}

-
- - +
+
+ +
+ + +
diff --git a/blogproject/web/login/login.css b/blogproject/web/login/login.css index a3dcd3a..aac5966 100644 --- a/blogproject/web/login/login.css +++ b/blogproject/web/login/login.css @@ -1,3 +1,3 @@ -.login-page .login-box { +/*.login-page .login-box { padding: 100px 0; -} +}*/ diff --git a/blogproject/web/login/login.html b/blogproject/web/login/login.html index 0213608..8bb449f 100644 --- a/blogproject/web/login/login.html +++ b/blogproject/web/login/login.html @@ -1,7 +1,17 @@ diff --git a/blogproject/web/posts/posts.html b/blogproject/web/posts/posts.html index c4e312d..5545852 100644 --- a/blogproject/web/posts/posts.html +++ b/blogproject/web/posts/posts.html @@ -1,7 +1,14 @@ -
-

Vendo posts como {{auth.profile.nickname}}

- - - +
+
+ +
+ +
diff --git a/blogproject/web/posts/posts.js b/blogproject/web/posts/posts.js index 73ff823..0f95415 100644 --- a/blogproject/web/posts/posts.js +++ b/blogproject/web/posts/posts.js @@ -1,17 +1,9 @@ -angular.module( 'polymerblog.posts', [ -'auth0' -]) -.controller( 'PostsCtrl', function PostsController( $scope, auth, $http, $location, store ) { +angular.module( 'polymerblog.posts', []) + .controller( 'PostsCtrl', function PostsController( $scope, AuthService ) { - $scope.auth = auth; + $scope.auth = AuthService.auth; - $scope.logout = function() { - auth.signout(); - store.remove('profile'); - store.remove('token'); - $location.path('/login'); - } + $scope.logout = AuthService.logout; - - -}); + }) +; From 59b18f22f51fb4acabc2157eb479a2a0d039d51c Mon Sep 17 00:00:00 2001 From: Wesley Batista Date: Thu, 20 Aug 2015 01:44:07 -0300 Subject: [PATCH 04/11] Add polymerblog.login module --- blogproject/web/login/login.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/blogproject/web/login/login.js b/blogproject/web/login/login.js index d6ad8c3..cf0ba91 100644 --- a/blogproject/web/login/login.js +++ b/blogproject/web/login/login.js @@ -1,16 +1,7 @@ -angular.module( 'polymerblog.login', [ - 'auth0' -]) -.controller( 'LoginCtrl', function HomeController( $scope, auth, $location, store ) { +angular.module( 'polymerblog.login', []) + .controller( 'LoginCtrl', function HomeController( $scope, AuthService ) { - $scope.login = function() { - auth.signin({}, function(profile, token) { - store.set('profile', profile); - store.set('token', token); - $location.path("/"); - }, function(error) { - console.log("Houve um erro ao logar, veja o console.", error); - }); - } + $scope.login = AuthService.login; -}); + }) +; From de3cba7bf618fb6dbf3f28add715889fe06e77b0 Mon Sep 17 00:00:00 2001 From: Wesley Batista Date: Thu, 20 Aug 2015 01:47:38 -0300 Subject: [PATCH 05/11] Try fix the dom-repeat and remove inline styles --- blogproject/web/elements/post-list.html | 29 +++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/blogproject/web/elements/post-list.html b/blogproject/web/elements/post-list.html index 2820fff..872f754 100644 --- a/blogproject/web/elements/post-list.html +++ b/blogproject/web/elements/post-list.html @@ -1,22 +1,23 @@ - -