Moved things into the oliverdavies theme
This commit is contained in:
parent
29e6ed1961
commit
a6d48e6155
10 changed files with 0 additions and 0 deletions
109
source/themes/opdavies/oliverdavies/_layouts/default.twig
Normal file
109
source/themes/opdavies/oliverdavies/_layouts/default.twig
Normal file
|
@ -0,0 +1,109 @@
|
|||
<!DOCTYPE html>
|
||||
<!--[if lte IE 8]><html lang="en-GB" class="ie ie8 lt9 lte8 lte7"> <![endif]-->
|
||||
<!--[if IE 9]><html lang="en-GB" class="ie ie9 lte9"> <![endif]-->
|
||||
<!--[if gt IE 9]><html lang="en-GB"><![endif]-->
|
||||
<!--[if !IE]><!--><html lang="en-GB"><!--<![endif]-->
|
||||
<head>
|
||||
{% include 'title' %}
|
||||
|
||||
{% if page.meta.description %}
|
||||
<meta name="description" content="{{ page.meta.description|e('html') }}">
|
||||
{% endif %}
|
||||
|
||||
{% if page.meta.og %}
|
||||
{% include "og" with { og: page.meta.og } %}
|
||||
{% endif %}
|
||||
|
||||
<meta lang="en-GB" charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<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_style }}.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 %}
|
||||
|
||||
{% for size in site.favicon_sizes %}
|
||||
<link rel="icon" href="{{ site.gravatar.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body class="{% block body_classes %}{% endblock %}">
|
||||
<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 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>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{% block content_wrapper %}
|
||||
<main class="col-md-9">
|
||||
{% block content %}{% endblock content %}
|
||||
</main>
|
||||
{% endblock content_wrapper %}
|
||||
|
||||
{% block sidebar_wrapper %}
|
||||
<div class="col-md-3">
|
||||
{% block sidebar %}
|
||||
<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" width="150">
|
||||
</a>
|
||||
</section>
|
||||
|
||||
{% include 'availability' %}
|
||||
{% endblock sidebar %}
|
||||
</div>
|
||||
{% endblock sidebar_wrapper %}
|
||||
</div>{# .row #}
|
||||
</div>{# .container #}
|
||||
|
||||
<footer class="container">
|
||||
<p class="copyright">© 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' %}
|
||||
</footer>
|
||||
|
||||
<script src="{{ site.url }}/components/jquery/jquery.min.js"></script>
|
||||
<script src="{{ site.url }}/components/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="{{ site.url }}/components/highlightjs/highlight.pack.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
{% block scripts %}{% endblock scripts %}
|
||||
|
||||
{% if page.tweets is defined and page.tweets == true %}
|
||||
<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');
|
||||
|
||||
ga('create', '{{ site.google_analytics_tracking_id }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
48
source/themes/opdavies/oliverdavies/_layouts/post.twig
Normal file
48
source/themes/opdavies/oliverdavies/_layouts/post.twig
Normal file
|
@ -0,0 +1,48 @@
|
|||
{% extends 'default.twig' %}
|
||||
|
||||
{% block body_classes 'page--blog page--blog__post' %}
|
||||
|
||||
{% block content_wrapper %}
|
||||
<main class="col-md-10">
|
||||
{% include 'post_header' %}
|
||||
|
||||
{% block content %}{% endblock content %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
<div class="about-author">
|
||||
<h2>About the Author</h2>
|
||||
|
||||
<img src="{{ site.gravatar.url }}?s=50" alt="Picture of Oliver" class="img-circle">
|
||||
|
||||
<p><a href="{{ site.url }}">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>
|
||||
|
||||
{% 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>
|
||||
{% endblock content_wrapper %}
|
|
@ -0,0 +1,27 @@
|
|||
<div class="availability">
|
||||
<h2>Availability</h2>
|
||||
|
||||
<div class="content">
|
||||
{% 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 class="availability__{{ data.available }}">{{ text }}.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
12
source/themes/opdavies/oliverdavies/_partials/meetups.twig
Normal file
12
source/themes/opdavies/oliverdavies/_partials/meetups.twig
Normal file
|
@ -0,0 +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>
|
||||
</div>
|
37
source/themes/opdavies/oliverdavies/_partials/og.twig
Normal file
37
source/themes/opdavies/oliverdavies/_partials/og.twig
Normal file
|
@ -0,0 +1,37 @@
|
|||
{% if og.title %}
|
||||
<meta property="og:title" content="{{ og.title|raw }}"/>
|
||||
{% endif %}
|
||||
|
||||
{% if og.description %}
|
||||
<meta property="og:description" content="{{ og.description|raw }}"/>
|
||||
{% endif %}
|
||||
|
||||
{% if 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 %}
|
||||
{% 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"/>
|
||||
{% endif %}
|
|
@ -0,0 +1,4 @@
|
|||
{% set title_tag = title_tag|default('h1') %}
|
||||
<{{ title_tag }}>{{ page.title }}</{{ title_tag }}>
|
||||
|
||||
<p class="posted">Posted: {{ page.date|date('jS F Y') }}</p>
|
|
@ -0,0 +1 @@
|
|||
<script async class="speakerdeck-embed" data-id="{{ data_id }}" data-ratio="1.29456384323641" src="//speakerdeck.com/assets/embed.js"></script>
|
|
@ -0,0 +1,9 @@
|
|||
<li>
|
||||
<strong>{% spaceless %}
|
||||
{% if talk.fuzzy_date %}
|
||||
{{ talk.date|date('F') }}
|
||||
{% else %}
|
||||
{{ talk.date|date('jS F') }}
|
||||
{% endif %}
|
||||
{% endspaceless %}</strong> - {{ talk.location|raw }} - {{ talk.title|raw }}
|
||||
</li>
|
13
source/themes/opdavies/oliverdavies/_partials/title.twig
Normal file
13
source/themes/opdavies/oliverdavies/_partials/title.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% spaceless %}<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 %}
|
||||
</title>{% endspaceless %}
|
5
source/themes/opdavies/oliverdavies/_partials/tweet.twig
Normal file
5
source/themes/opdavies/oliverdavies/_partials/tweet.twig
Normal file
|
@ -0,0 +1,5 @@
|
|||
<p>
|
||||
<blockquote class="twitter-tweet" data-cards="hidden" lang="en">
|
||||
{{ content|raw }}
|
||||
</blockquote>
|
||||
</p>
|
Loading…
Add table
Add a link
Reference in a new issue