Remove body_classes block

This commit is contained in:
Oliver Davies 2015-09-10 02:49:32 +01:00
parent f2b0352481
commit 7b0f15bfe8
9 changed files with 104 additions and 132 deletions

View file

@ -8,35 +8,31 @@ pagination:
use:
- posts
---
{% block body_classes %}page--blog page--blog__list{% endblock %}
<h1>Blog</h1>
{% block content %}
<h1>Blog</h1>
<ul class="posts">
{% for post in page.pagination.items %}
<li class="post">
{% include 'post_header' with { page: post, title_tag: 'h2' } %}
<ul class="posts">
{% for post in page.pagination.items %}
<li class="post">
{% include 'post_header' with { page: post, title_tag: 'h2' } %}
{% if post.blocks.excerpt %}
{{ post.blocks.excerpt|raw }}
{% else %}
<p>{{ post.blocks.content|raw|split(' ')|slice(0,50)|join(' ')|replace({ 'h2':'h3' })|raw }} &hellip;</p>
{% endif %}
{% if post.blocks.excerpt %}
{{ post.blocks.excerpt|raw }}
{% else %}
<p>{{ post.blocks.content|raw|split(' ')|slice(0,50)|join(' ')|replace({ 'h2':'h3' })|raw }} &hellip;</p>
{% endif %}
<a href="{{ post.url }}">Read more &rarr;</a>
</li>
{% endfor %}
</ul>
<a href="{{ post.url }}">Read more &rarr;</a>
</li>
{% endfor %}
</ul>
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav>
{% if page.pagination.previous_page %}
<a href="{{ site.url }}{{ page.pagination.previous_page.url }}">Newer Items</a>
{% endif %}
{% if page.pagination.next_page %}
<a href="{{ site.url }}{{ page.pagination.next_page.url }}">Older Items</a>
{% endif %}
</nav>
{% endif %}
{% endblock content %}
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav>
{% if page.pagination.previous_page %}
<a href="{{ site.url }}{{ page.pagination.previous_page.url }}">Newer Items</a>
{% endif %}
{% if page.pagination.next_page %}
<a href="{{ site.url }}{{ page.pagination.next_page.url }}">Older Items</a>
{% endif %}
</nav>
{% endif %}

View file

@ -5,9 +5,6 @@ title: Contact
meta:
description: 'Information about how to get in touch with Oliver.'
---
{% block body_classes 'page--contact' %}
{% block content %}
# Contact
The best ways to contact me is via <a href="mailto:{{ site.email }}?subject=Contact%20Oliver%20Davies">email</a> and
@ -29,4 +26,3 @@ Here are some other places to find me online:
* <a href="{{ site.speakerdeck.url }}">Speaker Deck</a>
* <a href="{{ site.ansible_galaxy.url }}">Ansible Galaxy</a>
* <a href="{{ site.flickr.url }}">Flickr</a>
{% endblock %}

View file

