Merge master
This commit is contained in:
commit
0c3523972c
|
@ -74,7 +74,7 @@ meetups:
|
||||||
url: http://www.accessiblebristol.org.uk
|
url: http://www.accessiblebristol.org.uk
|
||||||
|
|
||||||
udiff:
|
udiff:
|
||||||
name: unified.diff
|
name: Unified Diff
|
||||||
logo: unified-diff.png
|
logo: unified-diff.png
|
||||||
url: http://unifieddiff.co.uk
|
url: http://unifieddiff.co.uk
|
||||||
|
|
||||||
|
@ -83,3 +83,14 @@ hightlightjs: default
|
||||||
digitalocean_referral: a913b4b00d4a
|
digitalocean_referral: a913b4b00d4a
|
||||||
|
|
||||||
default_date_format: jS F, Y
|
default_date_format: jS F, Y
|
||||||
|
|
||||||
|
availability:
|
||||||
|
day:
|
||||||
|
available: no
|
||||||
|
start: ~
|
||||||
|
end: ~
|
||||||
|
evenings:
|
||||||
|
available: limited
|
||||||
|
start: 2015-08-10
|
||||||
|
end: ~
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
From,To
|
|
||||||
about,/
|
|
||||||
blog/2012/07/nomensa-accessible-media-player-drupal,/blog/install-nomensa-media-player-drupal/
|
|
||||||
cv,https://gist.github.com/opdavies/d096d553b80140a342d4
|
|
||||||
drupalgive,https://www.drupal.org/u/opdavies
|
|
||||||
projects,/services/
|
|
||||||
portfolio,/services/
|
|
||||||
speaking,/talks/
|
|
||||||
terms-and-conditions,/terms/
|
|
||||||
work,/services/
|
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/usr/bin/env php
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$csv = __DIR__ . '/redirects.csv';
|
|
||||||
|
|
||||||
$template = <<<EOS
|
|
||||||
---
|
|
||||||
layout: redirect
|
|
||||||
destination: %DESTINATION%
|
|
||||||
---
|
|
||||||
|
|
||||||
EOS;
|
|
||||||
|
|
||||||
$row = 0;
|
|
||||||
if (($handle = fopen($csv, 'r')) !== FALSE) {
|
|
||||||
while (($data = fgetcsv($handle, filesize($csv))) !== FALSE) {
|
|
||||||
$row++;
|
|
||||||
|
|
||||||
if ($row > 1) {
|
|
||||||
$templateData = [
|
|
||||||
'%DESTINATION%' => $data[1],
|
|
||||||
];
|
|
||||||
|
|
||||||
$output = strtr($template, $templateData);
|
|
||||||
|
|
||||||
$filename = str_replace('/', '-', $data[0]);
|
|
||||||
file_put_contents("source/$filename.html", $output);
|
|
||||||
echo "Written to $filename.html\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose($handle);
|
|
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>
|
<a class="navbar-brand" href="/">{{ site.title }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="navbar" class="collapse navbar-collapse">
|
<div id="navbar" class="collapse navbar-collapse" role="navigation">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{% for link in site.main_menu %}
|
{% for link in site.main_menu %}
|
||||||
<li class="nav__{{ link.title|lower }}"><a href="{{ link.href }}">{{ link.title }}</a></li>
|
<li class="nav__{{ link.title|lower }}"><a href="{{ link.href }}">{{ link.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -5,4 +5,6 @@
|
||||||
<img src="/assets/images/da-individual-member.png" alt="Drupal Association Individual Member">
|
<img src="/assets/images/da-individual-member.png" alt="Drupal Association Individual Member">
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{% include 'availability' %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<li>{% spaceless %}
|
<li>{% spaceless %}
|
||||||
<strong>{{ talk.date|date('F') }}</strong> - {{ talk.location }} -
|
<strong>
|
||||||
<a href="{{ talk.url }}" title="{{ talk.title }}">
|
{{ talk.date|date('jS F') }}
|
||||||
{{ talk.title }}
|
{% else %}
|
||||||
</a>
|
{{ 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>
|
{% endspaceless %}</li>
|
||||||
|
|
Reference in a new issue