Split availability into partials

This commit is contained in:
Oliver Davies 2016-09-29 12:42:14 +01:00
parent b07e77fa6c
commit c5e5ae90d5
4 changed files with 25 additions and 19 deletions

View file

@ -1,26 +1,11 @@
<div class="availability panel panel-default">
<div class="panel-heading">Availability</div>
<div class="panel-heading">
Availability
</div>
<div class="panel-body">
{% for key, availability in site.availability %}
<p>
{% if availability == 'yes' %}
<i class="fa fa-thumbs-o-up text-success"></i>
{{ key == 'full' ? 'Currently have available full-time capacity' }}
{{ key == 'part' ? 'Currently have available part-time capacity' }}
{% elseif availability == 'limited' %}
<i class="fa fa-thumbs-o-up text-warning"></i>
{{ key == 'full' ? 'Currently have limited full-time capacity' }}
{{ key == 'part' ? 'Currently have limited part-time capacity' }}
{% else %}
<i class="fa fa-thumbs-o-down text-danger"></i>
{{ key == 'full' ? 'Currently no spare full-time capacity.' }}
{{ key == 'part' ? 'Currently no spare part-time capacity.' }}
{% endif %}
</p>
{% include 'availability/' ~ availability with { value: key } %}
{% endfor %}
</div>
</div>

View file

@ -0,0 +1,7 @@
<p>
<i class="fa fa-thumbs-o-up text-warning"></i>
{{ value == 'full' ? 'Currently have limited full-time capacity' }}
{{ value == 'part' ? 'Currently have limited part-time capacity' }}
</p>

View file

@ -0,0 +1,7 @@
<p>
<i class="fa fa-thumbs-o-down text-danger"></i>
{{ value == 'full' ? 'Currently no spare full-time capacity.' }}
{{ value == 'part' ? 'Currently no spare part-time capacity.' }}
</p>

View file

@ -0,0 +1,7 @@
<p>
<i class="fa fa-thumbs-o-up text-success"></i>
{{ value == 'full' ? 'Currently have available full-time capacity' }}
{{ value == 'part' ? 'Currently have available part-time capacity' }}
</p>