Added thumbnail support for blog posts (#1371)
Implemented #425 based on given code.  --------- Signed-off-by: George Araujo <george.gcac@gmail.com>
This commit is contained in:
parent
ecfb9aad99
commit
d98eafb424
|
|
@ -5,6 +5,7 @@ date: 2015-05-15 21:01:00
|
||||||
description: this is what included images could look like
|
description: this is what included images could look like
|
||||||
tags: formatting images
|
tags: formatting images
|
||||||
categories: sample-posts
|
categories: sample-posts
|
||||||
|
thumbnail: assets/img/9.jpg
|
||||||
---
|
---
|
||||||
This is an example post with image galleries.
|
This is an example post with image galleries.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,11 @@ pagination:
|
||||||
{% assign categories = post.categories | join: "" %}
|
{% assign categories = post.categories | join: "" %}
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<h3>
|
{%- if post.thumbnail -%}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9">
|
||||||
|
{%- endif -%}
|
||||||
|
<h3>
|
||||||
{% if post.redirect == blank %}
|
{% if post.redirect == blank %}
|
||||||
<a class="post-title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
<a class="post-title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
@ -95,6 +99,13 @@ pagination:
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
{%- if post.thumbnail -%}
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<img class="card-img" src="{{post.thumbnail | relative_url}}" style="object-fit: cover; height: 90%" alt="image">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue