Merge master
This commit is contained in:
commit
0c3523972c
7 changed files with 66 additions and 51 deletions
41
source/_partials/availability.html.twig
Normal file
41
source/_partials/availability.html.twig
Normal file
|
@ -0,0 +1,41 @@
|
|||
<div class="availability">
|
||||
<h2>Availability</h2>
|
||||
|
||||
<div class="content">
|
||||
{% set now = "now"|date('U') %}
|
||||
|
||||
{% for type, data in site.availability %}
|
||||
{% if type == 'day' %}
|
||||
{% if data.available == 'yes' %}
|
||||
{% set text = 'Available for day contract work' %}
|
||||
{% elseif data.available == 'no' %}
|
||||
{% set text = 'Not available for day contract work' %}
|
||||
{% endif %}
|
||||
{% elseif type == 'evenings' %}
|
||||
{% if data.available == 'yes' %}
|
||||
{% set text = 'Available for weekend/evening freelance work' %}
|
||||
{% elseif data.available == 'limited' %}
|
||||
{% set text = 'Limited availability for weekend/evening freelance work' %}
|
||||
{% elseif data.available == 'no' %}
|
||||
{% set text = 'Not available for weekend/evening freelance work' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% 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>
|
|
@ -10,8 +10,8 @@
|
|||
<a class="navbar-brand" href="/">{{ site.title }}</a>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<div id="navbar" class="collapse navbar-collapse" role="navigation">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% for link in site.main_menu %}
|
||||
<li class="nav__{{ link.title|lower }}"><a href="{{ link.href }}">{{ link.title }}</a></li>
|
||||
{% endfor %}
|
||||
|
|
|
@ -5,4 +5,6 @@
|
|||
<img src="/assets/images/da-individual-member.png" alt="Drupal Association Individual Member">
|
||||
</a>
|
||||
</section>
|
||||
|
||||
{% include 'availability' %}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<li>{% spaceless %}
|
||||
<strong>{{ talk.date|date('F') }}</strong> - {{ talk.location }} -
|
||||
<a href="{{ talk.url }}" title="{{ talk.title }}">
|
||||
{{ talk.title }}
|
||||
</a>
|
||||
<strong>
|
||||
{{ talk.date|date('jS F') }}
|
||||
{% else %}
|
||||
{{ talk.date|date('F') }}
|
||||
{% endif %}
|
||||
</strong> - {{ talk.location }} -
|
||||
{% if talk.title_link -%}<a href="{{ talk.title_link }}" title="{{ talk.title }}">{%- endif -%}
|
||||
{{ talk.title }}
|
||||
{%- if talk.title_link -%}</a>{%- endif -%}
|
||||
{% endspaceless %}</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue