Update layouts and partials
This commit is contained in:
parent
fb768a9c9a
commit
f08bf1e056
53
source/_layouts/base.html.twig
Normal file
53
source/_layouts/base.html.twig
Normal file
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-GB">
|
||||
<head>
|
||||
<title>
|
||||
{% if page.title is defined and page.url != '/.' %}
|
||||
{{ page.title }} |
|
||||
{% endif %}
|
||||
{{ site.title }} - {{ site.subtitle }}
|
||||
</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{% if page.meta.description %}
|
||||
<meta name="description" content="{{ page.meta.description|e('html') }}">
|
||||
{% endif %}
|
||||
|
||||
{% include 'og' with { og: page.meta.og } %}
|
||||
|
||||
<link rel="stylesheet" href="/build/css/site.css">
|
||||
{% block stylesheets %}{% endblock %}
|
||||
|
||||
{% for size in site.apple_touch_icon_sizes %}
|
||||
<link rel="apple-touch-icon" href="{{ site.favicon.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
|
||||
{% endfor %}
|
||||
|
||||
{% for size in site.favicon_sizes %}
|
||||
<link rel="icon" href="{{ site.favicon.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body class="text-black text-sm leading-normal">
|
||||
{% block body %}{% endblock %}
|
||||
|
||||
<script>
|
||||
document.querySelector('.nav-toggle').onclick = function() {
|
||||
document.querySelector('.navbar nav').classList.toggle('hidden').toggle('block');
|
||||
return false;
|
||||
};
|
||||
</script>
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{% if page.has_tweets %}
|
||||
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/build/js/all.js"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
|
@ -1,37 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-GB">
|
||||
<head>
|
||||
<title>
|
||||
{% if page.title is defined and page.url != '/.' %}
|
||||
{{ page.title }} |
|
||||
{% endif %}
|
||||
{{ site.title }} - {{ site.subtitle }}
|
||||
</title>
|
||||
{% extends 'base' %}
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{% if page.meta.description %}
|
||||
<meta name="description" content="{{ page.meta.description|e('html') }}">
|
||||
{% endif %}
|
||||
|
||||
{% include 'og' with { og: page.meta.og } %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ site.url }}/build/css/site.css">
|
||||
{% endblock %}
|
||||
|
||||
{% for size in site.apple_touch_icon_sizes %}
|
||||
<link rel="apple-touch-icon" href="{{ site.favicon.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
|
||||
{% endfor %}
|
||||
|
||||
{% for size in site.favicon_sizes %}
|
||||
<link rel="icon" href="{{ site.favicon.url }}?s={{ size }}" sizes="{{ size }}x{{ size }}">
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body class="text-black text-sm leading-normal">
|
||||
{% include 'navbar.html.twig' %}
|
||||
{% block body %}
|
||||
{% include 'navbar' %}
|
||||
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="md:flex -mx-4">
|
||||
|
@ -58,48 +28,7 @@
|
|||
Built with <a class="link" href="https://sculpin.io">Sculpin</a> and <a class="link" href="https://tailwindcss.com">Tailwind CSS</a>.
|
||||
</p>
|
||||
|
||||
<div class="mt-2">
|
||||
<h2 class="mb-2">Things that I organise</h2>
|
||||
|
||||
<ul class="list-reset inline-flex">
|
||||
{% include 'meetup.html.twig' with {
|
||||
name: 'Drupal Bristol',
|
||||
logo: 'drupal-bristol.jpeg',
|
||||
url: 'http://www.drupalbristol.org.uk',
|
||||
} %}
|
||||
|
||||
{% include 'meetup.html.twig' with {
|
||||
name: 'DrupalCamp Bristol',
|
||||
logo: 'drupalcamp-bristol.png',
|
||||
url: 'http://www.drupalcampbristol.co.uk',
|
||||
} %}
|
||||
|
||||
{% include 'meetup.html.twig' with {
|
||||
name: 'PHPSW',
|
||||
logo: 'phpsw.jpeg',
|
||||
url: 'http://phpsw.uk',
|
||||
} %}
|
||||
</ul>
|
||||
</div>
|
||||
{% include 'meetups' %}
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.querySelector('.nav-toggle').onclick = function() {
|
||||
document.querySelector('.navbar nav').classList.toggle('hidden').toggle('block');
|
||||
return false;
|
||||
};
|
||||
</script>
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{% if page.has_tweets %}
|
||||
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/build/js/all.js"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
|
23
source/_partials/meetups.html.twig
Normal file
23
source/_partials/meetups.html.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
<div class="mt-2">
|
||||
<h2 class="mb-2">Things that I organise</h2>
|
||||
|
||||
<ul class="list-reset inline-flex">
|
||||
{% include 'meetup.html.twig' with {
|
||||
name: 'Drupal Bristol',
|
||||
logo: 'drupal-bristol.jpeg',
|
||||
url: 'http://www.drupalbristol.org.uk',
|
||||
} %}
|
||||
|
||||
{% include 'meetup.html.twig' with {
|
||||
name: 'DrupalCamp Bristol',
|
||||
logo: 'drupalcamp-bristol.png',
|
||||
url: 'http://www.drupalcampbristol.co.uk',
|
||||
} %}
|
||||
|
||||
{% include 'meetup.html.twig' with {
|
||||
name: 'PHPSW',
|
||||
logo: 'phpsw.jpeg',
|
||||
url: 'http://phpsw.uk',
|
||||
} %}
|
||||
</ul>
|
||||
</div>
|
Loading…
Reference in a new issue