Commit f5b650595bbb797f24c1d3ec86e4cae494a4156a
1 parent
74109d9e
Exists in
master
and in
6 other branches
programas
Showing
3 changed files
with
40 additions
and
31 deletions
Show diff stats
index.html
| ... | ... | @@ -133,32 +133,39 @@ |
| 133 | 133 | <div class="col-sm-3"> |
| 134 | 134 | <aside id="proposal-categories"> |
| 135 | 135 | <div id="proposal-categories-container"> |
| 136 | + <h2><strong>Programas</strong> por Tema</h2> | |
| 136 | 137 | <ul class="themes"> |
| 137 | 138 | {{#each article.categories}} |
| 138 | 139 | <li id="proposal-category-{{slug}}" class="proposal-category" data-category="{{slug}}"> |
| 139 | - <a href="#/temas/{{slug}}/{{id}}" class="proposal-link " data-target="proposal-item-{{id}}">{{name}}</a> | |
| 140 | + <a href="#/temas/{{slug}}/{{id}}" class="proposal-link" data-target="proposal-item-{{id}}"> | |
| 141 | + <span class="icon icon-theme icon-{{slug}}"></span> | |
| 142 | + {{name}} | |
| 143 | + </a> | |
| 140 | 144 | <!-- <div class="arrow-box" style="display: none"></div> --> |
| 141 | 145 | </li> |
| 142 | 146 | {{/each}} |
| 143 | 147 | </ul> |
| 144 | - {{#each article.categories}} | |
| 145 | - <section id="proposal-item-{{id}}" class="proposal-category-items proposal-category-items-{{slug}} hide proposal-container clearfix {{slug}}" data-category="{{slug}}"> | |
| 146 | - <div class="header"> | |
| 147 | - <div class="name">{{name}}</div> | |
| 148 | - <div class="description"></div> | |
| 149 | - </div> | |
| 150 | - <ul class="proposal-list"> | |
| 151 | - {{#list_proposal ../article.children category=slug}} | |
| 152 | - {{#link title id}}{{/link}} | |
| 153 | - {{/list_proposal}} | |
| 154 | - </ul> | |
| 155 | - </section> | |
| 156 | - {{/each}} | |
| 157 | 148 | </div> |
| 158 | 149 | </aside> |
| 159 | 150 | </div> |
| 160 | 151 | |
| 161 | 152 | <div class="col-sm-9"> |
| 153 | + {{#each article.categories}} | |
| 154 | + <section id="proposal-item-{{id}}" class="proposal-category-items proposal-category-items-{{slug}} hide proposal-container clearfix {{slug}}" data-category="{{slug}}"> | |
| 155 | + <div class="header"> | |
| 156 | + <div class="name">{{name}}</div> | |
| 157 | + <div class="description"></div> | |
| 158 | + </div> | |
| 159 | + <ul class="proposal-list row"> | |
| 160 | + {{#list_proposal ../article.children category=slug}} | |
| 161 | + {{#link title id}}{{/link}} | |
| 162 | + {{/list_proposal}} | |
| 163 | + </ul> | |
| 164 | + </section> | |
| 165 | + {{/each}} | |
| 166 | + </div> | |
| 167 | + | |
| 168 | + <div class="col-sm-9"> | |
| 162 | 169 | <article id="proposal-group" class=""> |
| 163 | 170 | <!-- |
| 164 | 171 | <label for="search-input">Selecione um programa para fazer propostas e contar sua experiência.</label> |
| ... | ... | @@ -166,7 +173,9 @@ |
| 166 | 173 | <input placeholder="palavra chave" id="search-input" type="text" name="search" /> |
| 167 | 174 | </div> |
| 168 | 175 | --> |
| 169 | - <ul class="proposal-list"> | |
| 176 | + <h2>Programas</h2> | |
| 177 | + | |
| 178 | + <ul class="proposal-list row"> | |
| 170 | 179 | {{#list_proposal article.children}} |
| 171 | 180 | {{#link title id}}{{/link}} |
| 172 | 181 | {{/list_proposal}} |
| ... | ... | @@ -176,8 +185,9 @@ |
| 176 | 185 | |
| 177 | 186 | {{#each article.children}} |
| 178 | 187 | {{!-- <div class="container"> --}} |
| 179 | - <article class="proposal-detail hide" id="proposal-item-{{id}}"> | |
| 188 | + <article class="proposal-detail hide col-sm-9" id="proposal-item-{{id}}"> | |
| 180 | 189 | <div class="categories {{#each categories}}{{slug}}{{/each}}"> |
| 190 | + <!-- | |
| 181 | 191 | <ul class="select"> |
| 182 | 192 | {{#each categories}} |
| 183 | 193 | <li class="category proposal-category" data-category="{{slug}}"> |
| ... | ... | @@ -190,6 +200,7 @@ |
| 190 | 200 | </li> |
| 191 | 201 | {{/each}} |
| 192 | 202 | </ul> |
| 203 | + --> | |
| 193 | 204 | |
| 194 | 205 | <div class="proposal-header"> |
| 195 | 206 | <div class="abstract"> |
| ... | ... | @@ -446,7 +457,7 @@ |
| 446 | 457 | </ul> |
| 447 | 458 | </script> |
| 448 | 459 | |
| 449 | - <script type='text/javascript' > | |
| 460 | + <script type='text/javascript' > | |
| 450 | 461 | loadRequireJS(); |
| 451 | 462 | </script> |
| 452 | 463 | ... | ... |
js/handlebars-helpers.js
| ... | ... | @@ -19,11 +19,10 @@ define(['handlebars'], function(Handlebars){ |
| 19 | 19 | for(var i=0, j=proposals.length; i<j; i++) { |
| 20 | 20 | var proposal = proposals[i]; |
| 21 | 21 | |
| 22 | - element = '<li class="proposal-item">' + | |
| 22 | + element = '<li class="proposal-item col-sm-6">' + | |
| 23 | 23 | '<a href="#/programas/'+proposal.id+'" data-target="proposal-item-'+proposal.id+'" class="proposal-link box">' + |
| 24 | - '<div class="box-header item">' + | |
| 25 | - '' + proposal.title; | |
| 26 | - category = "<ul class='category box-category'>"; | |
| 24 | + '<div class="box-header item">'; | |
| 25 | + category = "<div class='category box-category'>"; | |
| 27 | 26 | |
| 28 | 27 | |
| 29 | 28 | for(var x=0, y=proposal.categories.length; x<y; x++) { |
| ... | ... | @@ -31,14 +30,13 @@ define(['handlebars'], function(Handlebars){ |
| 31 | 30 | element = ''; |
| 32 | 31 | continue; |
| 33 | 32 | } |
| 34 | - category = category + '<li class="category-'+proposal.categories[x].slug+' button button-inline">' + proposal.categories[x].name + '</li>'; | |
| 33 | + category = category + '<div class="category-'+proposal.categories[x].slug+'">' + proposal.categories[x].name + '</div>'; | |
| 35 | 34 | } |
| 36 | 35 | if(element == ''){ |
| 37 | 36 | continue; |
| 38 | 37 | } |
| 39 | - category = category + '</ul>'; | |
| 38 | + category = category + '</div>' + '<div class="box-body">' + '' + proposal.title + (proposal.abstract ? proposal.abstract : '') + '</div>'; | |
| 40 | 39 | // element = element + options.fn(proposal); |
| 41 | - element = element + (proposal.abstract ? proposal.abstract : ''); | |
| 42 | 40 | |
| 43 | 41 | element = element + category; |
| 44 | 42 | ret = ret + element + '</div></a></li>'; | ... | ... |
js/main.js
| ... | ... | @@ -224,19 +224,19 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 224 | 224 | return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); |
| 225 | 225 | }, |
| 226 | 226 | display_category_tab: function(){ |
| 227 | - // $('#proposal-group').hide(); | |
| 227 | + $('#proposal-group').hide(); | |
| 228 | 228 | $('#proposal-categories').show(); |
| 229 | 229 | $('#nav-proposal-categories a').addClass('active'); |
| 230 | 230 | $('#nav-proposal-group a').removeClass('active'); |
| 231 | 231 | $('.proposal-category-items').hide(); |
| 232 | - // $('.proposal-category .arrow-box').hide(); | |
| 232 | + $('.proposal-category .arrow-box').hide(); | |
| 233 | 233 | $('.proposal-detail').hide(); |
| 234 | 234 | |
| 235 | 235 | $('#content').show(); |
| 236 | 236 | $('nav').show(); |
| 237 | 237 | }, |
| 238 | 238 | display_proposals_tab: function(){ |
| 239 | - // $('#proposal-categories').hide(); | |
| 239 | + $('#proposal-categories').hide(); | |
| 240 | 240 | $('#proposal-group').show(); |
| 241 | 241 | $('#nav-proposal-group a').addClass('active'); |
| 242 | 242 | $('#nav-proposal-categories a').removeClass('active'); |
| ... | ... | @@ -244,7 +244,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 244 | 244 | $('nav').show(); |
| 245 | 245 | }, |
| 246 | 246 | display_proposal: function(proposal_id){ |
| 247 | - $('#proposal-categories').hide(); | |
| 247 | + // $('#proposal-categories').hide(); | |
| 248 | 248 | $('#proposal-group').hide(); |
| 249 | 249 | $('nav').hide(); |
| 250 | 250 | $('#content').hide(); |
| ... | ... | @@ -278,7 +278,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 278 | 278 | case 'categories reducao-da-pobreza': |
| 279 | 279 | active_category = 'reducao-da-pobreza'; |
| 280 | 280 | break; |
| 281 | - } | |
| 281 | + } | |
| 282 | 282 | |
| 283 | 283 | $proposal.find('.calendar.' + active_category).show(); |
| 284 | 284 | $proposal.find('.calendar').slick(); |
| ... | ... | @@ -329,9 +329,9 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 329 | 329 | $('html, body').animate({ scrollTop: itemOffset.top }, 'fast'); |
| 330 | 330 | } |
| 331 | 331 | } ); |
| 332 | - // $('.proposal-category .arrow-box').hide(); | |
| 332 | + $('.proposal-category .arrow-box').hide(); | |
| 333 | 333 | var categorySlug = $item.data('category'); |
| 334 | - // $('#proposal-category-' + categorySlug).find('.arrow-box').show(); | |
| 334 | + $('#proposal-category-' + categorySlug).find('.arrow-box').show(); | |
| 335 | 335 | |
| 336 | 336 | } |
| 337 | 337 | }, | ... | ... |