Rename _partials to _includes
This commit is contained in:
parent
0bf570bd5c
commit
4e41c6e372
8 changed files with 0 additions and 0 deletions
27
source/_includes/availability.html.twig
Normal file
27
source/_includes/availability.html.twig
Normal file
|
@ -0,0 +1,27 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Availability</div>
|
||||
|
||||
<div class="panel-body">
|
||||
{% 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>{{ text|raw }}.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue