Revert "Simplified availability"

This reverts commit bc180e8792.
This commit is contained in:
Oliver Davies 2016-01-04 13:29:04 +00:00
parent 1e93473285
commit 1220aa885a
2 changed files with 33 additions and 6 deletions

View file

@ -2,12 +2,26 @@
<div class="panel-heading">Availability</div>
<div class="panel-body">
<p>
<i class="fa fa-thumbs-o-down text-danger"></i> Not available for day contract work.
</p>
{% set now = "now"|date('U') %}
<p style="margin-bottom: 0">
<i class="fa fa-thumbs-o-up text-warning"></i> Limited availability for weekend/evening freelance work.
</p>
{% for type, data in site.availability.status %}
{% set text = site.availability.text[type][data.available] %}
{% if data.start %}
{% if data.start|date('U') > now %}
{% set text = text ~ ' starting ' ~ data.start|date('F Y') %}
{% if data.end %}
{% set text = text ~ ',' %}
{% endif %}
{% endif %}
{% endif %}
{% if data.end %}
{% set text = text ~ ' until ' ~ data.end|date('F Y') %}
{% endif %}
<p>{{ text|raw }}.</p>
{% endfor %}
</div>
</div>