Fixing scoping issues in awards rendering and not commiting .data (docker-compose)

selenium-screenshot-testing
Kevin Chung 2017-01-15 18:13:11 -05:00
parent dc79f34509
commit 01cb189b22
2 changed files with 6 additions and 6 deletions

1
.gitignore vendored
View File

@ -61,4 +61,5 @@ target/
CTFd/static/uploads
CTFd/uploads
CTFd/plugins
.data/
.ctfd_secret_key

View File

@ -35,20 +35,19 @@
{% if awards %}
<div class="row">
<h3>Awards</h3>
{% set count = awards|length %}
{% set rem = awards|length % 4 %}
{% for award in awards %}
{% if count >= 4 %}
<div class="col-xs-3 col-md-3">
{% else %}
{% set count= awards|length - loop.index %}
{% set rem = awards|length % 4 %}
{% if count < rem %}
<div class="col-xs-{{ (12//rem)|string }} col-md-{{ (12//rem)|string }}">
{% else %}
<div class="col-xs-3 col-md-3">
{% endif %}
<p class="text-center"><strong>{{ award.name }}</strong></p>
{% if award.category %}<p class="text-center">{{ award.category }}</p>{% endif %}
<p class="text-center">{{ award.description }}</p>
<p class="text-center">{{ award.value }}</p>
</div>
{% set count = count - 1 %}
{% endfor %}
</div>