Compare View
Commits (2)
Showing
3 changed files
Show diff stats
src/app/pages/programas/programa.controller.js
... | ... | @@ -98,6 +98,17 @@ |
98 | 98 | vm.proposalsTopRated = vm.proposals.slice(0, 3); |
99 | 99 | vm.loadingTopProposals = false; |
100 | 100 | |
101 | + // HACK: get image from body 'proposal' | |
102 | + // remove tags html | |
103 | + for (var j = vm.proposalsTopRated.length - 1; j >= 0; j--) { | |
104 | + var proposalTopRated = vm.proposalsTopRated[j]; | |
105 | + if (proposalTopRated && proposalTopRated.body && proposalTopRated.body.length > 0) { | |
106 | + proposalTopRated.body = String(proposalTopRated.body).replace(/<[^>]+>/gm, ''); | |
107 | + }else{ | |
108 | + proposalTopRated.body = vm.banner.src; | |
109 | + } | |
110 | + } | |
111 | + | |
101 | 112 | if (vm.article.archived) { |
102 | 113 | |
103 | 114 | // show 'respostas e compromissos', |
... | ... | @@ -121,19 +132,6 @@ |
121 | 132 | |
122 | 133 | // set focus at proposal, ASYNC |
123 | 134 | vm.$rootScope.findElAsyncAndFocus('.sub-section-' + proposal_id); |
124 | - | |
125 | - // TODO: load and show proposal response | |
126 | - } | |
127 | - } | |
128 | - | |
129 | - // HACK: get image from body 'proposal' | |
130 | - // remove tags html | |
131 | - for (var j = vm.proposalsTopRated.length - 1; j >= 0; j--) { | |
132 | - var proposalTopRated = vm.proposalsTopRated[j]; | |
133 | - if (proposalTopRated && proposalTopRated.body && proposalTopRated.body.length > 0) { | |
134 | - proposalTopRated.body = String(proposalTopRated.body).replace(/<[^>]+>/gm, ''); | |
135 | - }else{ | |
136 | - proposalTopRated.body = vm.banner.src; | |
137 | 135 | } |
138 | 136 | } |
139 | 137 | ... | ... |
src/app/pages/programas/programa.html
... | ... | @@ -242,7 +242,7 @@ |
242 | 242 | <div class="sub-section sub-section-{{::proposal.id}}" ng-class="{'sub-section-even': ( ($index+1) % 2 === 0), 'sub-section-odd': ( ($index+1) % 2 === 1)}"> |
243 | 243 | <div class="container"> |
244 | 244 | <div class="row"> |
245 | - <div class="col-sm-4 col-md-3"> | |
245 | + <div class="col-xs-6 col-sm-4 col-md-3"> | |
246 | 246 | <div class="img-mask--container" ng-style="{'background-image':'url( {{::proposal.body}} )'}"> |
247 | 247 | <div class="img-mask--background ng-scope"> |
248 | 248 | <div class="icon icon-programa-respondido"> |
... | ... | @@ -253,11 +253,24 @@ |
253 | 253 | </div> |
254 | 254 | </div> |
255 | 255 | </div> |
256 | - <div class="col-sm-8 col-md-9"> | |
256 | + <div class="col-xs-6 col-sm-8 col-md-9"> | |
257 | 257 | <br> |
258 | 258 | <h3 class="color-theme-fg">{{($index+1)}}ª proposta mais votada:</h3> |
259 | 259 | <p>{{::proposal.abstract}}</p> |
260 | - <div class="button--themed"> | |
260 | + <div class="hidden-xs"> | |
261 | + <div class="button--themed" style="margin: 10px 0;"> | |
262 | + <button class="btn btn-block btn-responsive" ng-click="pagePrograma.toggleResponseVisibility(proposal)"> | |
263 | + Veja a resposta e o compromisso do governo | |
264 | + <div class="button-left-icon"> | |
265 | + <span class="glyphicon glyphicon-chevron-down pull-right color-theme-common-fg" aria-hidden="true"></span> | |
266 | + </div> | |
267 | + </button> | |
268 | + </div> | |
269 | + <br> | |
270 | + </div> | |
271 | + </div> | |
272 | + <div class="col-xs-12 visible-xs"> | |
273 | + <div class="button--themed" style="margin: 10px 0;"> | |
261 | 274 | <button class="btn btn-block btn-responsive" ng-click="pagePrograma.toggleResponseVisibility(proposal)"> |
262 | 275 | Veja a resposta e o compromisso do governo |
263 | 276 | <div class="button-left-icon"> |
... | ... | @@ -265,7 +278,6 @@ |
265 | 278 | </div> |
266 | 279 | </button> |
267 | 280 | </div> |
268 | - <br> | |
269 | 281 | </div> |
270 | 282 | </div> |
271 | 283 | </div> | ... | ... |
src/app/pages/programas/programas.scss
... | ... | @@ -271,6 +271,29 @@ |
271 | 271 | |
272 | 272 | .gov-response { |
273 | 273 | background-color: #e1e1e1; |
274 | + | |
275 | + &--link-list .btn{ | |
276 | + | |
277 | + @media screen and (max-width: $screen-xs) { | |
278 | + padding-right: 50px; | |
279 | + padding-left: 15px; | |
280 | + } | |
281 | + | |
282 | + } | |
283 | + } | |
284 | + | |
285 | + | |
286 | + .icon-programa-respondido { | |
287 | + @media screen and (max-width: $screen-xs) { | |
288 | + transform: scale(0.6); | |
289 | + margin-left: -10px; | |
290 | + } | |
291 | + } | |
292 | + | |
293 | + .img-mask--container { | |
294 | + @media screen and (max-width: $screen-xs) { | |
295 | + min-width: 145px; | |
296 | + } | |
274 | 297 | } |
275 | 298 | |
276 | 299 | .button--themed { |
... | ... | @@ -285,6 +308,8 @@ |
285 | 308 | .btn-responsive { |
286 | 309 | white-space: normal !important; |
287 | 310 | word-wrap: break-word; |
311 | + padding-right: 40px; | |
312 | + padding-left: 15px; | |
288 | 313 | } |
289 | 314 | } |
290 | 315 | ... | ... |