diff --git a/index.html b/index.html
index 373c4c6..50bc5f6 100644
--- a/index.html
+++ b/index.html
@@ -105,6 +105,8 @@
+
+
{{{article.abstract}}}
@@ -431,6 +433,22 @@
+
+
+
+
diff --git a/js/main.js b/js/main.js
index b9896bd..e6c2231 100644
--- a/js/main.js
+++ b/js/main.js
@@ -9,6 +9,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
var supportProposalTemplate = Handlebars.compile(document.getElementById('support-proposal-template').innerHTML);
var loginTemplate = Handlebars.compile(document.getElementById('login').innerHTML);
var resultsTemplate = Handlebars.compile(document.getElementById('results').innerHTML);
+ var articleTemplate = Handlebars.compile(document.getElementById('article').innerHTML);
// The div/container that we are going to display the results in
var resultsPlaceholder = document.getElementById('proposal-result');
@@ -225,6 +226,17 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
}
return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
},
+ display_article: function(article_id) {
+ var url = host + '/api/v1/articles/' + article_id + '?private_token=' + Main.private_token;
+ $.getJSON(url).done(function( data ) {
+ $('#article-container').html(articleTemplate(data.article));
+ $('#article-container').show();
+ $('#proposal-categories').hide();
+ $('#proposal-group').hide();
+ $('nav').hide();
+ $('#content').hide();
+ });
+ },
display_category_tab: function(){
$('#proposal-group').hide();
$('#proposal-categories').show();
@@ -233,6 +245,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
$('.proposal-category-items').hide();
$('.proposal-category .arrow-box').hide();
$('.proposal-detail').hide();
+ $('#article-container').hide();
$('#content').show();
$('nav').show();
@@ -243,6 +256,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
$('#nav-proposal-group a').addClass('active');
$('#nav-proposal-categories a').removeClass('active');
$('#content').show();
+ $('#article-container').hide();
$('nav').show();
},
display_proposal: function(proposal_id){
@@ -250,6 +264,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
$('#proposal-group').hide();
$('nav').hide();
$('#content').hide();
+ $('#article-container').hide();
// $('.make-proposal-form').hide();
// $('.login-container').hide();
$('.proposal-detail').hide(); // hide all proposals
@@ -293,6 +308,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
$('#proposal-group').hide();
$('nav').hide();
$('#content').hide();
+ $('#article-container').hide();
$proposal = $('#proposal-item-' + proposal_id);
$proposal.find('.make-proposal-form').hide();
$proposal.find('.proposal-header').hide();
@@ -403,6 +419,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
var regexProposals = /#\/programas/;
var regexCategory = /#\/temas/;
var regexHideBarra = /barra=false$/;
+ var regexArticle = /#\/artigo/;
if( !(regexHideBarra.exec(hash) !== null) && !HIDE_BARRA_DO_GOVERNO ){
this.addBarraDoGoverno();
@@ -417,6 +434,11 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F
var isProposal = regexProposals.exec(hash) !== null;
var isCategory = regexCategory.exec(hash) !== null;
+ var isArticle = regexArticle.exec(hash) !== null;
+
+ if(isArticle) {
+ this.display_article(hash.split('/')[2]);
+ }
if( isProposal ){
diff --git a/sass/_article.scss b/sass/_article.scss
new file mode 100644
index 0000000..707cddd
--- /dev/null
+++ b/sass/_article.scss
@@ -0,0 +1,10 @@
+#article-container .abstract {
+ font-style: italic;
+ color: rgb(114, 114, 114);
+ margin-bottom: 30px;
+ margin-top: 10px;
+}
+
+#article-container .title {
+ font-size: 22px;
+}
diff --git a/sass/_footer.scss b/sass/_footer.scss
index f2bd8ec..20afb15 100644
--- a/sass/_footer.scss
+++ b/sass/_footer.scss
@@ -1,3 +1,8 @@
footer {
// display: none;
}
+
+.terms-of-use {
+ text-align: center;
+ margin-top: 20px;
+}
diff --git a/sass/style.scss b/sass/style.scss
index 3d3015f..31d3429 100755
--- a/sass/style.scss
+++ b/sass/style.scss
@@ -11,6 +11,7 @@
@import 'slick';
@import 'slick-theme';
@import 'share';
+@import 'article';
@import 'proposal_detail/proposal-detail-base';
@import 'proposal_detail/urgencia-e-emergencia';
--
libgit2 0.21.2