From c07e7c4b42e81fc477a1ce00108867a1dd7e3723 Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Sun, 6 Sep 2015 00:13:17 -0300 Subject: [PATCH] Sync --- src/app/components/article-grid/article-grid.directive.js | 5 ----- src/app/components/article-service/article.service.js | 36 ++++++++++++++++++++++++++++++++++++ src/app/components/dialoga-service/dialoga.service.js | 25 ++++++++++++++----------- src/app/components/programas/programas.directive.js | 316 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/app/components/programas/programas.directive.spec.js | 32 -------------------------------- src/app/components/proposal-carousel/proposal-carousel.directive.js | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-carousel/proposal-carousel.html | 33 +++++++++++++++++++++++++++++++++ src/app/components/proposal-carousel/proposal-carousel.scss | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-list/proposal-list.directive.js | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-list/proposal-list.html | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-list/proposal-list.scss | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-ranking/proposal-ranking-carousel.scss | 90 ------------------------------------------------------------------------------------------ src/app/components/proposal-ranking/proposal-ranking-list.scss | 98 -------------------------------------------------------------------------------------------------- src/app/components/proposal-ranking/proposal-ranking.directive.js | 143 ----------------------------------------------------------------------------------------------------------------------------------------------- src/app/components/proposal-ranking/proposal-ranking.html | 84 ------------------------------------------------------------------------------------ src/app/components/topic-list/topic-list.directive.js | 316 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/topic-list/topic-list.directive.spec.js | 32 ++++++++++++++++++++++++++++++++ src/app/pages/programas/programa-content.controller.js | 59 +++++++++++++++++++++++++++-------------------------------- src/app/pages/programas/programa.html | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------- src/assets/images/icons/social-facebook.png | Bin 466 -> 0 bytes src/assets/images/icons/social-flickr.png | Bin 812 -> 0 bytes src/assets/images/icons/social-googleplus.png | Bin 1117 -> 0 bytes src/assets/images/icons/social-share.png | Bin 2475 -> 0 bytes src/assets/images/icons/social-twitter.png | Bin 974 -> 0 bytes src/assets/images/icons/social-whatsapp.png | Bin 1388 -> 0 bytes src/assets/images/icons/social-youtube.png | Bin 672 -> 0 bytes src/assets/images/icons/sprite.png | Bin 116489 -> 0 bytes 27 files changed, 893 insertions(+), 864 deletions(-) delete mode 100644 src/app/components/programas/programas.directive.js delete mode 100644 src/app/components/programas/programas.directive.spec.js create mode 100644 src/app/components/proposal-carousel/proposal-carousel.directive.js create mode 100644 src/app/components/proposal-carousel/proposal-carousel.html create mode 100644 src/app/components/proposal-carousel/proposal-carousel.scss create mode 100644 src/app/components/proposal-list/proposal-list.directive.js create mode 100644 src/app/components/proposal-list/proposal-list.html create mode 100644 src/app/components/proposal-list/proposal-list.scss delete mode 100644 src/app/components/proposal-ranking/proposal-ranking-carousel.scss delete mode 100644 src/app/components/proposal-ranking/proposal-ranking-list.scss delete mode 100644 src/app/components/proposal-ranking/proposal-ranking.directive.js delete mode 100644 src/app/components/proposal-ranking/proposal-ranking.html create mode 100644 src/app/components/topic-list/topic-list.directive.js create mode 100644 src/app/components/topic-list/topic-list.directive.spec.js diff --git a/src/app/components/article-grid/article-grid.directive.js b/src/app/components/article-grid/article-grid.directive.js index 5ae19e3..bd7f95e 100644 --- a/src/app/components/article-grid/article-grid.directive.js +++ b/src/app/components/article-grid/article-grid.directive.js @@ -26,7 +26,6 @@ // initialization vm.init(); - vm.loadData(); vm.attachListeners(); } @@ -35,10 +34,6 @@ // vm.programs = null; // scope var }; - ArticleGridController.prototype.loadData = function() { - // var vm = this; - }; - ArticleGridController.prototype.attachListeners = function() { // var vm = this; }; diff --git a/src/app/components/article-service/article.service.js b/src/app/components/article-service/article.service.js index 0f9b46c..c27ae10 100644 --- a/src/app/components/article-service/article.service.js +++ b/src/app/components/article-service/article.service.js @@ -17,6 +17,8 @@ getCategoryBySlug: getCategoryBySlug, getTopics: getTopics, getTopicById: getTopicById, + getProposals: getProposals, + getProposalsByTopicId: getProposalsByTopicId, searchTopics: searchTopics, searchProposals: searchProposals }; @@ -90,6 +92,40 @@ }); } + function getProposals (params, cbSuccess, cbError) { + // Ex.: /api/v1/articles/103358?fields= + + var url = service.apiArticles + API.articleId.home; + + var paramsExtended = angular.extend({ + 'fields[]': ['id', 'title', 'slug', 'abstract', 'categories', 'setting', 'children_count', 'hits'], + 'content_type':'ProposalsDiscussionPlugin::Proposals' + }, params); + + UtilService.get(url, {params: paramsExtended}).then(function(data){ + cbSuccess(data); + }).catch(function(error){ + cbError(error); + }); + } + + function getProposalsByTopicId (topicId, params, cbSuccess, cbError) { + var url = service.apiArticles + topicId; + + var paramsExtended = angular.extend({ + 'fields[]': ['id', 'title', 'abstract', 'children', 'children_count'], + 'content_type':'ProposalsDiscussionPlugin::Proposals' + }, params); + + UtilService.get(url, {params: paramsExtended}).then(function(data){ + cbSuccess(data); + }).catch(function(error){ + cbError(error); + }); + } + + function getRandomProposal (cbSuccess, cbError) {} + function searchTopics (params, cbSuccess, cbError) { // Ex.: /api/v1/search/article?type=ProposalsDiscussionPlugin::Topic&query=cisternas var url = '/api/v1/search/article'; diff --git a/src/app/components/dialoga-service/dialoga.service.js b/src/app/components/dialoga-service/dialoga.service.js index 8960d5b..c365391 100644 --- a/src/app/components/dialoga-service/dialoga.service.js +++ b/src/app/components/dialoga-service/dialoga.service.js @@ -17,6 +17,7 @@ getProgramBySlug: getProgramBySlug, getProgramsRandom: getProgramsRandom, getProposals: getProposals, + getProposalsByTopicId: getProposalsByTopicId, getEvents: getEvents, getQuestions: getQuestions, searchProgram: searchProgram, @@ -131,18 +132,20 @@ // } } - function getProposals (cbSuccess, cbError) { - if( !!CACHE.proposals ){ + function getProposals (param, cbSuccess, cbError) { + ArticleService.getProposals(param, function (data){ + CACHE.proposals = data; + cbSuccess(CACHE.proposals); - }else{ - // load main content - getHome(function(){ - if(!CACHE.hasOwnProperty('proposals')){ - throw { name: 'NotFound', message: '"proposals" is not defined. "article.categories" was loaded?'}; - } - cbSuccess(CACHE.proposals); - },cbError); - } + }, cbError); + } + + function getProposalsByTopicId (topicId, params, cbSuccess, cbError) { + ArticleService.getProposalsByTopicId(topicId, params, function (data){ + CACHE.proposals = data; + + cbSuccess(CACHE.proposals); + }, cbError); } function getEvents (cbSuccess, cbError) { diff --git a/src/app/components/programas/programas.directive.js b/src/app/components/programas/programas.directive.js deleted file mode 100644 index e21c3ad..0000000 --- a/src/app/components/programas/programas.directive.js +++ /dev/null @@ -1,316 +0,0 @@ -(function() { - 'use strict'; - - angular - .module('dialoga') - .directive('programaList', programaList); - - /** @ngInject */ - function programaList() { - - /** @ngInject */ - function ProgramaListController($scope, $element, $location, $filter, $log) { - $log.debug('ProgramaListController'); - - // alias - var vm = this; - - // dependencies - vm.$scope = $scope; - vm.$element = $element; - vm.$location = $location; - vm.$filter = $filter; - vm.$log = $log; - vm.defaultLimit = 6; - - // initialization - vm.init(); - } - - ProgramaListController.prototype.init = function() { - var vm = this; - - if (!vm.article) { - vm.$log.warn('no article to display. Tip: use a ng-if before use this directive'); - return; - } - - vm.categories = vm.article.categories; - vm.programs = vm.article.children; - vm.orderCriteries = [ - { label: 'Título', name: 'titulo' }, - { label: 'Tema', name: 'tema' }, - { label: 'Aleatório', name: 'aleatorio' } - ]; - - vm.filtredProgramList = vm.getFiltredPrograms(); - vm.search = vm.$location.search(); - - // Add initial values for the filter - vm.query = (vm.search && vm.search.filtro) ? vm.search.filtro : null; - vm.limitTo = (vm.search && vm.search.limite) ? parseInt(vm.search.limite, 10) : vm.defaultLimit; - vm.categoryFilter = (vm.search && vm.search.tema) ? vm.getCategoryBySlug(vm.search.tema) : null; - vm.orderCriteria = (vm.search && vm.search.ordem) ? { name: vm.search.ordem } : null; - vm.reverse = (vm.search && vm.search.reverso) ? true : false; - - if (!angular.equals({}, vm.search)) { - var $el = vm.$element; - angular.element('body').animate({scrollTop: $el.offset().top}, 'slow'); - } - - // update window location params - vm.$scope.$watch('vm.query', function(newValue/*, oldValue*/) { - vm.search.filtro = newValue ? newValue : null; - vm.$location.search('filtro', vm.search.filtro); - if(vm.search.filtro){ - vm.limitTo = vm.programs.length; - }else{ - vm.limitTo = vm.defaultLimit; - } - vm.filtredProgramList = vm.getFiltredPrograms(); - }); - - vm.$scope.$watch('vm.limitTo', function(newValue/*, oldValue*/) { - vm.search.limite = (newValue && newValue !== vm.defaultLimit) ? newValue : null; - vm.$location.search('limite', vm.search.limite); - vm.filtredProgramList = vm.getFiltredPrograms(); - }); - - vm.$scope.$watch('vm.categoryFilter', function(newValue/*, oldValue*/) { - vm.search.tema = newValue ? newValue.slug : null; - vm.$location.search('tema', vm.search.tema); - if(vm.search.tema){ - vm.limitTo = vm.programs.length; - } - vm.filtredProgramList = vm.getFiltredPrograms(); - }); - - vm.$scope.$watch('vm.orderCriteria', function(newValue/*, oldValue*/) { - vm.search.ordem = (newValue && newValue.name) ? newValue.name : null; - vm.$location.search('ordem', vm.search.ordem); - vm.filtredProgramList = vm.getFiltredPrograms(); - }); - - vm.$scope.$watch('vm.reverse', function(newValue/*, oldValue*/) { - vm.search.reverso = newValue ? newValue : null; - vm.$location.search('reverso', vm.search.reverso); - vm.filtredProgramList = vm.getFiltredPrograms(); - }); - - }; - - ProgramaListController.prototype.resetFilterValues = function() { - var vm = this; - - vm.query = null; - vm.limitTo = vm.defaultLimit; - vm.categoryFilter = null; - vm.orderCriteria = null; - }; - - ProgramaListController.prototype.getIconClasses = function(category) { - var vm = this; - - vm.$log.debug('[TODO] getIconClasses of category:', category); - return 'glyphicon glyphicon-exclamation-sign'; - }; - - ProgramaListController.prototype.getCategoryBySlug = function(categorySlug) { - var vm = this; - var result = null; - - angular.forEach(vm.categories, function(value/*, key*/) { - if (value.slug === categorySlug) { - result = value; - } - }); - - return result; - }; - - ProgramaListController.prototype.filterByCategory = function(category, $event) { - var vm = this; - - $event.stopPropagation(); - - if (category !== vm.categoryFilter) { - - // selected new filter - vm.categoryFilter = category; - } else { - vm.categoryFilter = null; - } - }; - - ProgramaListController.prototype.showAll = function($event) { - var vm = this; - - $event.stopPropagation(); - - vm.resetFilterValues(); - vm.limitTo = vm.programs.length; - }; - - ProgramaListController.prototype.getFiltredPrograms = function() { - var vm = this; - - var input = vm.programs; - var output = input; - var query = vm.query; - var categoryFilter = vm.categoryFilter; - var orderCriteria = vm.orderCriteria ? vm.orderCriteria : { name : 'aleatorio'}; - var filter = vm.$filter('filter'); - var orderBy = vm.$filter('orderBy'); - var limitTo = vm.$filter('limitTo'); - var limit = vm.limitTo ? vm.limitTo : 4; - - if (categoryFilter) { - output = _filterByCategory(output, categoryFilter); - } - - if (query) { - output = filter(output, query, false); - } - - switch (orderCriteria.name) { - case 'titulo': - output = orderBy(output, 'title', vm.reverse); - break; - case 'tema': - output = orderBy(output, 'categories[0].name', vm.reverse); - break; - case 'more_participants': - vm.$log.info('Criteria not handled yet: ', orderCriteria); - break; - case 'aleatorio': - // shuffling - // if (!vm._isShuffled){ - output = vm.filterShuffle(output); - // vm._isShuffled = true; - // } - - if (vm.reverse) { - output = output.slice().reverse(); - } - - break; - default: - vm.$log.warn('Criteria not matched: ', orderCriteria); - break; - } - - output = limitTo(output, limit); - - return output; - }; - - ProgramaListController.prototype.filterShuffle = function(input) { - var result = []; - var resultByCategory = {}; - - // divide by categories - for (var i = 0; i < input.length; i++) { - var program = input[i]; - var categorySlug = program.categories[0].slug; - - if (!resultByCategory[categorySlug]) { - resultByCategory[categorySlug] = []; - } - - resultByCategory[categorySlug].push(program); - } - - // shuffle each array - var prop = null; - var categoryWithPrograms = null; - for (prop in resultByCategory) { - if (resultByCategory.hasOwnProperty(prop)) { - categoryWithPrograms = resultByCategory[prop]; - resultByCategory[prop] = shuffle(categoryWithPrograms); - } - } - - // Concat all into result array - // > while has program at Lists on resultByCategory - var hasProgram = true; - while (hasProgram) { - - var foundProgram = false; - // each categoryList with array of program - prop = null; - categoryWithPrograms = null; - for (prop in resultByCategory) { - - if (resultByCategory.hasOwnProperty(prop)) { - categoryWithPrograms = resultByCategory[prop]; - - if (categoryWithPrograms.length > 0) { - var pivotProgram = categoryWithPrograms.pop(); - result.push(pivotProgram); - foundProgram = true; - } - } - } - - if (!foundProgram) { - hasProgram = false; - } - } - - return result; - }; - - var directive = { - restrict: 'E', - templateUrl: 'app/components/programas/programas.html', - scope: { - article: '=' - }, - controller: ProgramaListController, - controllerAs: 'vm', - bindToController: true - }; - - return directive; - } - - function _filterByCategory (input, category) { - input = input || []; - - if (!category) { - // no filter - return input; - } - - var out = []; - for (var i = 0; i < input.length; i++) { - var program = input[i]; - if (program.categories[0].slug === category.slug) { - out.push(program); - } - } - - return out; - } - - // -> Fisher–Yates shuffle algorithm - function shuffle (array) { - var currentIndex = array.length, temporaryValue, randomIndex ; - - // While there remain elements to shuffle... - while (0 !== currentIndex) { - - // Pick a remaining element... - randomIndex = Math.floor(Math.random() * currentIndex); - currentIndex -= 1; - - // And swap it with the current element. - temporaryValue = array[currentIndex]; - array[currentIndex] = array[randomIndex]; - array[randomIndex] = temporaryValue; - } - - return array; - } - -})(); diff --git a/src/app/components/programas/programas.directive.spec.js b/src/app/components/programas/programas.directive.spec.js deleted file mode 100644 index 0e47055..0000000 --- a/src/app/components/programas/programas.directive.spec.js +++ /dev/null @@ -1,32 +0,0 @@ -(function() { - 'use strict'; - - describe('program directive', function() { - var compile, scope, directiveElem; - - beforeEach(function(){ - module('dialoga'); - - inject(function($compile, $rootScope){ - compile = $compile; - scope = $rootScope.$new(); - // mock article - scope.article = {}; - }); - - directiveElem = getCompiledElement(); - }); - - function getCompiledElement(){ - var element = compile(angular.element(''))(scope); - var compiledElement = compile(element)(scope); - scope.$digest(); - return compiledElement; - } - - it('ensure exist only one id "lista-de-programas"', function() {}); - - it('should show default programs, one each category', function() {}); - - }); -})(); diff --git a/src/app/components/proposal-carousel/proposal-carousel.directive.js b/src/app/components/proposal-carousel/proposal-carousel.directive.js new file mode 100644 index 0000000..39c8ce9 --- /dev/null +++ b/src/app/components/proposal-carousel/proposal-carousel.directive.js @@ -0,0 +1,71 @@ +(function() { + 'use strict'; + + angular + .module('dialoga') + .directive('proposalCarousel', proposalCarousel); + + /** @ngInject */ + function proposalCarousel() { + + /** @ngInject */ + function ProposalCarouselController($scope, $element, $timeout, $log) { + $log.debug('ProposalCarouselController'); + + var vm = this; + vm.$scope = $scope; + vm.$element = $element; + vm.$timeout = $timeout; + vm.$log = $log; + + vm.init(); + } + + ProposalCarouselController.prototype.init = function () { + // initial values + var vm = this; + + if(!vm.proposals){ + throw { name: 'NotDefined', message: 'The attribute "proposals" is undefined.'}; + } + + vm.activeIndex = 0; + vm.loading = false; + vm.proposalsLength = vm.proposals.length; + }; + + ProposalCarouselController.prototype.swipeLeft = function () { + var vm = this; + + vm.activeIndex = (vm.activeIndex < vm.proposalsLength - 1) ? ++vm.activeIndex : 0; + }; + + ProposalCarouselController.prototype.swipeRight = function () { + var vm = this; + + vm.activeIndex = (vm.activeIndex > 0) ? --vm.activeIndex : vm.proposalsLength - 1; + }; + + ProposalCarouselController.prototype.showProposals = function () { + var vm = this; + + // notify parents - handled by parents + vm.$scope.$emit('proposal-carousel:toProposals'); + }; + + var directive = { + restrict: 'E', + templateUrl: 'app/components/proposal-carousel/proposal-carousel.html', + scope: { + proposals: '=' + }, + controller: ProposalCarouselController, + controllerAs: 'vm', + bindToController: true + }; + + + return directive; + } + +})(); diff --git a/src/app/components/proposal-carousel/proposal-carousel.html b/src/app/components/proposal-carousel/proposal-carousel.html new file mode 100644 index 0000000..80bd5bc --- /dev/null +++ b/src/app/components/proposal-carousel/proposal-carousel.html @@ -0,0 +1,33 @@ + diff --git a/src/app/components/proposal-carousel/proposal-carousel.scss b/src/app/components/proposal-carousel/proposal-carousel.scss new file mode 100644 index 0000000..6c9f0a1 --- /dev/null +++ b/src/app/components/proposal-carousel/proposal-carousel.scss @@ -0,0 +1,86 @@ +.proposal-carousel { + background-color: #f1f1f1; + border-radius: 5px; + overflow: hidden; + + &-top { + position: relative; + color: #fff; + font-weight: bold; + font-size: 25px; + padding: 20px 15px; + + &-triggers { + position: absolute; + right: 15px; + top: 20px; + + button { + border: 1px solid #fff; + border-radius: 100%; + width: 15px; + height: 15px; + margin-right: 5px; + background-color: transparent; + + cursor: pointer; + + &.active { + background-color: #fff; + } + } + } + } + + &-middle { + position: relative; + padding: 25px 30px; + min-height: 200px; + // cursor: pointer; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + .content { + position: relative; + z-index: 2; + } + + &-watermark { + position: absolute; + bottom: 1px; + left: -5px; + color: #ddd; + font-size: 150px; + font-weight: bold; + line-height: 116px; + z-index: 1; + + } + } + + &-bottom { + position: relative; + color: #fff; + padding: 10px; + font-weight: bold; + cursor: pointer; + z-index: 10; + + &-icon { + position: absolute; + top: 10px; + right: 15px; + + .glyphicon { + position: relative; + top: -2px; + background-color: #fff; + padding: 6px 5px 5px 6px; + border-radius: 100%; + } + } + } +} diff --git a/src/app/components/proposal-list/proposal-list.directive.js b/src/app/components/proposal-list/proposal-list.directive.js new file mode 100644 index 0000000..4b1eeaf --- /dev/null +++ b/src/app/components/proposal-list/proposal-list.directive.js @@ -0,0 +1,81 @@ +(function() { + 'use strict'; + + angular + .module('dialoga') + .directive('proposalList', proposalList); + + /** @ngInject */ + function proposalList() { + + /** @ngInject */ + function ProposalListController(ArticleService, $scope, $element, $timeout, $log) { + $log.debug('ProposalListController'); + + var vm = this; + vm.ArticleService = ArticleService; + vm.$scope = $scope; + vm.$element = $element; + vm.$timeout = $timeout; + vm.$log = $log; + + vm.init(); + + vm.loadData(); + } + + ProposalListController.prototype.init = function () { + // initial values + var vm = this; + + if(!vm.proposals){ + throw { name: 'NotDefined', message: 'The attribute "proposals" is undefined.'}; + } + + if(!vm.per_page){ + vm.per_page = 5; + } + + vm.proposalsLength = vm.proposals.length; + }; + + ProposalListController.prototype.loadData = function () { + // async values + var vm = this; + + // requeue to wait until DOM be created + vm.$timeout(function(){ + attachPopover.call(vm); + }, 100); + }; + + function attachPopover(){ + var vm = this; + + vm.popover = angular.element(vm.$element.find('.btn-question')); + vm.popover.popover({ + html: true, + placement: 'bottom', + animation: true, + title: 'Regra de posição das propostas', + content: '

