Commit 9248abed90a2bafea3940dc7ec19f59652db05f9
1 parent
5f74c1ad
Exists in
master
and in
8 other branches
Add sitemap. Refact routes. Started new pages.
Showing
13 changed files
with
247 additions
and
75 deletions
Show diff stats
src/app/components/article-box/article-box.directive.js
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | ArticleBoxController.prototype.showPreview = function () { | 59 | ArticleBoxController.prototype.showPreview = function () { |
60 | var vm = this; | 60 | var vm = this; |
61 | 61 | ||
62 | - vm.$state.go('programa', { | 62 | + vm.$state.go('programa-conteudo', { |
63 | slug: vm.article.slug | 63 | slug: vm.article.slug |
64 | }, { | 64 | }, { |
65 | location: true | 65 | location: true |
src/app/components/navbar/navbar.html
@@ -16,9 +16,10 @@ | @@ -16,9 +16,10 @@ | ||
16 | <div id="navbar-collapse" class="collapse navbar-collapse"> | 16 | <div id="navbar-collapse" class="collapse navbar-collapse"> |
17 | <ul class="nav navbar-nav"> | 17 | <ul class="nav navbar-nav"> |
18 | <li><a ui-sref="sobre">Sobre</a></li> | 18 | <li><a ui-sref="sobre">Sobre</a></li> |
19 | - <li><a ui-sref="inicio({'#':'lista-de-programas'})" ng-click="vm.scrollTo('lista-de-programas')">Programas</a></li> | 19 | + <li><a ui-sref="programas">Programas</a></li> |
20 | + <li><a ui-sref="propostas">Propostas</a></li> | ||
20 | <!-- <li><a ui-sref="ranking">Ranking</a></li> --> | 21 | <!-- <li><a ui-sref="ranking">Ranking</a></li> --> |
21 | - <!-- <li><a ui-sref="duvidas">Dúvidas</a></li> --> | 22 | + <li><a ui-sref="duvidas">Dúvidas</a></li> |
22 | <!-- <li><a ui-sref="respostas">Respostas</a></li> --> | 23 | <!-- <li><a ui-sref="respostas">Respostas</a></li> --> |
23 | </ul> | 24 | </ul> |
24 | </div> | 25 | </div> |
src/app/index.route.js
@@ -45,30 +45,55 @@ | @@ -45,30 +45,55 @@ | ||
45 | 'footer': { templateUrl: 'app/pages/footer/footer.html' } | 45 | 'footer': { templateUrl: 'app/pages/footer/footer.html' } |
46 | } | 46 | } |
47 | }) | 47 | }) |
48 | - .state('programa', { | ||
49 | - url: '/programa/:slug', | 48 | + .state('programas', { |
49 | + url: '/programas', | ||
50 | views: { | 50 | views: { |
51 | 'header': { templateUrl: 'app/pages/header/header.html' }, | 51 | 'header': { templateUrl: 'app/pages/header/header.html' }, |
52 | 'main': { | 52 | 'main': { |
53 | - templateUrl: 'app/pages/programas/programa.html', | ||
54 | - controller: 'ProgramaPageController', | 53 | + templateUrl: 'app/pages/programas/programas.html', |
54 | + controller: 'ProgramasPageController', | ||
55 | controllerAs: 'pagePrograma' | 55 | controllerAs: 'pagePrograma' |
56 | }, | 56 | }, |
57 | 'footer': { templateUrl: 'app/pages/footer/footer.html' } | 57 | 'footer': { templateUrl: 'app/pages/footer/footer.html' } |
58 | } | 58 | } |
59 | }) | 59 | }) |
60 | - .state('conheca-o-programa', { | ||
61 | - url: '/programa/:slug/conheca-o-programa', | 60 | + .state('programa-conteudo', { |
61 | + url: '/programa/:slug', | ||
62 | views: { | 62 | views: { |
63 | 'header': { templateUrl: 'app/pages/header/header.html' }, | 63 | 'header': { templateUrl: 'app/pages/header/header.html' }, |
64 | 'main': { | 64 | 'main': { |
65 | - templateUrl: 'app/pages/programas/conheca-o-programa.html', | 65 | + templateUrl: 'app/pages/programas/programa.html', |
66 | controller: 'ProgramaContentPageController', | 66 | controller: 'ProgramaContentPageController', |
67 | controllerAs: 'pageProgramaContent' | 67 | controllerAs: 'pageProgramaContent' |
68 | }, | 68 | }, |
69 | 'footer': { templateUrl: 'app/pages/footer/footer.html' } | 69 | 'footer': { templateUrl: 'app/pages/footer/footer.html' } |
70 | } | 70 | } |
71 | }) | 71 | }) |
72 | + .state('propostas', { | ||
73 | + url: '/propostas', | ||
74 | + views: { | ||
75 | + 'header': { templateUrl: 'app/pages/header/header.html' }, | ||
76 | + 'main': { | ||
77 | + templateUrl: 'app/pages/propostas/propostas.html', | ||
78 | + controller: 'PropostasPageController', | ||
79 | + controllerAs: 'pagePropostas' | ||
80 | + }, | ||
81 | + 'footer': { templateUrl: 'app/pages/footer/footer.html' } | ||
82 | + } | ||
83 | + }) | ||
84 | + .state('propostas-details', {}) | ||
85 | + .state('duvidas', { | ||
86 | + url: '/duvidas', | ||
87 | + views: { | ||
88 | + 'header': { templateUrl: 'app/pages/header/header.html' }, | ||
89 | + 'main': { | ||
90 | + templateUrl: 'app/pages/duvidas/duvidas.html', | ||
91 | + controller: 'DuvidasPageController', | ||
92 | + controllerAs: 'pageDuvidas' | ||
93 | + }, | ||
94 | + 'footer': { templateUrl: 'app/pages/footer/footer.html' } | ||
95 | + } | ||
96 | + }) | ||
72 | .state('sobre', { | 97 | .state('sobre', { |
73 | url: '/sobre', | 98 | url: '/sobre', |
74 | views: { | 99 | views: { |
@@ -94,6 +119,14 @@ | @@ -94,6 +119,14 @@ | ||
94 | 'footer': { templateUrl: 'app/pages/footer/footer.html' } | 119 | 'footer': { templateUrl: 'app/pages/footer/footer.html' } |
95 | } | 120 | } |
96 | }) | 121 | }) |
122 | + .state('mapa-do-site', { | ||
123 | + url: '/mapa-do-site', | ||
124 | + views: { | ||
125 | + 'header': { templateUrl: 'app/pages/header/header.html' }, | ||
126 | + 'main': { templateUrl: 'app/pages/sitemap/sitemap.html' }, | ||
127 | + 'footer': { templateUrl: 'app/pages/footer/footer.html' } | ||
128 | + } | ||
129 | + }) | ||
97 | ; | 130 | ; |
98 | 131 | ||
99 | $urlRouterProvider.otherwise('/'); | 132 | $urlRouterProvider.otherwise('/'); |
@@ -0,0 +1,51 @@ | @@ -0,0 +1,51 @@ | ||
1 | +(function() { | ||
2 | + 'use strict'; | ||
3 | + | ||
4 | + angular | ||
5 | + .module('dialoga') | ||
6 | + .controller('DuvidasPageController', DuvidasPageController); | ||
7 | + | ||
8 | + /** @ngInject */ | ||
9 | + function DuvidasPageController(ArticleService, $state, $location, $scope, $rootScope, $log) { | ||
10 | + $log.debug('DuvidasPageController'); | ||
11 | + | ||
12 | + var vm = this; | ||
13 | + | ||
14 | + vm.ArticleService = ArticleService; | ||
15 | + vm.$state = $state; | ||
16 | + vm.$location = $location; | ||
17 | + vm.$scope = $scope; | ||
18 | + vm.$rootScope = $rootScope; | ||
19 | + vm.$log = $log; | ||
20 | + | ||
21 | + vm.init(); | ||
22 | + } | ||
23 | + | ||
24 | + DuvidasPageController.prototype.init = function () { | ||
25 | + var vm = this; | ||
26 | + | ||
27 | + var params = vm.$state.params; | ||
28 | + var slug = params.slug; | ||
29 | + | ||
30 | + vm.article = null; | ||
31 | + vm.categories = null; | ||
32 | + vm.currentCategory = null; | ||
33 | + vm.loading = true; | ||
34 | + vm.error = false; | ||
35 | + | ||
36 | + vm.loadData(); | ||
37 | + }; | ||
38 | + | ||
39 | + | ||
40 | + DuvidasPageController.prototype.loadData = function () { | ||
41 | + var vm = this; | ||
42 | + | ||
43 | + vm.ArticleService.getCategories(function(categories){ | ||
44 | + vm.categories = categories; | ||
45 | + }, function (error) { | ||
46 | + vm.error = error; | ||
47 | + vm.$log.error(error); | ||
48 | + }); | ||
49 | + | ||
50 | + }; | ||
51 | +})(); |
src/app/pages/programas/conheca-o-programa.html
@@ -1,31 +0,0 @@ | @@ -1,31 +0,0 @@ | ||
1 | -<div class="container page--conheca-o-programa"> | ||
2 | - <div ng-if="pageProgramaContent.article && pageProgramaContent.categories"> | ||
3 | - <article-bar category="pageProgramaContent.article.categories[0]" categories="pageProgramaContent.categories"></article-bar> | ||
4 | - </div> | ||
5 | - | ||
6 | - <div ng-if="!pageProgramaContent.article.body"> | ||
7 | - <div ng-if="!pageProgramaContent.error" class="alert alert-info" role="alert">Carregando detalhes sobre o progama...</div> | ||
8 | - <div ng-if="pageProgramaContent.error" class="alert alert-warning" role="alert">{{pageProgramaContent}}</div> | ||
9 | - </div> | ||
10 | - | ||
11 | - <div ng-if="pageProgramaContent.article.body"> | ||
12 | - <article class="program-content"> | ||
13 | - <div> | ||
14 | - <section ng-bind-html="pageProgramaContent.article.body"></section> | ||
15 | - </div> | ||
16 | - </article> | ||
17 | - <aside class="program--aside"ng-class="pageProgramaContent.article.categories[0].slug"> | ||
18 | - <div class="col-sm-6" > | ||
19 | - <div class="button--themed"> | ||
20 | - <button class="btn btn-block" ng-click="pageProgramaContent.goToPreview()"> | ||
21 | - <span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> | ||
22 | - Participe | ||
23 | - </button> | ||
24 | - </div> | ||
25 | - </div> | ||
26 | - <div class="col-sm-6"> | ||
27 | - <social-share></social-share> | ||
28 | - </div> | ||
29 | - </aside> | ||
30 | - </div> | ||
31 | -</div> |
src/app/pages/programas/programa.controller.js
@@ -3,11 +3,11 @@ | @@ -3,11 +3,11 @@ | ||
3 | 3 | ||
4 | angular | 4 | angular |
5 | .module('dialoga') | 5 | .module('dialoga') |
6 | - .controller('ProgramaPageController', ProgramaPageController); | 6 | + .controller('ProgramasPageController', ProgramasPageController); |
7 | 7 | ||
8 | /** @ngInject */ | 8 | /** @ngInject */ |
9 | - function ProgramaPageController(ArticleService, $state, $location, $scope, $rootScope, $log) { | ||
10 | - $log.debug('ProgramaPageController'); | 9 | + function ProgramasPageController(ArticleService, $state, $location, $scope, $rootScope, $log) { |
10 | + $log.debug('ProgramasPageController'); | ||
11 | 11 | ||
12 | var vm = this; | 12 | var vm = this; |
13 | 13 | ||
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | vm.init(); | 21 | vm.init(); |
22 | } | 22 | } |
23 | 23 | ||
24 | - ProgramaPageController.prototype.init = function () { | 24 | + ProgramasPageController.prototype.init = function () { |
25 | var vm = this; | 25 | var vm = this; |
26 | 26 | ||
27 | var params = vm.$state.params; | 27 | var params = vm.$state.params; |
@@ -33,6 +33,13 @@ | @@ -33,6 +33,13 @@ | ||
33 | vm.loading = true; | 33 | vm.loading = true; |
34 | vm.error = false; | 34 | vm.error = false; |
35 | 35 | ||
36 | + vm.loadData(); | ||
37 | + }; | ||
38 | + | ||
39 | + | ||
40 | + ProgramasPageController.prototype.loadData = function () { | ||
41 | + var vm = this; | ||
42 | + | ||
36 | vm.ArticleService.getCategories(function(categories){ | 43 | vm.ArticleService.getCategories(function(categories){ |
37 | vm.categories = categories; | 44 | vm.categories = categories; |
38 | }, function (error) { | 45 | }, function (error) { |
@@ -40,29 +47,30 @@ | @@ -40,29 +47,30 @@ | ||
40 | vm.$log.error(error); | 47 | vm.$log.error(error); |
41 | }); | 48 | }); |
42 | 49 | ||
43 | - vm.ArticleService.getArticleBySlug(slug, function(article){ | ||
44 | - vm.article = article; | ||
45 | - vm.currentCategory = vm.article.categories[0]; | 50 | + // vm.ArticleService.getArticleBySlug(slug, function(article){ |
51 | + // vm.article = article; | ||
52 | + // vm.currentCategory = vm.article.categories[0]; | ||
46 | 53 | ||
47 | - // load proposals | ||
48 | - // vm.ArticleService.getRandomProposal(program.id, function(proposal){ | ||
49 | - // vm.article.proposal = proposal; | ||
50 | - // }, function (error){ | ||
51 | - // vm.$log.error(error); | ||
52 | - // }); | 54 | + // // load proposals |
55 | + // // vm.ArticleService.getRandomProposal(program.id, function(proposal){ | ||
56 | + // // vm.article.proposal = proposal; | ||
57 | + // // }, function (error){ | ||
58 | + // // vm.$log.error(error); | ||
59 | + // // }); | ||
53 | 60 | ||
54 | - // load events | ||
55 | - // vm.ArticleService.getEvents(program.id, function(proposal){ | ||
56 | - // vm.article.proposal = proposal; | ||
57 | - // }, function (error){ | ||
58 | - // vm.$log.error(error); | ||
59 | - // }); | 61 | + // // load events |
62 | + // // vm.ArticleService.getEvents(program.id, function(proposal){ | ||
63 | + // // vm.article.proposal = proposal; | ||
64 | + // // }, function (error){ | ||
65 | + // // vm.$log.error(error); | ||
66 | + // // }); | ||
67 | + | ||
68 | + // }, function (error) { | ||
69 | + // vm.error = error; | ||
70 | + // vm.$log.error(error); | ||
71 | + // vm.$log.info('Rollback to home page.'); | ||
72 | + // vm.$state.go('inicio', {}, {location: true}); | ||
73 | + // }); | ||
60 | 74 | ||
61 | - }, function (error) { | ||
62 | - vm.error = error; | ||
63 | - vm.$log.error(error); | ||
64 | - vm.$log.info('Rollback to home page.'); | ||
65 | - vm.$state.go('inicio', {}, {location: true}); | ||
66 | - }); | ||
67 | }; | 75 | }; |
68 | })(); | 76 | })(); |
src/app/pages/programas/programa.html
1 | -<div class="container"> | ||
2 | - | ||
3 | - <div ng-if="pagePrograma.article && pagePrograma.categories"> | ||
4 | - <article-bar category="pagePrograma.article.categories[0]" categories="pagePrograma.categories"></article-bar> | 1 | +<div class="container page--conheca-o-programa"> |
2 | + <div ng-if="pageProgramaContent.article && pageProgramaContent.categories"> | ||
3 | + <article-bar category="pageProgramaContent.article.categories[0]" categories="pageProgramaContent.categories"></article-bar> | ||
5 | </div> | 4 | </div> |
6 | 5 | ||
7 | - <div ng-if="!pagePrograma.article"> | ||
8 | - <div class="alert alert-info" role="alert">Carregando informações sobre o progama</div> | 6 | + <div ng-if="!pageProgramaContent.article.body"> |
7 | + <div ng-if="!pageProgramaContent.error" class="alert alert-info" role="alert">Carregando detalhes sobre o progama...</div> | ||
8 | + <div ng-if="pageProgramaContent.error" class="alert alert-warning" role="alert">{{pageProgramaContent}}</div> | ||
9 | </div> | 9 | </div> |
10 | 10 | ||
11 | - <div ng-if="pagePrograma.article && pagePrograma.categories"> | ||
12 | - <article-preview article="pagePrograma.article"></article-preview> | 11 | + <div ng-if="pageProgramaContent.article.body"> |
12 | + <article class="program-content"> | ||
13 | + <div> | ||
14 | + <section ng-bind-html="pageProgramaContent.article.body"></section> | ||
15 | + </div> | ||
16 | + </article> | ||
17 | + <aside class="program--aside"ng-class="pageProgramaContent.article.categories[0].slug"> | ||
18 | + <div class="col-sm-6" > | ||
19 | + <div class="button--themed"> | ||
20 | + <button class="btn btn-block" ng-click="pageProgramaContent.goToPreview()"> | ||
21 | + <span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> | ||
22 | + Participe | ||
23 | + </button> | ||
24 | + </div> | ||
25 | + </div> | ||
26 | + <div class="col-sm-6"> | ||
27 | + <social-share></social-share> | ||
28 | + </div> | ||
29 | + </aside> | ||
13 | </div> | 30 | </div> |
14 | </div> | 31 | </div> |
15 | - |
@@ -0,0 +1,51 @@ | @@ -0,0 +1,51 @@ | ||
1 | +(function() { | ||
2 | + 'use strict'; | ||
3 | + | ||
4 | + angular | ||
5 | + .module('dialoga') | ||
6 | + .controller('PropostasPageController', PropostasPageController); | ||
7 | + | ||
8 | + /** @ngInject */ | ||
9 | + function PropostasPageController(ArticleService, $state, $location, $scope, $rootScope, $log) { | ||
10 | + $log.debug('PropostasPageController'); | ||
11 | + | ||
12 | + var vm = this; | ||
13 | + | ||
14 | + vm.ArticleService = ArticleService; | ||
15 | + vm.$state = $state; | ||
16 | + vm.$location = $location; | ||
17 | + vm.$scope = $scope; | ||
18 | + vm.$rootScope = $rootScope; | ||
19 | + vm.$log = $log; | ||
20 | + | ||
21 | + vm.init(); | ||
22 | + } | ||
23 | + | ||
24 | + PropostasPageController.prototype.init = function () { | ||
25 | + var vm = this; | ||
26 | + | ||
27 | + var params = vm.$state.params; | ||
28 | + var slug = params.slug; | ||
29 | + | ||
30 | + vm.article = null; | ||
31 | + vm.categories = null; | ||
32 | + vm.currentCategory = null; | ||
33 | + vm.loading = true; | ||
34 | + vm.error = false; | ||
35 | + | ||
36 | + vm.loadData(); | ||
37 | + }; | ||
38 | + | ||
39 | + | ||
40 | + PropostasPageController.prototype.loadData = function () { | ||
41 | + var vm = this; | ||
42 | + | ||
43 | + vm.ArticleService.getCategories(function(categories){ | ||
44 | + vm.categories = categories; | ||
45 | + }, function (error) { | ||
46 | + vm.error = error; | ||
47 | + vm.$log.error(error); | ||
48 | + }); | ||
49 | + | ||
50 | + }; | ||
51 | +})(); |
@@ -0,0 +1,34 @@ | @@ -0,0 +1,34 @@ | ||
1 | +<div id="sitemap"> | ||
2 | + <div class="container"> | ||
3 | + <div class="row"> | ||
4 | + <div class="col-xs-12"> | ||
5 | + <article> | ||
6 | + <h1>Mapa do site</h1> | ||
7 | + <p> | ||
8 | + Uma visão geral do conteúdo disponível no site. Mantenha o ponteiro do mouse sobre o item por alguns segundos para visualizar sua descrição. | ||
9 | + </p> | ||
10 | + <ul class="list-sitemap"> | ||
11 | + <li class="list-sitemap--item level-1"> | ||
12 | + <a ui-sref="inicio" title="Página inicial do Dialoga Brasil">Início</a> | ||
13 | + </li> | ||
14 | + <li class="list-sitemap--item level-1"> | ||
15 | + <a ui-sref="sobre" title="Conheça mais sobre o Dialoga Brasil">Sobre</a> | ||
16 | + </li> | ||
17 | + <li class="list-sitemap--item level-1"> | ||
18 | + <a ui-sref="programas" title="Acesse a lista de programas">Programas</a> | ||
19 | + </li> | ||
20 | + <li class="list-sitemap--item level-1"> | ||
21 | + <a ui-sref="propostas" title="Acesse a lista de propostas">Propostas</a> | ||
22 | + </li> | ||
23 | + <li class="list-sitemap--item level-1"> | ||
24 | + <a ui-sref="duvidas" title="Acesse para ler as principais dúvidas ou enviar a sua.">Dúvidas</a> | ||
25 | + </li> | ||
26 | + <li class="list-sitemap--item level-1"> | ||
27 | + <a ui-sref="termos-de-uso" title="Acesse para ler os termos de uso do Dialoga Brasil">Termos de uso</a> | ||
28 | + </li> | ||
29 | + </ul> | ||
30 | + </article> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + </div> | ||
34 | +</div> |
src/assets/images/icons/sprite.png