Add intro image block

This commit is contained in:
Oliver Davies 2017-08-06 19:31:59 +01:00
parent 4bd21ddfc7
commit 451789c1a2
6 changed files with 22 additions and 22 deletions

View file

@ -0,0 +1,5 @@
{% if page.blocks.intro_image %}
<div class="has-text-centered">
{{ page.blocks.intro_image|raw }}
</div>
{% endif %}

View file

@ -2,6 +2,7 @@
{% block content_wrapper %}
{% include 'post/header' %}
{% include 'post/intro-image' %}
{% block content %}{% endblock %}

View file

@ -15,11 +15,13 @@ meta:
type: website
slug: drupalcamp-bristol-early-bird-tickets-sessions-sponsors
---
{% block excerpt %}
{% block intro_image %}
<div class="has-text-centered">
<img src="/assets/images/blog/drupalcamp-bristol-17-logo.jpg" alt="DrupalCamp Bristol 2017 logo">
</div>
{% endblock %}
{% block excerpt %}
In less than two months time, [DrupalCamp Bristol][0] will be back for our third year! (July seems to come around quicker each year). This is this years schedule and venues:
+ 30th June - CXO (Business) day - [Watershed][1]
@ -28,8 +30,6 @@ In less than two months time, [DrupalCamp Bristol][0] will be back for our third
{% endblock %}
{% block content %}
<img src="/assets/images/blog/drupalcamp-bristol-17-logo.jpg" alt="DrupalCamp Bristol 2017 logo" class="is-centered">
In less than two months time, [DrupalCamp Bristol][0] will be back for our third year! (July seems to come around quicker each year). This is this years schedule and venues:
+ 30th June - CXO (Business) day - [Watershed][1]

View file

@ -4,15 +4,15 @@ tags:
- twitter
- php
---
{% block excerpt %}
{% block intro_image %}
<img src="/assets/images/blog/drupal-meetups-twitterbot.png" alt="" class="is-centered">
{% endblock %}
{% block excerpt %}
The [Drupal Meetups Twitterbot][0] is a small project that I worked on a few months ago, but hadn't got around to promoting yet. Its intention is to provide [one Twitter account][1] where people can get the up to date news from various Drupal meetups.
{% endblock %}
{% block content %}
<img src="/assets/images/blog/drupal-meetups-twitterbot.png" alt="" class="is-centered">
The [Drupal Meetups Twitterbot][0] is a small project that I worked on a few months ago, but hadn't got around to promoting yet. Its intention is to provide [one Twitter account][1] where people can get the up to date news from various Drupal meetups.
It works by having a whitelist of [Twitter accounts and hashtags][2] to search for, uses [Codebird][3] to query the Twitter API and retweets any matching tweets on a scheduled basis.

View file

@ -10,29 +10,21 @@ meta:
height: 200
width: 451
---
{% block excerpt %}
<div class="has-text-centered">
<img
src="/assets/images/blog/jackson-octocat.png"
alt=""
style="margin-bottom: 20px"
>
</div>
{% block intro_image %}
<img
src="/assets/images/blog/jackson-octocat.png"
alt=""
class="mb-2"
>
{% endblock %}
{% block excerpt %}
Earlier this week I moved this site from my personal Linode server to [GitHub Pages][0].
This made sense as I already kept the source code in [on GitHub][1], the issue was that GitHub Pages doesnt know how to dynamically parse and generate a Sculpin site like it does with some other static site generators. It can though parse and serve HTML files, which is what Sculpin generates. Its just a case of how those files are added to GitHub.
{% endblock %}
{% block content %}
<div class="has-text-centered">
<img
src="/assets/images/blog/jackson-octocat.png"
alt=""
style="margin-bottom: 20px"
>
</div>
Earlier this week I moved this site from my personal Linode server to [GitHub Pages][0].
This made sense as I already kept the source code in [on GitHub][1], the issue was that GitHub Pages doesnt know how to dynamically parse and generate a Sculpin site like it does with some other static site generators. It can though parse and serve HTML files, which is what Sculpin generates. Its just a case of how those files are added to GitHub.

View file

@ -17,6 +17,8 @@ use: [posts]
title_tag: 'h2'
}) }}
{% include 'post/intro-image' with { page: post } %}
{% if post.blocks.excerpt %}
{{ post.blocks.excerpt|raw }}
{% else %}