É calculada pelo saldo de interações das propostas (curtidas - não curtidas) dividido pela diferença de exibições entre elas.

O objetivo dessa correção é compensar o saldo de interações e a diferença de exibições das propostas que não tiveram muitas oportunidades de visualização ou das propostas que tiveram mais oportunidades de visualização que a média.

Com essa correção, é possível comparar propostas que entraram em diferentes momentos, durante todo o período da consulta.

' + }); + } + + var directive = { + restrict: 'E', + templateUrl: 'app/components/proposal-list/proposal-list.html', + scope: { + proposals: '=', + per_page: '=' + }, + controller: ProposalListController, + controllerAs: 'vm', + bindToController: true + }; + + + return directive; + } + +})(); diff --git a/src/app/components/proposal-list/proposal-list.html b/src/app/components/proposal-list/proposal-list.html new file mode 100644 index 0000000..c0ea74f --- /dev/null +++ b/src/app/components/proposal-list/proposal-list.html @@ -0,0 +1,45 @@ +
+ +
+
Carregando...
+
+
+ + + + + + + + + + + + + + +
+ Colocação + + 123 PROPOSTAS
+ {{::($index+1)}}º + +
+
+ {{proposal.abstract}} +
+
+
+
+ +
+
+ +
+
+
+
+
diff --git a/src/app/components/proposal-list/proposal-list.scss b/src/app/components/proposal-list/proposal-list.scss new file mode 100644 index 0000000..aad999c --- /dev/null +++ b/src/app/components/proposal-list/proposal-list.scss @@ -0,0 +1,94 @@ +.proposal-list { + table { + border-radius: 4px; + overflow: hidden; + } + + thead { + th{ + color: #fff; + background-color: #606060; + &:first-child { + background-color: #484848; + text-align: right; + width: 160px; + padding-right: 20px; + } + } + + .btn-question { + color: #484848; + background-color: #fff; + display: inline-block; + text-align: center; + width: 22px; + height: 22px; + margin-left: 10px; + padding: 0; + border-radius: 100%; + } + + .popover { + color: #484848; + } + } + + tbody { + tr { + background-color: #fff; + } + + td { + &:first-child { + font-size: 22px; + font-weight: bold; + padding: 0; + text-align: right; + } + } + + .position { + display: block; + width: 100%; + margin: 20px 0; + padding: 5px 20px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } + } + + .abstract { + color: #393939; + font-size: 18px; + } + + .row-actions { + padding-top: 20px; + } + + .btn-rate { + padding: 0; + font-size: 20px; + font-weight: bold; + text-decoration: blink; + } + + // override bootstrap + .table-striped > tbody > tr:nth-of-type(odd) { + // impar + background-color: #eaeaea; + + .position { + background-color: #fff; + } + } + + .table-striped > tbody > tr:nth-of-type(even) { + // par + background-color: #fff; + + .position { + background-color: #eaeaea; + } + } +} diff --git a/src/app/components/proposal-ranking/proposal-ranking-carousel.scss b/src/app/components/proposal-ranking/proposal-ranking-carousel.scss deleted file mode 100644 index fdee02b..0000000 --- a/src/app/components/proposal-ranking/proposal-ranking-carousel.scss +++ /dev/null @@ -1,90 +0,0 @@ -.proposal-ranking { - // both: carousel and list -} - -.proposal-ranking--carousel { - background-color: #f1f1f1; - border-radius: 5px; - overflow: hidden; - - &-top { - position: relative; - color: #fff; - font-weight: bold; - font-size: 25px; - padding: 20px 15px; - - - &-triggers { - position: absolute; - right: 15px; - top: 20px; - - button { - border: 1px solid #fff; - border-radius: 100%; - width: 15px; - height: 15px; - margin-right: 5px; - background-color: transparent; - - cursor: pointer; - - &.active { - background-color: #fff; - } - } - } - } - - &-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; - z-index: 2; - } - - &-watermark { - position: absolute; - bottom: 1px; - left: -5px; - color: #ddd; - font-size: 150px; - font-weight: bold; - line-height: 116px; - z-index: 1; - - } - } - - &-bottom { - position: relative; - color: #fff; - padding: 10px; - font-weight: bold; - cursor: pointer; - z-index: 10; - - &-icon { - position: absolute; - top: 10px; - right: 15px; - - .glyphicon { - position: relative; - top: -2px; - background-color: #fff; - padding: 6px 5px 5px 6px; - border-radius: 100%; - } - } - } -} diff --git a/src/app/components/proposal-ranking/proposal-ranking-list.scss b/src/app/components/proposal-ranking/proposal-ranking-list.scss deleted file mode 100644 index 3864d1c..0000000 --- a/src/app/components/proposal-ranking/proposal-ranking-list.scss +++ /dev/null @@ -1,98 +0,0 @@ -.proposal-ranking { - // both: carousel and list -} - -.proposal-ranking--list { - table { - border-radius: 4px; - overflow: hidden; - } - - thead { - th{ - color: #fff; - background-color: #606060; - &:first-child { - background-color: #484848; - text-align: right; - width: 160px; - padding-right: 20px; - } - } - - .btn-question { - color: #484848; - background-color: #fff; - display: inline-block; - text-align: center; - width: 22px; - height: 22px; - margin-left: 10px; - padding: 0; - border-radius: 100%; - } - - .popover { - color: #484848; - } - } - - tbody { - tr { - background-color: #fff; - } - - td { - &:first-child { - font-size: 22px; - font-weight: bold; - padding: 0; - text-align: right; - } - } - - .position { - display: block; - width: 100%; - margin: 20px 0; - padding: 5px 20px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - } - } - - .abstract { - color: #393939; - font-size: 18px; - } - - .row-actions { - padding-top: 20px; - } - - .btn-rate { - padding: 0; - font-size: 20px; - font-weight: bold; - text-decoration: blink; - } - - // override bootstrap - .table-striped > tbody > tr:nth-of-type(odd) { - // impar - background-color: #eaeaea; - - .position { - background-color: #fff; - } - } - - .table-striped > tbody > tr:nth-of-type(even) { - // par - background-color: #fff; - - .position { - background-color: #eaeaea; - } - } -} diff --git a/src/app/components/proposal-ranking/proposal-ranking.directive.js b/src/app/components/proposal-ranking/proposal-ranking.directive.js deleted file mode 100644 index 8440b56..0000000 --- a/src/app/components/proposal-ranking/proposal-ranking.directive.js +++ /dev/null @@ -1,143 +0,0 @@ -(function() { - 'use strict'; - - angular - .module('dialoga') - .directive('proposalRanking', proposalRanking); - - /** @ngInject */ - function proposalRanking() { - - /** @ngInject */ - function ProposalRankingController(ArticleService, $scope, $element, $timeout, $log) { - $log.debug('ProposalRankingController'); - - var vm = this; - vm.ArticleService = ArticleService; - vm.$scope = $scope; - vm.$element = $element; - vm.$timeout = $timeout; - vm.$log = $log; - - vm.init(); - } - - ProposalRankingController.prototype.init = function () { - // initial values - var vm = this; - - vm.activeIndex = 0; - vm.loading = false; - - if(angular.isDefined(vm.limit) && angular.isString(vm.limit)){ - vm.limit = parseInt(vm.limit); - }else{ - vm.limit = 3; - } - - vm.loadData(); - }; - - ProposalRankingController.prototype.loadData = function () { - // async values - var vm = this; - - vm.loading = true; - - // simulate delay - vm.$timeout(function(){ - vm.loading = false; - - // Fake Data - // vm.proposals = vm.ArticleService.getProposals(); - vm.proposals = [{ - id: 4159, - abstract: 'Ut odio unde porro in. Aut fuga magni adipisci. Recusandae ipsum distinctio omnis ut illum.', - effective_support: 0.1572052401746725, - hits: 4159, - votes_against: 3779, - votes_for: 1780 - },{ - id: 935, - 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: 'Recusandae ipsum distinctio omnis ut illum. Magni sunt ut molestiae. Aut fuga magni adipisci.', - effective_support: 0.1572052401746725, - hits: 9181, - votes_against: 612, - votes_for: 1786 - }]; - - if(vm.display === 'list'){ - // wait until DOM be created - vm.$timeout(function(){ - attachPopover.call(vm); - }, 20); - } - }, 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) { - vm.activeIndex = index; - }else{ - vm.$log.warn('[switchProposal] "index" not handled:', index); - } - }; - - ProposalRankingController.prototype.showProposals = function () { - var vm = this; - - // notify parents - handled by parents - vm.$scope.$emit('see-proposals'); - }; - - function attachPopover(){ - var vm = this; - - vm.popover = angular.element(vm.$element.find('.btn-question')); - vm.popover.popover({ - html: true, - placement: 'top', - animation: true, - title: 'Regra de posição das propostas', - content: '

É calculada pelo saldo de interações das propostas (curtidas - não curtidas) dividido pela diferença de exibições entre elas.

O objetivo dessa correção é compensar o saldo de interações e a diferença de exibições das propostas que não tiveram muitas oportunidades de visualização ou das propostas que tiveram mais oportunidades de visualização que a média.

Com essa correção, é possível comparar propostas que entraram em diferentes momentos, durante todo o período da consulta.

' - }); - } - - var directive = { - restrict: 'E', - templateUrl: 'app/components/proposal-ranking/proposal-ranking.html', - scope: { - limit: '&', - display: '=' - }, - controller: ProposalRankingController, - controllerAs: 'vm', - bindToController: true - }; - - - return directive; - } - -})(); diff --git a/src/app/components/proposal-ranking/proposal-ranking.html b/src/app/components/proposal-ranking/proposal-ranking.html deleted file mode 100644 index 31d7e41..0000000 --- a/src/app/components/proposal-ranking/proposal-ranking.html +++ /dev/null @@ -1,84 +0,0 @@ -
- - -
- -
-
Carregando...
-
-
- - - - - - - - - - - - - - -
- Colocação - - 123 PROPOSTAS
- {{::($index+1)}}º - -
-
- {{proposal.abstract}} -
-
-
-
- -
-
- -
-
-
-
-
-
diff --git a/src/app/components/topic-list/topic-list.directive.js b/src/app/components/topic-list/topic-list.directive.js new file mode 100644 index 0000000..d60eb1c --- /dev/null +++ b/src/app/components/topic-list/topic-list.directive.js @@ -0,0 +1,316 @@ +(function() { + 'use strict'; + + angular + .module('dialoga') + .directive('topicList', topicList); + + /** @ngInject */ + function topicList() { + + /** @ngInject */ + function TopicListController($scope, $element, $location, $filter, $log) { + $log.debug('TopicListController'); + + // alias + var vm = this; + + // dependencies + vm.$scope = $scope; + vm.$element = $element; + vm.$location = $location; + vm.$filter = $filter; + vm.$log = $log; + vm.defaultLimit = 6; + + // initialization + vm.init(); + } + + TopicListController.prototype.init = function() { + var vm = this; + + if (!vm.article) { + vm.$log.warn('no article to display. Tip: use a ng-if before use this directive'); + return; + } + + vm.categories = vm.article.categories; + vm.programs = vm.article.children; + vm.orderCriteries = [ + { label: 'Título', name: 'titulo' }, + { label: 'Tema', name: 'tema' }, + { label: 'Aleatório', name: 'aleatorio' } + ]; + + vm.filtredProgramList = vm.getFiltredPrograms(); + vm.search = vm.$location.search(); + + // Add initial values for the filter + vm.query = (vm.search && vm.search.filtro) ? vm.search.filtro : null; + vm.limitTo = (vm.search && vm.search.limite) ? parseInt(vm.search.limite, 10) : vm.defaultLimit; + vm.categoryFilter = (vm.search && vm.search.tema) ? vm.getCategoryBySlug(vm.search.tema) : null; + vm.orderCriteria = (vm.search && vm.search.ordem) ? { name: vm.search.ordem } : null; + vm.reverse = (vm.search && vm.search.reverso) ? true : false; + + if (!angular.equals({}, vm.search)) { + var $el = vm.$element; + angular.element('body').animate({scrollTop: $el.offset().top}, 'slow'); + } + + // update window location params + vm.$scope.$watch('vm.query', function(newValue/*, oldValue*/) { + vm.search.filtro = newValue ? newValue : null; + vm.$location.search('filtro', vm.search.filtro); + if(vm.search.filtro){ + vm.limitTo = vm.programs.length; + }else{ + vm.limitTo = vm.defaultLimit; + } + vm.filtredProgramList = vm.getFiltredPrograms(); + }); + + vm.$scope.$watch('vm.limitTo', function(newValue/*, oldValue*/) { + vm.search.limite = (newValue && newValue !== vm.defaultLimit) ? newValue : null; + vm.$location.search('limite', vm.search.limite); + vm.filtredProgramList = vm.getFiltredPrograms(); + }); + + vm.$scope.$watch('vm.categoryFilter', function(newValue/*, oldValue*/) { + vm.search.tema = newValue ? newValue.slug : null; + vm.$location.search('tema', vm.search.tema); + if(vm.search.tema){ + vm.limitTo = vm.programs.length; + } + vm.filtredProgramList = vm.getFiltredPrograms(); + }); + + vm.$scope.$watch('vm.orderCriteria', function(newValue/*, oldValue*/) { + vm.search.ordem = (newValue && newValue.name) ? newValue.name : null; + vm.$location.search('ordem', vm.search.ordem); + vm.filtredProgramList = vm.getFiltredPrograms(); + }); + + vm.$scope.$watch('vm.reverse', function(newValue/*, oldValue*/) { + vm.search.reverso = newValue ? newValue : null; + vm.$location.search('reverso', vm.search.reverso); + vm.filtredProgramList = vm.getFiltredPrograms(); + }); + + }; + + TopicListController.prototype.resetFilterValues = function() { + var vm = this; + + vm.query = null; + vm.limitTo = vm.defaultLimit; + vm.categoryFilter = null; + vm.orderCriteria = null; + }; + + TopicListController.prototype.getIconClasses = function(category) { + var vm = this; + + vm.$log.debug('[TODO] getIconClasses of category:', category); + return 'glyphicon glyphicon-exclamation-sign'; + }; + + TopicListController.prototype.getCategoryBySlug = function(categorySlug) { + var vm = this; + var result = null; + + angular.forEach(vm.categories, function(value/*, key*/) { + if (value.slug === categorySlug) { + result = value; + } + }); + + return result; + }; + + TopicListController.prototype.filterByCategory = function(category, $event) { + var vm = this; + + $event.stopPropagation(); + + if (category !== vm.categoryFilter) { + + // selected new filter + vm.categoryFilter = category; + } else { + vm.categoryFilter = null; + } + }; + + TopicListController.prototype.showAll = function($event) { + var vm = this; + + $event.stopPropagation(); + + vm.resetFilterValues(); + vm.limitTo = vm.programs.length; + }; + + TopicListController.prototype.getFiltredPrograms = function() { + var vm = this; + + var input = vm.programs; + var output = input; + var query = vm.query; + var categoryFilter = vm.categoryFilter; + var orderCriteria = vm.orderCriteria ? vm.orderCriteria : { name : 'aleatorio'}; + var filter = vm.$filter('filter'); + var orderBy = vm.$filter('orderBy'); + var limitTo = vm.$filter('limitTo'); + var limit = vm.limitTo ? vm.limitTo : 4; + + if (categoryFilter) { + output = _filterByCategory(output, categoryFilter); + } + + if (query) { + output = filter(output, query, false); + } + + switch (orderCriteria.name) { + case 'titulo': + output = orderBy(output, 'title', vm.reverse); + break; + case 'tema': + output = orderBy(output, 'categories[0].name', vm.reverse); + break; + case 'more_participants': + vm.$log.info('Criteria not handled yet: ', orderCriteria); + break; + case 'aleatorio': + // shuffling + // if (!vm._isShuffled){ + output = vm.filterShuffle(output); + // vm._isShuffled = true; + // } + + if (vm.reverse) { + output = output.slice().reverse(); + } + + break; + default: + vm.$log.warn('Criteria not matched: ', orderCriteria); + break; + } + + output = limitTo(output, limit); + + return output; + }; + + TopicListController.prototype.filterShuffle = function(input) { + var result = []; + var resultByCategory = {}; + + // divide by categories + for (var i = 0; i < input.length; i++) { + var program = input[i]; + var categorySlug = program.categories[0].slug; + + if (!resultByCategory[categorySlug]) { + resultByCategory[categorySlug] = []; + } + + resultByCategory[categorySlug].push(program); + } + + // shuffle each array + var prop = null; + var categoryWithPrograms = null; + for (prop in resultByCategory) { + if (resultByCategory.hasOwnProperty(prop)) { + categoryWithPrograms = resultByCategory[prop]; + resultByCategory[prop] = shuffle(categoryWithPrograms); + } + } + + // Concat all into result array + // > while has program at Lists on resultByCategory + var hasProgram = true; + while (hasProgram) { + + var foundProgram = false; + // each categoryList with array of program + prop = null; + categoryWithPrograms = null; + for (prop in resultByCategory) { + + if (resultByCategory.hasOwnProperty(prop)) { + categoryWithPrograms = resultByCategory[prop]; + + if (categoryWithPrograms.length > 0) { + var pivotProgram = categoryWithPrograms.pop(); + result.push(pivotProgram); + foundProgram = true; + } + } + } + + if (!foundProgram) { + hasProgram = false; + } + } + + return result; + }; + + var directive = { + restrict: 'E', + templateUrl: 'app/components/programas/programas.html', + scope: { + article: '=' + }, + controller: TopicListController, + controllerAs: 'vm', + bindToController: true + }; + + return directive; + } + + function _filterByCategory (input, category) { + input = input || []; + + if (!category) { + // no filter + return input; + } + + var out = []; + for (var i = 0; i < input.length; i++) { + var program = input[i]; + if (program.categories[0].slug === category.slug) { + out.push(program); + } + } + + return out; + } + + // -> Fisher–Yates shuffle algorithm + function shuffle (array) { + var currentIndex = array.length, temporaryValue, randomIndex ; + + // While there remain elements to shuffle... + while (0 !== currentIndex) { + + // Pick a remaining element... + randomIndex = Math.floor(Math.random() * currentIndex); + currentIndex -= 1; + + // And swap it with the current element. + temporaryValue = array[currentIndex]; + array[currentIndex] = array[randomIndex]; + array[randomIndex] = temporaryValue; + } + + return array; + } + +})(); diff --git a/src/app/components/topic-list/topic-list.directive.spec.js b/src/app/components/topic-list/topic-list.directive.spec.js new file mode 100644 index 0000000..c51f5dc --- /dev/null +++ b/src/app/components/topic-list/topic-list.directive.spec.js @@ -0,0 +1,32 @@ +(function() { + 'use strict'; + + describe('topic directive', function() { + var compile, scope, directiveElem; + + beforeEach(function(){ + module('dialoga'); + + inject(function($compile, $rootScope){ + compile = $compile; + scope = $rootScope.$new(); + // mock topics + scope.topics = []; + }); + + directiveElem = getCompiledElement(); + }); + + function getCompiledElement(){ + var element = compile(angular.element(''))(scope); + var compiledElement = compile(element)(scope); + scope.$digest(); + return compiledElement; + } + + // it('ensure exist only one id "topic-list"', function() {}); + + // it('should show default topics, one each category', function() {}); + + }); +})(); diff --git a/src/app/pages/programas/programa-content.controller.js b/src/app/pages/programas/programa-content.controller.js index 0af3c11..1230962 100644 --- a/src/app/pages/programas/programa-content.controller.js +++ b/src/app/pages/programas/programa-content.controller.js @@ -18,28 +18,27 @@ vm.$log = $log; vm.init(); + vm.loadData(); + vm.attachListeners(); } ProgramaContentPageController.prototype.init = function() { var vm = this; - var params = vm.$state.params; - vm.article = null; vm.category = null; - vm.loading = true; - vm.error = false; - vm.slug = params.slug; - vm.loadData(); - vm.attachListeners(); + vm.error = false; }; ProgramaContentPageController.prototype.loadData = function() { var vm = this; - // Get initial data of Program - vm.DialogaService.getProgramBySlug(vm.slug, function(article) { + vm.loading = true; + + // Get program by slug + var slug = vm.$state.params.slug; + vm.DialogaService.getProgramBySlug(slug, function(article) { vm.article = article; vm.category = vm.article.categories[0]; @@ -54,41 +53,37 @@ }; } - // Get full data content of Program - vm.loadContent(); - + vm.DialogaService.getProposalsByTopicId(vm.article.id, {}, function(data){ + vm.proposals = data.children; + vm.proposalsTopRated = [ + {abstract: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tristique consectetur neque, at tincidunt enim volutpat sit amet. Integer sed cursus metus, non luctus risus. Mauris elementum est quis vehicula ullamcorper.'}, + {abstract: 'Mauris elementum est quis vehicula ullamcorper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tristique consectetur neque, at tincidunt enim volutpat sit amet. Integer sed cursus metus, non luctus risus.'}, + {abstract: 'Integer sed cursus metus, non luctus risus. Mauris elementum est quis vehicula ullamcorper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tristique consectetur neque, at tincidunt enim volutpat sit amet.'}, + ]; + }, function (error) { + vm.$log.error(error); + }); + + vm.loading = false; }, function(error) { vm.$log.error(error); - vm.$log.info('Rollback to home page.'); - vm.$state.go('inicio', {}, {location: true}); + vm.error = error; + vm.loading = false; + + // vm.$log.info('Rollback to home page.'); + // vm.$state.go('inicio', {}, {location: true}); }); + }; ProgramaContentPageController.prototype.attachListeners = function() { var vm = this; - vm.$scope.$on('see-proposals', function() { + vm.$scope.$on('proposal-carousel:toProposals', function() { vm.$log.warn('TODO: handle see proposals / ranking'); }); }; - // Get full data content of Program - ProgramaContentPageController.prototype.loadContent = function() { - var vm = this; - - vm.loading = true; - if (!vm.article.body) { - vm.DialogaService.getContentById(vm.article.id, function(data) { - vm.article.body = data.article.body; - vm.loading = false; - }, function(error) { - vm.loading = false; - vm.error = error; - }); - } - vm.loading = false; - }; - ProgramaContentPageController.prototype.makeProposal = function() { var vm = this; diff --git a/src/app/pages/programas/programa.html b/src/app/pages/programas/programa.html index 7e8d8bc..233fa06 100644 --- a/src/app/pages/programas/programa.html +++ b/src/app/pages/programas/programa.html @@ -9,9 +9,11 @@
-
- - +
+
+ + +
@@ -19,56 +21,59 @@
-
-
-
-

{{::pageProgramaContent.article.title}}

-
-
-
-
-
-
- -
-
-

{{::stripHtml(pageProgramaContent.article.abstract)}}

-
-
-

Lorem ipsum dolor sit amet, ea veniam mucius ocurreret vix, ius ex nisl vidisse partiendo. Blandit nominavi cum ei, paulo quaestio his ei, eum minim salutandi in. Civibus albucius in quo, et eam posse facilisis. Debet suavitate sea ut, his ei feugiat fastidii eleifend. Quo ex quando maiestatis voluptatum, mel te perpetua maiestatis, sit ceteros legendos deserunt ea. Enim dolores moderatius eu pro, ad quo ignota aliquid meliore.

-
- -
-
-
-
- +
+
+ +
+

{{::pageProgramaContent.article.title}}

+
+
+
+
+
+
+ +
+
+

{{::stripHtml(pageProgramaContent.article.abstract)}}

+
+
+

Lorem ipsum dolor sit amet, ea veniam mucius ocurreret vix, ius ex nisl vidisse partiendo. Blandit nominavi cum ei, paulo quaestio his ei, eum minim salutandi in. Civibus albucius in quo, et eam posse facilisis. Debet suavitate sea ut, his ei feugiat fastidii eleifend. Quo ex quando maiestatis voluptatum, mel te perpetua maiestatis, sit ceteros legendos deserunt ea. Enim dolores moderatius eu pro, ad quo ignota aliquid meliore.

+
+ +
+
+
+
+ +
-
-
-
-
-

Propostas mais votadas

- -
-
-

Propostas nesse programa

- +
+
+
+

Propostas mais votadas

+
+ +
+
+
+

Propostas nesse programa

+ +
-
-
-
+ +
@@ -77,16 +82,16 @@

Resultados de propostas mais votadas

-
- +
+
- -
-
-
-
-
+ +
+
+
+
+
diff --git a/src/assets/images/icons/social-facebook.png b/src/assets/images/icons/social-facebook.png index de8e341..23a0696 100644 Binary files a/src/assets/images/icons/social-facebook.png and b/src/assets/images/icons/social-facebook.png differ diff --git a/src/assets/images/icons/social-flickr.png b/src/assets/images/icons/social-flickr.png index f7e0a08..823790e 100644 Binary files a/src/assets/images/icons/social-flickr.png and b/src/assets/images/icons/social-flickr.png differ diff --git a/src/assets/images/icons/social-googleplus.png b/src/assets/images/icons/social-googleplus.png index 9f335e2..793b91f 100644 Binary files a/src/assets/images/icons/social-googleplus.png and b/src/assets/images/icons/social-googleplus.png differ diff --git a/src/assets/images/icons/social-share.png b/src/assets/images/icons/social-share.png index 8d59ec6..4d63f00 100644 Binary files a/src/assets/images/icons/social-share.png and b/src/assets/images/icons/social-share.png differ diff --git a/src/assets/images/icons/social-twitter.png b/src/assets/images/icons/social-twitter.png index f2d1f02..8334768 100644 Binary files a/src/assets/images/icons/social-twitter.png and b/src/assets/images/icons/social-twitter.png differ diff --git a/src/assets/images/icons/social-whatsapp.png b/src/assets/images/icons/social-whatsapp.png index bc284ff..a96f4fa 100644 Binary files a/src/assets/images/icons/social-whatsapp.png and b/src/assets/images/icons/social-whatsapp.png differ diff --git a/src/assets/images/icons/social-youtube.png b/src/assets/images/icons/social-youtube.png index 9b4a8e7..7c4f031 100644 Binary files a/src/assets/images/icons/social-youtube.png and b/src/assets/images/icons/social-youtube.png differ diff --git a/src/assets/images/icons/sprite.png b/src/assets/images/icons/sprite.png index 8dcb9ed..99f2296 100644 Binary files a/src/assets/images/icons/sprite.png and b/src/assets/images/icons/sprite.png differ -- libgit2 0.21.2