Template tidy

This commit is contained in:
Oliver Davies 2015-08-20 21:56:18 +01:00
parent d106acf639
commit 1cb1a628a0
14 changed files with 135 additions and 152 deletions

View file

@ -83,6 +83,7 @@ hightlightjs: default
digitalocean_referral: a913b4b00d4a
default_date_format: jS F, Y
title_separator: "|"
availability:
day:

View file

@ -1,29 +1,25 @@
<!DOCTYPE html>
<!--[if lte IE 8]> <html class="ie ie8 lt9 lte8 lte7"> <![endif]-->
<!--[if IE 9]> <html class="ie ie9 lte9"> <![endif]-->
<!--[if gt IE 9]> <html> <![endif]-->
<!--[if !IE]><!--> <html> <!--<![endif]-->
{% include 'head' %}
<body class="{% block body_classes %}{% endblock %}">
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!--[if lte IE 8]><html class="ie ie8 lt9 lte8 lte7"> <![endif]-->
<!--[if IE 9]><html class="ie ie9 lte9"> <![endif]-->
<!--[if gt IE 9]><html><![endif]-->
<!--[if !IE]><!--><html><!--<![endif]-->
{% include 'head' %}
<body class="{% block body_classes %}{% endblock %}">
{% include 'navbar' %}
{% include 'navbar' %}
<div class="container">
<div class="row">
{% block content_wrapper %}
<main class="col-md-10">
{% block content %}{% endblock %}
</main>
{% endblock %}
<div class="container">
<div class="row">
{% block content_wrapper %}
<main class="col-md-10">
{% block content %}{% endblock %}
</main>
{% endblock %}
{% include 'sidebar' %}
</div>{# .row #}
</div>{# .container #}
{% include 'sidebar' %}
</div>{# .row #}
</div>{# .container #}
{% include 'footer_content' %}
{% include 'footer_scripts' %}
</body>
{% include 'footer_content' %}
{% include 'footer_scripts' %}
</body>
</html>

View file

@ -3,38 +3,40 @@
{% block body_classes 'page--blog page--blog__post' %}
{% block content_wrapper %}
<main class="col-md-10">
{% include 'post_header' %}
<main class="col-md-10">
{% include 'post_header' %}
{% block content %}{% endblock %}
{% block content %}{% endblock %}
{% if page.related -%}
<h2>Related Posts</h2>
{% if page.related -%}
<h2>Related Posts</h2>
<ul>
{% for relate in page.related -%}
<li><a href="{{ relate.source.url }}">{{ relate.title }}</a></li>
{% endfor %}
</ul>
{%- endif %}
<ul>
{% for relate in page.related -%}
<li>
<a href="{{ relate.source.url }}">{{ relate.title }}</a>
</li>
{% endfor %}
</ul>
{%- endif %}
{% if page.tags %}
<p class="tags">
Tags:
{% for tag in page.tags %}
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% if page.tags %}
<p class="tags">
Tags:
{% for tag in page.tags %}
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% include 'about_author' %}
{% if page.next_post or page.previous_post %}
<ul>
{% if page.next_post %}<li>Next post: <a href="{{ page.next_post.url }}">{{ page.next_post.title }}</a></li>{% endif %}
{% if page.previous_post %}<li>Previous post: <a href="{{ page.previous_post.url }}">{{ page.previous_post.title }}</a></li>{% endif %}
</ul>
{% endif %}
{% include 'about_author' %}
{% if page.next_post or page.previous_post %}
<ul>
{% if page.next_post %}<li>Next post: <a href="{{ page.next_post.url }}">{{ page.next_post.title }}</a></li>{% endif %}
{% if page.previous_post %}<li>Previous post: <a href="{{ page.previous_post.url }}">{{ page.previous_post.title }}</a></li>{% endif %}
</ul>
{% endif %}
</main>
</main>
{% endblock %}

View file

@ -1,9 +0,0 @@
<!DOCTYPE html>
{% spaceless %}
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url={{ page.destination }}" />
</head>
</html>
{% endspaceless %}

View file

@ -1,7 +1,7 @@
<div class="about-author">
<h2>About the Author</h2>
<h2>About the Author</h2>
<img src="{{ site.gravatar.url }}?s=50" alt="Picture of Oliver" class="img-circle">
<img src="{{ site.gravatar.url }}?s=50" alt="Picture of Oliver" class="img-circle">
<p><a href="/">Oliver Davies</a> is a Drupal Developer and System Administrator based in the UK. He is a Senior Developer at <a href="https://microserve.io">Microserve</a> and also provides freelance consultancy services for Drupal websites and Linux servers.</p>
<p><a href="/">Oliver Davies</a> is a Drupal Developer and System Administrator based in the UK. He is a Senior Developer at <a href="https://microserve.io">Microserve</a> and also provides freelance consultancy services for Drupal websites and Linux servers.</p>
</div>

View file

@ -1,5 +1,5 @@
<footer class="container" role="contentinfo">
<p class="copyright">&copy; 2010-{{ 'now'|date('Y') }} {{ site.title }}. Powered by <a href="https://sculpin.io">Sculpin</a> and <a href="https://www.digitalocean.com/?refcode={{ site.digitalocean_referral }}">DigitalOcean</a>.</p>
<p class="copyright">&copy; 2010-{{ 'now'|date('Y') }} {{ site.title }}. Powered by <a href="https://sculpin.io">Sculpin</a> and <a href="https://www.digitalocean.com/?refcode={{ site.digitalocean_referral }}">DigitalOcean</a>.</p>
{% include 'meetups' %}
{% include 'meetups' %}
</footer>

View file

@ -6,17 +6,17 @@
{% block scripts %}{% endblock %}
{% if page.tweets is defined and page.tweets == true %}
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
{% endif %}
{% if site.google_analytics_tracking_id %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics_tracking_id }}', 'auto');
ga('send', 'pageview');
</script>
ga('create', '{{ site.google_analytics_tracking_id }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}

View file

@ -13,6 +13,7 @@
<link rel="author" href="{{ site.url }}/humans.txt" />
<link rel="stylesheet" href="{{ site.url }}/assets/css/styles.css">
<link rel="stylesheet" href="{{ site.url }}/components/highlightjs/styles/{{ site.hightlightjs }}.css">
{% for size in site.apple_touch_icon_sizes %}
<link rel="apple-touch-icon" href="{{ site.gravatar.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
{% endfor %}

View file

@ -1,12 +1,12 @@
<div class="meetups">
<h2>Meetups</h2>
<ul>
{% for meetup in site.meetups %}
<li class="meetup__{{ meetup.name|lower|replace({ ' ': '-' }) }}">
<a href="{{ meetup.url }}" title="{{ meetup.name }}">
<img src="/assets/images/meetups/{{ meetup.logo }}" alt="{{ meetup.name }}">
</a>
</li>
{% endfor %}
</ul>
<h2>Meetups</h2>
<ul>
{% for meetup in site.meetups %}
<li class="meetup__{{ meetup.name|lower|replace({ ' ': '-' }) }}">
<a href="{{ meetup.url }}" title="{{ meetup.name }}">
<img src="/assets/images/meetups/{{ meetup.logo }}" alt="{{ meetup.name }}">
</a>
</li>
{% endfor %}
</ul>
</div>

View file

@ -1,21 +1,22 @@
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">{{ site.title }}</a>
</div>
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">{{ site.title }}</a>
</div>
<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 %}
</ul>
</div>{# .nav-collapse #}
</div>
<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 %}
</ul>
</div>{# .nav-collapse #}
</div>
</nav>

View file

@ -1,37 +1,37 @@
{% if og.title %}
<meta property="og:title" content="{{ og.title|raw }}"/>
<meta property="og:title" content="{{ og.title|raw }}"/>
{% endif %}
{% if og.description %}
<meta property="og:description" content="{{ og.description|raw }}"/>
<meta property="og:description" content="{{ og.description|raw }}"/>
{% endif %}
{% if og.type %}
<meta property="og:type" content="{{ og.type }}"/>
<meta property="og:type" content="{{ og.type }}"/>
{% endif %}
{% if og.image and og.image.url %}
<meta property="og:image" content="{{ og.image.url }}"/>
{% if og.image.type %}
<meta property="og:image:type" content="{{ og.image.type }}"/>
{% endif %}
{% if og.image.width %}
<meta property="og:image:width" content="{{ og.image.width }}"/>
{% endif %}
{% if og.image.height %}
<meta property="og:image:height" content="{{ og.image.height }}"/>
{% endif %}
<meta property="og:image" content="{{ og.image.url }}"/>
{% if og.image.type %}
<meta property="og:image:type" content="{{ og.image.type }}"/>
{% endif %}
{% if og.image.width %}
<meta property="og:image:width" content="{{ og.image.width }}"/>
{% endif %}
{% if og.image.height %}
<meta property="og:image:height" content="{{ og.image.height }}"/>
{% endif %}
{% endif %}
{% if og.title %}
{% if og.image %}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image:src" content="{{ og.image.url }}">
<meta name="twitter:creator" content="@opdavies" />
{% else %}
<meta name="twitter:card" content="summary" />
{% endif %}
<meta name="twitter:title" content="{{ og.title|raw }}" />
<meta name="twitter:description" content="{{ og.description|raw }}" />
<meta name="twitter:site" content="@opdavies" />
{% if og.image %}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image:src" content="{{ og.image.url }}">
<meta name="twitter:creator" content="@opdavies"/>
{% else %}
<meta name="twitter:card" content="summary"/>
{% endif %}
<meta name="twitter:title" content="{{ og.title|raw }}"/>
<meta name="twitter:description" content="{{ og.description|raw }}"/>
<meta name="twitter:site" content="@opdavies"/>
{% endif %}

View file

@ -2,11 +2,3 @@
<{{ title_tag }}>{{ page.title }}</{{ title_tag }}>
<p class="posted">Posted: {{ page.date|date('jS F Y') }}</p>
{#
{% if page.tags %}
Tags:
{% for tag in page.tags %}
{{ tag }}{% if not loop.last %},{% else %}.{% endif %}
{% endfor %}
{% endif %}
#}

View file

@ -1,10 +1,10 @@
<div class="col-md-2">
<section class="block block--da_member">
<h2>Drupal Association</h2>
<a href="https://assoc.drupal.org/membership" title="Become a Drupal Association member">
<img src="/assets/images/da-individual-member.png" alt="Drupal Association Individual Member">
</a>
</section>
<section class="block block--da_member">
<h2>Drupal Association</h2>
<a href="https://assoc.drupal.org/membership" title="Become a Drupal Association member">
<img src="{{ site.url }}/assets/images/da-individual-member.png" alt="Drupal Association Individual Member">
</a>
</section>
{% include 'availability' %}
{% include 'availability' %}
</div>

View file

@ -1,14 +1,13 @@
{% set separator = '|' %}
{% spaceless %}<title>
{% if page.full_title %}
{{ page.full_title }}
{% elseif page.title and site.title %}
{{ page.title }} {{ separator }} {{ site.title }}
{% elseif site.title %}
{% if site.subtitle %}
{{ site.subtitle }} {{ separator }} {{ site.title }}
{% else %}
{{ site.title }}
{% if page.full_title %}
{{ page.full_title }}
{% elseif page.title and site.title %}
{{ page.title }} {{ site.title_separator }} {{ site.title }}
{% elseif site.title %}
{% if site.subtitle %}
{{ site.subtitle }} {{ site.title_separator }} {{ site.title }}
{% else %}
{{ site.title }}
{% endif %}
{% endif %}
{% endif %}
</title>{% endspaceless %}