Use .twig instead of .html.twig

This commit is contained in:
Oliver Davies 2015-08-20 23:30:25 +01:00
parent 91e76cad66
commit 3465efe014
11 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,27 @@
<div class="availability">
<h2>Availability</h2>
<div class="content">
{% set now = "now"|date('U') %}
{% 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 class="availability__{{ data.available }}">{{ text }}.</p>
{% endfor %}
</div>
</div>