Commit c4e9487ee7aabb7a694f4ba6e6800a70f0af6754
1 parent
60384580
Exists in
master
and in
11 other branches
refactoring proposal detail
Showing
8 changed files
with
132 additions
and
123 deletions
Show diff stats
index.html
| ... | ... | @@ -90,8 +90,12 @@ |
| 90 | 90 | <div class='show_body'><a href='#'><span>Conheça o Programa</span></a></div> |
| 91 | 91 | </div> |
| 92 | 92 | |
| 93 | - <div class='body hide'> | |
| 93 | + <div class='body proposal-detail-base hide'> | |
| 94 | 94 | {{{body}}} |
| 95 | + <div class='go-to-proposal-button'><a href='#proposal-item-{{id}}'> | |
| 96 | + <div class='fa fa-reply'> </div>Agora contribua para a melhoria desse programa</a> | |
| 97 | + </div> | |
| 98 | + | |
| 95 | 99 | </div> |
| 96 | 100 | <div class='make-proposal-container'> |
| 97 | 101 | <div class='make-proposal'> | ... | ... |
js/main.js
| ... | ... | @@ -96,6 +96,9 @@ $.getJSON(noosferoAPI) |
| 96 | 96 | $( '.show_body a' ).click(function(event){ |
| 97 | 97 | display_proposal_detail(); |
| 98 | 98 | }); |
| 99 | + $( '.go-to-proposal-button a' ).click(function(event){ | |
| 100 | + display_proposal(this.href.split('#').pop()); | |
| 101 | + }); | |
| 99 | 102 | $( '.proposal-selection' ).change(function(event){ |
| 100 | 103 | display_proposal('proposal-item-' + this.value); |
| 101 | 104 | }); |
| ... | ... | @@ -254,7 +257,14 @@ function display_proposal(proposal_id){ |
| 254 | 257 | $('.login-container').hide(); |
| 255 | 258 | $('.proposal-detail').hide(); |
| 256 | 259 | |
| 260 | + $('.proposal-detail-base').hide(); | |
| 257 | 261 | $('#' + proposal_id).show(); |
| 262 | + $('.proposal-header').show(); | |
| 263 | + $('.make-proposal-container').show(); | |
| 264 | + $('.support-proposal-container').show(); | |
| 265 | + $('.results-container').show(); | |
| 266 | + $('.experience-proposal-container').show(); | |
| 267 | + $('.talk-proposal-container').show(); | |
| 258 | 268 | |
| 259 | 269 | var topic_id = proposal_id.split('-').pop(); |
| 260 | 270 | loadRandomProposal(topic_id, private_token); | ... | ... |
sass/programas/mais-medicos.scss
sass/programas/saude-rue.scss
| ... | ... | @@ -1,112 +0,0 @@ |
| 1 | -// @import "../utilities/variables"; | |
| 2 | - | |
| 3 | -@each $category, $color in $categories { | |
| 4 | - .#{$category}{ | |
| 5 | - font-family: 'Open Sans', sans-serif; | |
| 6 | - font-size: 16px; | |
| 7 | - font-weight: 300; | |
| 8 | - h2 { | |
| 9 | - border-bottom: 1px solid #eeeff1; | |
| 10 | - color: $color; | |
| 11 | - font-size: 38px; | |
| 12 | - font-weight: 300; | |
| 13 | - padding-bottom: .5em; | |
| 14 | - text-transform: uppercase; | |
| 15 | - small { | |
| 16 | - display: block; | |
| 17 | - font-size: 16px; | |
| 18 | - font-weight: 300; | |
| 19 | - margin-top: -.5em; | |
| 20 | - text-transform: none; | |
| 21 | - } | |
| 22 | - } | |
| 23 | - h3 { | |
| 24 | - color: $color; | |
| 25 | - font-size: 28px; | |
| 26 | - font-weight: 300; | |
| 27 | - text-transform: uppercase; | |
| 28 | - } | |
| 29 | - img { | |
| 30 | - &.pull-left { | |
| 31 | - margin-right: 20px; | |
| 32 | - } | |
| 33 | - &.pull-right { | |
| 34 | - margin-left: 20px; | |
| 35 | - } | |
| 36 | - } | |
| 37 | - blockquote { | |
| 38 | - border-bottom: 5px solid $color; | |
| 39 | - border-top: 5px solid $color; | |
| 40 | - margin-left: 0; | |
| 41 | - margin-right: 0; | |
| 42 | - p { | |
| 43 | - font-size: 30px; | |
| 44 | - } | |
| 45 | - } | |
| 46 | - ul { | |
| 47 | - li { | |
| 48 | - border-bottom: 1px solid #e0e0e0; | |
| 49 | - color: $color; | |
| 50 | - font-size: 18px; | |
| 51 | - font-weight: 700; | |
| 52 | - padding-bottom: 1em; | |
| 53 | - padding-top: 1em; | |
| 54 | - &:last-child { | |
| 55 | - border-bottom: none; | |
| 56 | - } | |
| 57 | - } | |
| 58 | - &.list-unstyled { | |
| 59 | - list-style: none; | |
| 60 | - } | |
| 61 | - } | |
| 62 | - .row { | |
| 63 | - font-size: 0; | |
| 64 | - &:after { | |
| 65 | - display: block; | |
| 66 | - height: 0px; | |
| 67 | - content: ""; | |
| 68 | - clear: both; | |
| 69 | - visibility: hidden; | |
| 70 | - } | |
| 71 | - .column { | |
| 72 | - display: inline-block; | |
| 73 | - font-size: 1rem; | |
| 74 | - vertical-align: top; | |
| 75 | - width: 6.25%; | |
| 76 | - } | |
| 77 | - &[class*="two column"] { | |
| 78 | - .column { | |
| 79 | - width: 50%; | |
| 80 | - } | |
| 81 | - } | |
| 82 | - } | |
| 83 | - .slide-01 { | |
| 84 | - img { | |
| 85 | - display: block; | |
| 86 | - margin: auto; | |
| 87 | - } | |
| 88 | - } | |
| 89 | - .grafico { | |
| 90 | - img { | |
| 91 | - display: block; | |
| 92 | - margin: auto; | |
| 93 | - } | |
| 94 | - } | |
| 95 | - .slide-02 { | |
| 96 | - | |
| 97 | - } | |
| 98 | - .btn-envie-proposta a { | |
| 99 | - background: $color; | |
| 100 | - border-radius: 3px; | |
| 101 | - color: #fff; | |
| 102 | - display: block; | |
| 103 | - padding: 1em; | |
| 104 | - text-align: center; | |
| 105 | - text-decoration: none; | |
| 106 | - text-transform: uppercase; | |
| 107 | - .fa-reply { | |
| 108 | - margin-right: .7em; | |
| 109 | - } | |
| 110 | - } | |
| 111 | - } | |
| 112 | -} | |
| 113 | 0 | \ No newline at end of file |
sass/programas/sinesp.scss
| ... | ... | @@ -0,0 +1,112 @@ |
| 1 | +// @import "../utilities/variables"; | |
| 2 | + | |
| 3 | +@each $category, $color in $categories { | |
| 4 | + .#{$category} .proposal-detail-base{ | |
| 5 | + font-family: 'Open Sans', sans-serif; | |
| 6 | + font-size: 16px; | |
| 7 | + font-weight: 300; | |
| 8 | + h2 { | |
| 9 | + border-bottom: 1px solid #eeeff1; | |
| 10 | + color: $color; | |
| 11 | + font-size: 38px; | |
| 12 | + font-weight: 300; | |
| 13 | + padding-bottom: .5em; | |
| 14 | + text-transform: uppercase; | |
| 15 | + small { | |
| 16 | + display: block; | |
| 17 | + font-size: 16px; | |
| 18 | + font-weight: 300; | |
| 19 | + margin-top: -.5em; | |
| 20 | + text-transform: none; | |
| 21 | + } | |
| 22 | + } | |
| 23 | + h3 { | |
| 24 | + color: $color; | |
| 25 | + font-size: 28px; | |
| 26 | + font-weight: 300; | |
| 27 | + text-transform: uppercase; | |
| 28 | + } | |
| 29 | + img { | |
| 30 | + &.pull-left { | |
| 31 | + margin-right: 20px; | |
| 32 | + } | |
| 33 | + &.pull-right { | |
| 34 | + margin-left: 20px; | |
| 35 | + } | |
| 36 | + } | |
| 37 | + blockquote { | |
| 38 | + border-bottom: 5px solid $color; | |
| 39 | + border-top: 5px solid $color; | |
| 40 | + margin-left: 0; | |
| 41 | + margin-right: 0; | |
| 42 | + p { | |
| 43 | + font-size: 30px; | |
| 44 | + } | |
| 45 | + } | |
| 46 | + ul { | |
| 47 | + li { | |
| 48 | + border-bottom: 1px solid #e0e0e0; | |
| 49 | + color: $color; | |
| 50 | + font-size: 18px; | |
| 51 | + font-weight: 700; | |
| 52 | + padding-bottom: 1em; | |
| 53 | + padding-top: 1em; | |
| 54 | + &:last-child { | |
| 55 | + border-bottom: none; | |
| 56 | + } | |
| 57 | + } | |
| 58 | + &.list-unstyled { | |
| 59 | + list-style: none; | |
| 60 | + } | |
| 61 | + } | |
| 62 | + .row { | |
| 63 | + font-size: 0; | |
| 64 | + &:after { | |
| 65 | + display: block; | |
| 66 | + height: 0px; | |
| 67 | + content: ""; | |
| 68 | + clear: both; | |
| 69 | + visibility: hidden; | |
| 70 | + } | |
| 71 | + .column { | |
| 72 | + display: inline-block; | |
| 73 | + font-size: 1rem; | |
| 74 | + vertical-align: top; | |
| 75 | + width: 6.25%; | |
| 76 | + } | |
| 77 | + &[class*="two column"] { | |
| 78 | + .column { | |
| 79 | + width: 50%; | |
| 80 | + } | |
| 81 | + } | |
| 82 | + } | |
| 83 | + .slide-01 { | |
| 84 | + img { | |
| 85 | + display: block; | |
| 86 | + margin: auto; | |
| 87 | + } | |
| 88 | + } | |
| 89 | + .grafico { | |
| 90 | + img { | |
| 91 | + display: block; | |
| 92 | + margin: auto; | |
| 93 | + } | |
| 94 | + } | |
| 95 | + .slide-02 { | |
| 96 | + | |
| 97 | + } | |
| 98 | + .go-to-proposal-button a { | |
| 99 | + background: $color; | |
| 100 | + border-radius: 3px; | |
| 101 | + color: #fff; | |
| 102 | + display: block; | |
| 103 | + padding: 1em; | |
| 104 | + text-align: center; | |
| 105 | + text-decoration: none; | |
| 106 | + text-transform: uppercase; | |
| 107 | + .fa-reply { | |
| 108 | + margin-right: .7em; | |
| 109 | + } | |
| 110 | + } | |
| 111 | + } | |
| 112 | +} | ... | ... |
sass/style.scss
| ... | ... | @@ -29,10 +29,8 @@ |
| 29 | 29 | @import 'footer'; |
| 30 | 30 | @import 'font-awesome/scss/font-awesome'; |
| 31 | 31 | |
| 32 | -//Importando Programas | |
| 33 | -@import 'programas/mais-medicos'; | |
| 34 | -@import 'programas/sinesp'; | |
| 35 | -@import 'programas/saude-rue'; | |
| 32 | +@import 'proposal_detail/proposal-detail-base'; | |
| 33 | +@import 'proposal_detail/urgencia-e-emergencia'; | |
| 36 | 34 | |
| 37 | 35 | html, body { |
| 38 | 36 | margin: 0; | ... | ... |