@ -5,9 +5,6 @@ title: Experience
meta:
description: 'Information about freelance services that Oliver offers.'
---
{% block body_classes 'page--experience' %}
{% block content %}
# Experience
## PHP
@ -50,4 +47,3 @@ meta:
* Continuous integration using [Jenkins](http://jenkins-ci.org).
* Virtual machine setup using [Vagrant](http://vagrantup.com) for development or server testing.
* Domain name and DNS management.
{% endblock %}

View file

@ -12,9 +12,6 @@ meta:
height: 327
type: image/jpg
---
{% block body_classes 'page--about' %}
{% block content %}
# About
<img src="{{ site.gravatar.url }}?s=100" alt="Picture of Oliver" class="img-circle">
@ -36,4 +33,3 @@ I maintain several contrib projects on Drupal.org, and have contributed to numer
I'm also the [Git Documentation Maintainer](https://www.drupal.org/node/2248627#comment-8887789) for the Drupal project, and a provisional member of the [Drupal Security team](https://www.drupal.org/security-team).
I organise Drupal user group events such as talk nights and code sprints in <a href="{{ site.meetups.swdug.url }}">South Wales</a> and <a href="{{ site.meetups.drupalbristol.url }}">Bristol</a>, and am a founding [DrupalCamp Bristol](http://2015.drupalcampbristol.co.uk) organising committee member. I also regularly attend and speak at other meetups and conferences related to Drupal, PHP, Linux, DevOps, and web development and accessibility.
{% endblock %}

View file

@ -19,77 +19,73 @@ meta:
# - { date: 2015-11-01, location: Unified Diff, title: Building Static Websites with Sculpin, fuzzy_date: true }
use: [talks]
---
{% block body_classes 'page--talks page--talks__list' %}
<h1>Talks</h1>
{% block content %}
<h1>Talks</h1>
<p>I regularly speak at conferences and user groups about a range of subjects including Drupal, Sculpin and Git. If
you would like to me to speak at your group or conference, please <a href="/contact/">get in touch</a>.</p>
<p>I regularly speak at conferences and user groups about a range of subjects including Drupal, Sculpin and Git. If
you would like to me to speak at your group or conference, please <a href="/contact/">get in touch</a>.</p>
<p>There is also information about events that Ive attended and spoken at on my
<a href="{{ site.lanyrd.url }}">Lanyrd</a> and <a href="{{ site.joindin.url }}">Joind.in</a> profiles.</p>
<p>There is also information about events that Ive attended and spoken at on my
<a href="{{ site.lanyrd.url }}">Lanyrd</a> and <a href="{{ site.joindin.url }}">Joind.in</a> profiles.</p>
{% set now = 'today'|date('U') %}
{% set talks = data.talks %}
{% set now = 'today'|date('U') %}
{% set talks = data.talks %}
{% set found, year, new_year = false, '0', false %}
{% set found, year, new_year = false, '0', false %}
{% for talk in talks if talk.date >= now %}
{% if loop.first %}
<h2>Upcoming Talks</h2>
{% endif %}
{% set this_year %}{{ talk.date|date('Y') }}{% endset %}
{% if this_year != year %}
{% if new_year %}
{# Close the list for the previous year. #}
</ul>
{% endif %}
{% set found, year = true, this_year %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% for talk in talks if talk.date >= now %}
{% if loop.first %}
<h2>Upcoming Talks</h2>
{% endif %}
{% set found, year, new_year = false, '0', false %}
{% set this_year %}{{ talk.date|date('Y') }}{% endset %}
{% for talk in talks if talk.date < now %}
{% if loop.first %}
<h2>Previous Talks</h2>
{% if this_year != year %}
{% if new_year %}
{# Close the list for the previous year. #}
</ul>
{% endif %}
{% set this_year %}{{ talk.date|date('Y') }}{% endset %}
{% set found, year = true, this_year %}
{% if this_year != year %}
{% if new_year %}
{# Close the list for the previous year. #}
</ul>
{% endif %}
{% set year, found = this_year, true %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% endblock %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% endif %}
{% set found, year, new_year = false, '0', false %}
{% for talk in talks if talk.date < now %}
{% if loop.first %}
<h2>Previous Talks</h2>
{% endif %}
{% set this_year %}{{ talk.date|date('Y') }}{% endset %}
{% if this_year != year %}
{% if new_year %}
{# Close the list for the previous year. #}
</ul>
{% endif %}
{% set year, found = this_year, true %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% endif %}

View file

@ -79,31 +79,27 @@ testimonials:
<p>Everything we have thrown at Oliver, he has approached with an open and flexible mind that has allowed him
to work on a wide range of projects and features for Drupal products.</p>
---
{% block body_classes 'page--testimonials' %}
<h1>Testimonials</h1>
<p>Here are some examples of the nice things that clients and former colleagues have said.</p>
<p>You can view more recommendations on my <a href="{{ site.linkedin.url }}">LinkedIn profile</a>.</p>
{% block content %}
<h1>Testimonials</h1>
<p>Here are some examples of the nice things that clients and former colleagues have said.</p>
<p>You can view more recommendations on my <a href="{{ site.linkedin.url }}">LinkedIn profile</a>.</p>
{% for testimonial in page.testimonials|reverse|slice(0,5) %}
<article class="testimonial">
<h2 class="testimonial__name">{{ testimonial.name }}</h2>
{% for testimonial in page.testimonials|reverse|slice(0,5) %}
<article class="testimonial">
<h2 class="testimonial__name">{{ testimonial.name }}</h2>
{% if testimonial.role or testimonial.company %}{% spaceless %}
<p>
{{ testimonial.role }} at
{% if testimonial.url %}<a href="{{ testimonial.url }}" title="{{ testimonial.company }}">{% endif %}
{{ testimonial.company }}
{% if testimonial.url %}</a>{% endif %}
</p>
{% endspaceless %}{% endif %}
{% if testimonial.role or testimonial.company %}{% spaceless %}
<p>
{{ testimonial.role }} at
{% if testimonial.url %}<a href="{{ testimonial.url }}" title="{{ testimonial.company }}">{% endif %}
{{ testimonial.company }}
{% if testimonial.url %}</a>{% endif %}
</p>
{% endspaceless %}{% endif %}
{% if testimonial.image %}
<img class="testimonial__image" src="{{ testimonial.image }}" alt="{{ testimonial.name }}"/>
{% endif %}
{% if testimonial.image %}
<img class="testimonial__image" src="{{ testimonial.image }}" alt="{{ testimonial.name }}"/>
{% endif %}
{{ testimonial.text|raw }}
</article>
{% endfor %}
{% endblock %}
{{ testimonial.text|raw }}
</article>
{% endfor %}

View file

@ -29,7 +29,7 @@
<link rel="icon" href="{{ site.gravatar.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
{% endfor %}
</head>
<body class="{% block body_classes %}{% endblock %}">
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">

View file

@ -1,6 +1,4 @@
{% extends 'default' %}
{% block body_classes 'page--blog page--blog__post' %}
{% extends 'default.html.twig' %}
{% block content_wrapper %}
<main class="col-md-9">

View file

@ -1,7 +1,5 @@
{% extends 'default.html.twig' %}
{% block body_classes 'page--talks page--talks__talk' %}
{% block content_wrapper %}
<main class="col-md-9">
<h1>{{ page.title }}</h1>