mirror of https://github.com/JohnHammond/CTFd.git
Fixing scoping issues in awards rendering and not commiting .data (docker-compose)
parent
dc79f34509
commit
01cb189b22
|
@ -61,4 +61,5 @@ target/
|
|||
CTFd/static/uploads
|
||||
CTFd/uploads
|
||||
CTFd/plugins
|
||||
.data/
|
||||
.ctfd_secret_key
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue