From bfe0e42e903993d5ffc19248afd4f936ef91af26 Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Mon, 31 Aug 2015 15:39:56 -0300 Subject: [PATCH] Small improvements to sync with new design / layout --- src/app/components/a11y-bar/a11y-bar.html | 22 +++++++++++----------- src/app/components/a11y-bar/a11y-bar.scss | 9 +++++++-- src/app/components/auth-user/auth-user.html | 2 +- src/app/components/auth-user/auth-user.scss | 4 +++- src/app/components/proposal-ranking/proposal-ranking-carousel.scss | 23 ++++++++++++++++++----- src/app/components/proposal-ranking/proposal-ranking.directive.js | 20 ++++++++++++++++---- src/app/components/proposal-ranking/proposal-ranking.html | 53 +++++++++++++++++++++++++++++++---------------------- src/app/components/proposal-related/proposal-related.directive.js | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-related/proposal-related.html | 3 +++ 9 files changed, 190 insertions(+), 46 deletions(-) diff --git a/src/app/components/a11y-bar/a11y-bar.html b/src/app/components/a11y-bar/a11y-bar.html index 59acb13..19bb99a 100644 --- a/src/app/components/a11y-bar/a11y-bar.html +++ b/src/app/components/a11y-bar/a11y-bar.html @@ -4,27 +4,27 @@
@@ -33,13 +33,13 @@ diff --git a/src/app/components/a11y-bar/a11y-bar.scss b/src/app/components/a11y-bar/a11y-bar.scss index 37c3705..b596e5b 100644 --- a/src/app/components/a11y-bar/a11y-bar.scss +++ b/src/app/components/a11y-bar/a11y-bar.scss @@ -2,7 +2,12 @@ font-size: 12px; padding: 5px 0; span { - background-color: #eee; - padding: 0 3px; + color: #fff; + padding: 0 5px; + } + + .action-links { + text-transform: uppercase; + border-bottom: 1px dotted #262626; } } diff --git a/src/app/components/auth-user/auth-user.html b/src/app/components/auth-user/auth-user.html index ac64ca4..cc12d6a 100644 --- a/src/app/components/auth-user/auth-user.html +++ b/src/app/components/auth-user/auth-user.html @@ -8,7 +8,7 @@
diff --git a/src/app/components/auth-user/auth-user.scss b/src/app/components/auth-user/auth-user.scss index b6400c2..0f5a44f 100644 --- a/src/app/components/auth-user/auth-user.scss +++ b/src/app/components/auth-user/auth-user.scss @@ -1,3 +1,5 @@ .auth-user { - + button { + font-weight: bold; + } } diff --git a/src/app/components/proposal-ranking/proposal-ranking-carousel.scss b/src/app/components/proposal-ranking/proposal-ranking-carousel.scss index 5663233..fdee02b 100644 --- a/src/app/components/proposal-ranking/proposal-ranking-carousel.scss +++ b/src/app/components/proposal-ranking/proposal-ranking-carousel.scss @@ -4,26 +4,29 @@ .proposal-ranking--carousel { background-color: #f1f1f1; + border-radius: 5px; + overflow: hidden; &-top { position: relative; color: #fff; font-weight: bold; - font-size: 18px; - padding: 5px 10px; + font-size: 25px; + padding: 20px 15px; &-triggers { position: absolute; - right: 5px; - top: 5px; + right: 15px; + top: 20px; - li { + button { border: 1px solid #fff; border-radius: 100%; width: 15px; height: 15px; margin-right: 5px; + background-color: transparent; cursor: pointer; @@ -37,6 +40,12 @@ &-middle { position: relative; padding: 25px 30px; + cursor: pointer; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; .content { position: relative; @@ -65,6 +74,10 @@ z-index: 10; &-icon { + position: absolute; + top: 10px; + right: 15px; + .glyphicon { position: relative; top: -2px; diff --git a/src/app/components/proposal-ranking/proposal-ranking.directive.js b/src/app/components/proposal-ranking/proposal-ranking.directive.js index 0db6c99..8440b56 100644 --- a/src/app/components/proposal-ranking/proposal-ranking.directive.js +++ b/src/app/components/proposal-ranking/proposal-ranking.directive.js @@ -26,7 +26,7 @@ // initial values var vm = this; - vm.activeIndex = 1; + vm.activeIndex = 0; vm.loading = false; if(angular.isDefined(vm.limit) && angular.isString(vm.limit)){ @@ -59,14 +59,14 @@ votes_for: 1780 },{ id: 935, - abstract: 'Magni sunt ut molestiae. A porro et quod saepe placeat amet nihil. Aut ut id voluptatem doloribus quia.', + abstract: 'Aut fuga magni adipisci. Recusandae ipsum distinctio omnis ut illum. Magni sunt ut molestiae.', effective_support: 0.1572052401746725, hits: 8602, votes_against: 7005, votes_for: 8728 },{ id: 1008, - abstract: 'Cum quas assumenda nihil delectus eos. Minus fugit velit voluptatem nisi nam esse ut id.', + abstract: 'Recusandae ipsum distinctio omnis ut illum. Magni sunt ut molestiae. Aut fuga magni adipisci.', effective_support: 0.1572052401746725, hits: 9181, votes_against: 612, @@ -82,10 +82,22 @@ }, 2000); }; + ProposalRankingController.prototype.swipeLeft = function () { + var vm = this; + + vm.activeIndex = (vm.activeIndex < vm.limit - 1) ? ++vm.activeIndex : 0; + }; + + ProposalRankingController.prototype.swipeRight = function () { + var vm = this; + + vm.activeIndex = (vm.activeIndex > 0) ? --vm.activeIndex : vm.limit - 1; + }; + ProposalRankingController.prototype.switchProposal = function (index) { var vm = this; - if(index > 0 && index <= vm.limit) { + if(index >= 0 && index < vm.limit) { vm.activeIndex = index; }else{ vm.$log.warn('[switchProposal] "index" not handled:', index); diff --git a/src/app/components/proposal-ranking/proposal-ranking.html b/src/app/components/proposal-ranking/proposal-ranking.html index f0cb59f..31d7e41 100644 --- a/src/app/components/proposal-ranking/proposal-ranking.html +++ b/src/app/components/proposal-ranking/proposal-ranking.html @@ -1,28 +1,37 @@
-