Commit 3bf2db11617368bbfe8aa034ff1037071a30be57
Exists in
master
and in
6 other branches
Merge branch 'master' of gitlab.com:participa/proposal-app
Showing
12 changed files
with
205 additions
and
65 deletions
Show diff stats
.gitignore
images/icons/icon-facebook-contrast.png
images/icons/icon-gplus-contrast.png
images/icons/icon-twitter-contrast.png
images/icons/icon-whatsapp-contrast.png
index.html
... | ... | @@ -25,7 +25,10 @@ |
25 | 25 | if(base.match(/file:/) || filename.match(/http:/)){ |
26 | 26 | base = ''; |
27 | 27 | }else{ |
28 | - base = this.initBase() + '/'; | |
28 | + base = this.initBase(); | |
29 | + if(base.indexOf('/', base.length - 1) === -1) { | |
30 | + base = base + '/'; | |
31 | + } | |
29 | 32 | } |
30 | 33 | return base + filename; |
31 | 34 | } |
... | ... | @@ -169,13 +172,15 @@ |
169 | 172 | {{/each}} |
170 | 173 | </ul> |
171 | 174 | |
172 | - | |
175 | + | |
173 | 176 | <div class="proposal-header "> |
174 | 177 | <div class="abstract "> |
175 | 178 | <img src="{{../host}}{{image.url}}" alt="Imagem de apresentação do programa."/> |
176 | 179 | </div> |
177 | - <div class="title ">{{title}}</div> | |
178 | - <div class="abstract ">{{{abstract}}}</div> | |
180 | + <a href="#/programas/{{id}}/sobre-o-programa"> | |
181 | + <div class="title ">{{title}}</div> | |
182 | + <div class="abstract ">{{{abstract}}}</div> | |
183 | + </a> | |
179 | 184 | <div class="show_body row"> |
180 | 185 | <a class="col-sm-6 col-sm-offset-3" href="#/programas/{{id}}/sobre-o-programa"><span>Conheça o programa</span></a> |
181 | 186 | </div> |
... | ... | @@ -199,7 +204,7 @@ |
199 | 204 | <div class="col-sm-4 col-sm-offset-4"> |
200 | 205 | <div class="social right"> |
201 | 206 | <span>COMPARTILHE<br>ESTE PROGRAMA</span> |
202 | - {{#social_share title abstract '#'}}{{/social_share}} | |
207 | + {{{social_share title abstract (program_detail_url id)}}} | |
203 | 208 | </div> |
204 | 209 | </div> |
205 | 210 | </div> |
... | ... | @@ -303,7 +308,7 @@ |
303 | 308 | </div> |
304 | 309 | <div class="social"> |
305 | 310 | <span>Compartilhe esta proposta</span> |
306 | - {{#social_share parent.title abstract "#/programas/{{parent.id}}/propostas/{{id}}"}}{{/social_share}} | |
311 | + {{{social_share parent.title abstract (proposal_url parent.id id)}}} | |
307 | 312 | </div> |
308 | 313 | </script> |
309 | 314 | |
... | ... | @@ -344,6 +349,12 @@ |
344 | 349 | <div class="loading">Carregando...</div> |
345 | 350 | <form id="login-form" class="login"> |
346 | 351 | <div class="message hide"></div> |
352 | + <div class="row"> | |
353 | + <div class="col-sm-4"> | |
354 | + <a href="#" class="new-user button">Cadastre-se</a> | |
355 | + </div> | |
356 | + </div> | |
357 | + <p class="box-subtitle">Ou acesse:</p> | |
347 | 358 | <div class="username"> |
348 | 359 | <label for="user_name" class="label">Nome de Usuário / E-mail:</label> |
349 | 360 | <input id="user_name" name="login" type="text" placeholder="Nome do usuário / E-mail"> |
... | ... | @@ -352,18 +363,21 @@ |
352 | 363 | <label for="user_password" class="label">Senha:</label> |
353 | 364 | <input id="user_password" name="password" type="password" placeholder="Senha"> |
354 | 365 | </div> |
355 | - <div class="actions"> | |
356 | - <input type="submit" class="login-action" value="Acessar"/> | |
357 | - <a href="http://www.participa.br/account/forgot_password" target="_blank" class="forgot-password">Esqueci minha senha</a> | |
358 | - </div> | |
359 | - <div class="oauth"> | |
360 | - <div class="label">Acessar com:</div> | |
361 | - <a href="http://www.participa.br/plugin/oauth_client/facebook?oauth_client_popup=true&id=1" target="_blank" class="facebook oauth-login">Facebook</a> | |
362 | - <a href="http://www.participa.br/plugin/oauth_client/google_oauth2?oauth_client_popup=true&id=2" target="_blank" class="google oauth-login">Google +</a> | |
363 | - <a href="#" class="new-user">Cadastrar</a> | |
366 | + <div class="row"> | |
367 | + <div class="actions col-sm-4"> | |
368 | + <input type="submit" class="login-action button col-sm-12" value="Acessar"/> | |
369 | + <a href="http://www.participa.br/account/forgot_password" target="_blank" class="forgot-password">Esqueci minha senha</a> | |
370 | + </div> | |
371 | + <div class="oauth col-sm-8"> | |
372 | + <span class="label">Ou acesse usando <i>»</i></span> | |
373 | + <a href="http://www.participa.br/plugin/oauth_client/facebook?oauth_client_popup=true&id=1" target="_blank" class="facebook oauth-login icon icon-facebook">Facebook</a> | |
374 | + <a href="http://www.participa.br/plugin/oauth_client/google_oauth2?oauth_client_popup=true&id=2" target="_blank" class="google oauth-login icon icon-gplus">Google +</a> | |
375 | + </div> | |
364 | 376 | </div> |
365 | 377 | </form> |
366 | 378 | <form id="signup-form" class="signup hide" autocomplete="off"> |
379 | + <div class="message hide"></div> | |
380 | + <p class="box-subtitle">Cadastre-se</p> | |
367 | 381 | <div class="email"> |
368 | 382 | <label for="user_email" class="label">E-mail:</label> |
369 | 383 | <input id="user_email" name="email" type="text" placeholder="E-mail"> |
... | ... | @@ -372,28 +386,39 @@ |
372 | 386 | <label for="user_name" class="label">Nome de Usuário</label> |
373 | 387 | <input id="user_name" name="login" type="text" placeholder="Nome do usuário"> |
374 | 388 | </div> |
375 | - <div class="password"> | |
376 | - <label for="user_password" class="label">Senha:</label> | |
377 | - <input id="user_password" name="password" type="password" placeholder="Senha"> | |
378 | - </div> | |
379 | - <div class="password-confirmation"> | |
380 | - <label for="user_password_confirmation" class="label">Confirme a senha:</label> | |
381 | - <input id="user_password_confirmation" name="password_confirmation" type="password" placeholder="Confirme a senha"> | |
389 | + <div class="row"> | |
390 | + <div class="password col-sm-6"> | |
391 | + <label for="user_password" class="label">Senha:</label> | |
392 | + <input id="user_password" name="password" type="password" placeholder="Senha"> | |
393 | + </div> | |
394 | + <div class="password-confirmation col-sm-6"> | |
395 | + <label for="user_password_confirmation" class="label">Confirme a senha:</label> | |
396 | + <input id="user_password_confirmation" name="password_confirmation" type="password" placeholder="Confirme a senha"> | |
397 | + </div> | |
382 | 398 | </div> |
383 | 399 | <div class="actions"> |
384 | - <div class="message hide"></div> | |
385 | - <a href="#" class="confirm-signup">Confirmar</a> | |
386 | - <a href="#" class="cancel-signup">Cancelar</a> | |
400 | + <div class="row"> | |
401 | + <div class="col-sm-4"> | |
402 | + <a href="#" class="confirm-signup button">Confirmar</a> | |
403 | + </div> | |
404 | + <div class="col-sm-4"> | |
405 | + <a href="#" class="cancel-signup button button-cancela">Cancelar</a> | |
406 | + </div> | |
407 | + </div> | |
408 | + </div> | |
409 | + <div class="captcha"> | |
410 | + <div class="g-recaptcha" data-sitekey="6LcLPAcTAAAAAKsd0bxY_TArhD_A7OL19SRCW7_i"></div> | |
411 | + <script src='https://www.google.com/recaptcha/api.js?hl=pt-BR' async defer></script> | |
387 | 412 | </div> |
388 | 413 | </form> |
389 | 414 | </script> |
390 | 415 | |
391 | 416 | <script id="social-share" type="text/x-handlebars-template"> |
392 | 417 | <ul> |
393 | - <li><a href="#/programas/{{parent.id}}/propostas/{{id}}" class="fb-share icon icon-facebook" data-caption="{{parent.title}}" data-description="{{stripTags abstract}}">Compartilhar no Facebook</a></li> | |
394 | - <li><a href="https://twitter.com/intent/tweet?text={{stripTags abstract}}" class="tw-share icon icon-twitter popup">Compartilhar no Twitter</a></li> | |
395 | - <li><a href="https://plus.google.com/share?url=http://dialoga.gov.br" class="gp-share icon icon-gplus popup">Compartilhar no Google Plus</a></li> | |
396 | - <li><a class="ws-share disabled icon icon-whatsapp">Compartilhar no WhatsApp</a></li> | |
418 | + <li><a href="{{url}}" class="fb-share icon icon-facebook" data-caption="{{title}}" data-description="{{stripTags description}}">Compartilhar no Facebook</a></li> | |
419 | + <li><a href="https://twitter.com/intent/tweet?url={{encodeURI url}}&text={{stripTags description}}" class="tw-share icon icon-twitter popup">Compartilhar no Twitter</a></li> | |
420 | + <li><a href="https://plus.google.com/share?url={{encodeURI url}}" class="gp-share icon icon-gplus popup">Compartilhar no Google Plus</a></li> | |
421 | + <li><a href="whatsapp://send?text={{stripTags description}} {{encodeURI url}}" class="ws-share icon icon-whatsapp">Compartilhar no WhatsApp</a></li> | |
397 | 422 | </ul> |
398 | 423 | </script> |
399 | 424 | ... | ... |
js/handlebars-helpers.js
... | ... | @@ -96,7 +96,23 @@ define(['handlebars'], function(Handlebars){ |
96 | 96 | |
97 | 97 | Handlebars.registerHelper('social_share', function(title, description, url) { |
98 | 98 | var template = Handlebars.compile($('#social-share').html()); |
99 | - return template(); | |
99 | + if(url==='#') { | |
100 | + url = ''; | |
101 | + } | |
102 | + url = 'http:'+Url.addBaseUrl(url); | |
103 | + return template({title: title, description: description, url: url}); | |
104 | + }); | |
105 | + | |
106 | + Handlebars.registerHelper('proposal_url', function(parent_id, id) { | |
107 | + return "#/programas/"+parent_id+"/propostas/"+id; | |
108 | + }); | |
109 | + | |
110 | + Handlebars.registerHelper('program_detail_url', function(id) { | |
111 | + return "#/programas/"+id+"/sobre-o-programa"; | |
112 | + }); | |
113 | + | |
114 | + Handlebars.registerHelper('encodeURI', function(uri) { | |
115 | + return encodeURIComponent(uri); | |
100 | 116 | }); |
101 | 117 | |
102 | 118 | function proposal_has_category(proposal, category_slug) { | ... | ... |
js/main.js
... | ... | @@ -689,11 +689,6 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
689 | 689 | |
690 | 690 | $(document).on('click', '.social .fb-share', function(e) { |
691 | 691 | var link = $(this).attr('href'); |
692 | - if(link==='#' || link ==='') { | |
693 | - link = window.location.href; | |
694 | - } else { | |
695 | - link = 'http:'+Url.addBaseUrl(link); | |
696 | - } | |
697 | 692 | FB.ui({ |
698 | 693 | method: 'feed', |
699 | 694 | link: link, | ... | ... |
sass/_proposal_detail.scss
1 | +.login .row input, | |
2 | +.signup .row input { | |
3 | + margin-bottom: 0; | |
4 | +} | |
5 | + | |
6 | +@each $category, $color in $categories { | |
7 | + .#{$category} { | |
8 | + .button { | |
9 | + background-color: $color; | |
10 | + border-radius: 6px; | |
11 | + border-bottom: 3px solid darken($color, 15%); | |
12 | + color: #fff; | |
13 | + font-weight: 400; | |
14 | + font-size: 16px; | |
15 | + padding: 20px 0; | |
16 | + display: block; | |
17 | + margin: 0; | |
18 | + text-align: center; | |
19 | + transition: all 200ms; | |
20 | + &:hover { | |
21 | + background-color: darken($color, 15%); | |
22 | + text-decoration: none; | |
23 | + } | |
24 | + } | |
25 | + input.button { | |
26 | + @extend .button; | |
27 | + margin: 0 !important; | |
28 | + padding: 20px 0 !important; | |
29 | + width: 100% !important; | |
30 | + } | |
31 | + } | |
32 | +} | |
33 | +.box-subtitle { | |
34 | + color: #18376c; | |
35 | + font-size: 24px; | |
36 | + font-weight: bold; | |
37 | +} | |
38 | + | |
1 | 39 | .proposal-detail { |
2 | 40 | .login-container { |
41 | + margin: 0 20px; | |
42 | + text-align: left; | |
3 | 43 | .loading { |
4 | 44 | text-align: center; |
5 | 45 | } |
... | ... | @@ -299,8 +339,8 @@ |
299 | 339 | text-align: left; |
300 | 340 | } |
301 | 341 | .message { |
302 | - margin: 10px 35px; | |
303 | - padding: 10px 25px; | |
342 | + margin: 10px 0; | |
343 | + padding: 10px 20px; | |
304 | 344 | font-size: 12px; |
305 | 345 | background-color: #f2dede; |
306 | 346 | border-color: #ebccd1; |
... | ... | @@ -378,6 +418,7 @@ |
378 | 418 | border: 1px solid $color; |
379 | 419 | height: $container-height; |
380 | 420 | min-height: $container-height; |
421 | + overflow: auto; | |
381 | 422 | margin: 0 10px 20px 0; |
382 | 423 | } |
383 | 424 | .make-proposal-button{ |
... | ... | @@ -399,7 +440,7 @@ |
399 | 440 | height: 15%; |
400 | 441 | } |
401 | 442 | label { |
402 | - color: gray; | |
443 | + color: #333; | |
403 | 444 | } |
404 | 445 | } |
405 | 446 | .support-proposal-container{ |
... | ... | @@ -599,23 +640,24 @@ |
599 | 640 | } |
600 | 641 | /*------------------ formulario ---------------- */ |
601 | 642 | form .oauth { |
602 | - margin-top: 10px; | |
603 | - float: left; | |
604 | - width: 50%; | |
643 | + margin-top: 15px; | |
644 | + // float: left; | |
645 | + // width: 50%; | |
605 | 646 | } |
606 | 647 | |
607 | 648 | form .actions { |
608 | - float: right; | |
609 | - width: 50%; | |
649 | + // float: right; | |
650 | + // width: 50%; | |
610 | 651 | } |
611 | 652 | |
612 | 653 | form.signup { |
654 | + text-align: left; | |
613 | 655 | .password, .password-confirmation { |
614 | - width: 47%; | |
656 | + // width: 47%; | |
615 | 657 | display: inline-block; |
616 | 658 | } |
617 | 659 | .password { |
618 | - margin-left: 15px; | |
660 | + // margin-left: 15px; | |
619 | 661 | } |
620 | 662 | .actions { |
621 | 663 | margin: 20px 0 0 0; |
... | ... | @@ -626,7 +668,7 @@ |
626 | 668 | border-radius: 7px; |
627 | 669 | color: #fff; |
628 | 670 | padding: 10px 15px; |
629 | - margin: 0 0 0 8px; | |
671 | + // margin: 0 0 0 8px; | |
630 | 672 | } |
631 | 673 | .cancel-signup { |
632 | 674 | @extend .confirm-signup; |
... | ... | @@ -702,13 +744,13 @@ |
702 | 744 | |
703 | 745 | .support-proposal .abstract{ |
704 | 746 | overflow-y: auto; |
705 | - max-height: 190px; | |
747 | + // max-height: 190px; | |
706 | 748 | margin-bottom: 10px; |
707 | 749 | word-break: break-word; |
708 | 750 | word-wrap: break-word; |
709 | 751 | |
710 | 752 | @media only screen and (max-width: 1048px) { |
711 | - max-height: 140px; | |
753 | + // max-height: 140px; | |
712 | 754 | font-size: 20px; |
713 | 755 | } |
714 | 756 | } |
... | ... | @@ -735,7 +777,7 @@ |
735 | 777 | |
736 | 778 | .info { |
737 | 779 | margin: 0 20px !important; |
738 | - max-height: 40px !important; | |
780 | + // max-height: 40px !important; | |
739 | 781 | } |
740 | 782 | } |
741 | 783 | ... | ... |
sass/proposal_detail/_proposal-detail-base.scss
... | ... | @@ -18,22 +18,20 @@ |
18 | 18 | border-bottom: 1px solid #eeeff1; |
19 | 19 | color: $color; |
20 | 20 | font-size: 38px; |
21 | - font-weight: 300; | |
21 | + font-weight: 500; | |
22 | 22 | padding-bottom: .5em; |
23 | - text-transform: uppercase; | |
24 | 23 | small { |
25 | 24 | display: block; |
26 | 25 | font-size: 16px; |
27 | - font-weight: 300; | |
28 | - margin-top: -.1em; | |
26 | + font-weight: 400; | |
27 | + margin-top: 5px; | |
29 | 28 | text-transform: none; |
30 | 29 | } |
31 | 30 | } |
32 | 31 | h3 { |
33 | 32 | color: $color; |
34 | 33 | font-size: 28px; |
35 | - font-weight: 300; | |
36 | - text-transform: uppercase; | |
34 | + font-weight: 500; | |
37 | 35 | .border { |
38 | 36 | border-bottom: 1px solid #eeeff1; |
39 | 37 | padding-bottom: 20px; |
... | ... | @@ -41,12 +39,14 @@ |
41 | 39 | } |
42 | 40 | h4 { |
43 | 41 | font-size: 24px; |
42 | + font-weight: 500; | |
44 | 43 | color: $color; |
45 | 44 | text-transform: none; |
46 | 45 | } |
47 | 46 | h5 { |
48 | 47 | color: $color; |
49 | 48 | font-size: 22px; |
49 | + font-weight: 500; | |
50 | 50 | margin-top: 15px; |
51 | 51 | } |
52 | 52 | img { |
... | ... | @@ -112,7 +112,7 @@ |
112 | 112 | display: block; |
113 | 113 | padding: 1em; |
114 | 114 | text-align: center; |
115 | - font-weight: 500; | |
115 | + font-weight: 700; | |
116 | 116 | text-decoration: none; |
117 | 117 | // text-transform: uppercase; |
118 | 118 | .fa-reply { | ... | ... |
sass/style.scss
... | ... | @@ -56,7 +56,7 @@ h1 { |
56 | 56 | #content { |
57 | 57 | padding-bottom: 50px; |
58 | 58 | p { |
59 | - | |
59 | + | |
60 | 60 | text-align: justify; |
61 | 61 | margin: 20px; |
62 | 62 | line-height: 1.5em; |
... | ... | @@ -79,8 +79,8 @@ h1 { |
79 | 79 | } |
80 | 80 | |
81 | 81 | form { |
82 | - label, input, div.label, textarea { | |
83 | - width: 90%; | |
82 | + input, div.label, textarea { | |
83 | + // width: 90%; | |
84 | 84 | margin: 0 auto; |
85 | 85 | font-size: 14px; |
86 | 86 | display: block; |
... | ... | @@ -90,6 +90,8 @@ form { |
90 | 90 | input, textarea { |
91 | 91 | color: #000; |
92 | 92 | border: 1px solid #18376C; |
93 | + width: 100%; | |
94 | + margin-bottom: 20px; | |
93 | 95 | } |
94 | 96 | |
95 | 97 | textarea { |
... | ... | @@ -102,13 +104,13 @@ form { |
102 | 104 | color: #000; |
103 | 105 | font-weight: bold; |
104 | 106 | text-decoration: none; |
105 | - margin: 10px 20px; | |
107 | + // margin: 10px 20px; | |
106 | 108 | } |
107 | 109 | |
108 | 110 | .actions, .oauth { |
109 | - text-align: center; | |
110 | - font-size: 12px; | |
111 | - margin-top: 10px; | |
111 | + // text-align: center; | |
112 | + // font-size: 12px; | |
113 | + // margin-top: 10px; | |
112 | 114 | } |
113 | 115 | } |
114 | 116 | |
... | ... | @@ -152,3 +154,62 @@ form { |
152 | 154 | margin-bottom: 20px; |
153 | 155 | } |
154 | 156 | } |
157 | + | |
158 | +.captcha{ | |
159 | + // padding-left: 25px; | |
160 | + // padding-top: 20px; | |
161 | +} | |
162 | + | |
163 | +@media (max-width: 480px) { | |
164 | + header { | |
165 | + height: auto; | |
166 | + h1 { | |
167 | + border-bottom: 0; | |
168 | + padding-bottom: 15px; | |
169 | + padding-top: 50px; | |
170 | + position: relative; | |
171 | + margin-bottom: 0; | |
172 | + } | |
173 | + #display-contrast { | |
174 | + position: absolute; | |
175 | + top: 10px; | |
176 | + } | |
177 | + } | |
178 | + .social { | |
179 | + &.top { | |
180 | + float: none; | |
181 | + margin-top: 0; | |
182 | + margin-bottom: 20px; | |
183 | + } | |
184 | + } | |
185 | + .select { | |
186 | + .proposal-category { | |
187 | + &:after { | |
188 | + content: ""; | |
189 | + display: block; | |
190 | + clear: both; | |
191 | + } | |
192 | + } | |
193 | + .proposal-selection { | |
194 | + float: none; | |
195 | + margin: 4px 0 0 !important; | |
196 | + width: auto; | |
197 | + } | |
198 | + } | |
199 | + .proposal-header { | |
200 | + .show_body { | |
201 | + a { | |
202 | + display: block !important; | |
203 | + line-height: 1; | |
204 | + } | |
205 | + span { | |
206 | + display: inline !important; | |
207 | + } | |
208 | + } | |
209 | + .abstract { | |
210 | + p { | |
211 | + padding-bottom: 5px !important; | |
212 | + } | |
213 | + } | |
214 | + } | |
215 | +} | ... | ... |
sass/utilities/_variables.scss
1 | 1 | $categories: (saude: #00a9bd, seguranca-publica: #e34748, educacao: #ffb400, reducao-da-pobreza: #51d0b3); |
2 | 2 | $categories-descriptions: (saude: "Saúde é direito de todos e dever do Estado. O Sistema Único de Saúde (SUS) é universal, integral e de responsabilidade do Governo Federal, estados e municípios. Atende a todos os brasileiros.", seguranca-publica: "A Segurança Pública é um direito fundamental, dever do Estado e responsabilidade de todos. A proteção da vida, a disseminação da cultura de paz e a integração dos órgãos e instituições são os maiores compromissos desta política pública.", educacao: "Uma pátria educadora se faz com oportunidades para todos. Nos últimos anos, o Brasil criou esse caminho de oportunidades. Ampliamos o acesso à educação em todos os níveis de ensino – da creche à pós-graduação – e para todos os brasileiros, independentemente de sua classe social. E ainda há muito a fazer. O Plano Nacional de Educação (PNE) estabelece novas metas para que o governo federal trabalhe em parceria com a sociedade, com os estados e os municípios na construção de um futuro melhor. Queremos agora um salto na qualidade do ensino.", reducao-da-pobreza: "Com o esforço do Brasil para reduzir a pobreza e a desigualdade, 36 milhões de pessoas superaram a miséria na última década e o país saiu do Mapa da Fome das Nações Unidas."); |
3 | -$container-height: 500px; | |
3 | +$container-height: 570px; | ... | ... |