Simplified availability

This commit is contained in:
Oliver Davies 2015-12-29 00:09:24 +00:00
parent 853c2edf25
commit bc180e8792
2 changed files with 6 additions and 33 deletions

View file

@ -2,26 +2,12 @@
<div class="panel-heading">Availability</div>
<div class="panel-body">
{% set now = "now"|date('U') %}
<p>
<i class="fa fa-thumbs-o-down text-danger"></i> Not available for day contract 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 %}
<p style="margin-bottom: 0">
<i class="fa fa-thumbs-o-up text-warning"></i> Limited availability for weekend/evening freelance work.
</p>
</div>
</div>