Add intro image block
This commit is contained in:
parent
4bd21ddfc7
commit
451789c1a2
5
source/_includes/post/intro-image.html.twig
Normal file
5
source/_includes/post/intro-image.html.twig
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% if page.blocks.intro_image %}
|
||||
<div class="has-text-centered">
|
||||
{{ page.blocks.intro_image|raw }}
|
||||
</div>
|
||||
{% endif %}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{% block content_wrapper %}
|
||||
{% include 'post/header' %}
|
||||
{% include 'post/intro-image' %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
|
|
|
@ -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 year’s 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 year’s schedule and venues:
|
||||
|
||||
+ 30th June - CXO (Business) day - [Watershed][1]
|
||||
|
|
|
@ -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. It’s 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. It’s 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.
|
||||
|
|
|
@ -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 doesn’t 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. It’s 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 doesn’t 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. It’s just a case of how those files are added to GitHub.
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Reference in a new issue