Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cedricbonhomme/Freshermeat
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Feb 15, 2018
2 parents a8b5d63 + 7614a8f commit e59b933
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/web/static/js/templates.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var cardProjectTemplate = _.template(
'<div class="card">' +
'<img class="card-img-top" src="<%= logo %>" alt="Card image cap">' +
'<div class="card-body">' +
'<h4 class="card-title"><%= project_name %></h4>' +
'<p class="card-text"><%= project_description %></p>' +
Expand Down
2 changes: 2 additions & 0 deletions src/web/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@

{% block content %}{% endblock %}

<br />
<footer class="footer">
<div class="container-fluid">
<span class="text-muted"><a href="https://github.com/cedricbonhomme/Freshermeat">Freshermeat</a></span>
&nbsp;
<span class="text-muted">GNU Affero General Public License</span>
</div>
</footer>
Expand Down
9 changes: 5 additions & 4 deletions src/web/templates/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h3>Projects
</div>
<div id="list-projects" class="list-group"></div>
<br />
<nav id="navigation" aria-label="...">
<nav id="navigation" style="display: none;">
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="#" id="paginationF">First</a>
Expand Down Expand Up @@ -91,6 +91,8 @@ <h3>Projects
});

if (projects.total_pages > 2) {
$('#navigation').attr("style", "display: inline-block;");

if (projects.page == 1) {
$('#paginationF').parent().addClass("disabled");

Expand Down Expand Up @@ -143,6 +145,8 @@ <h3>Projects
}
}
else if (projects.total_pages == 2) {
$('#navigation').attr("style", "display: inline-block;");

$('#paginationF').parent().addClass("disabled");

$('#pagination1').text(1);
Expand All @@ -156,9 +160,6 @@ <h3>Projects

$('#paginationL').parent().addClass("disabled");
}
else {
$('#navigation').remove();
}
}
});
}
Expand Down

0 comments on commit e59b933

Please sign in to comment.