From 7dea54fb6e03afb6696c8a36e3af8bb27770eab3 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 3 Oct 2016 17:13:41 +0200 Subject: Better rendering of the news feed the various places it's used. --- blog/_includes/news.html | 6 +++++- blog/_includes/post-excerpt.html | 7 +++++-- blog/_layouts/default.html | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/blog/_includes/news.html b/blog/_includes/news.html index a8daaeb..e9f6138 100644 --- a/blog/_includes/news.html +++ b/blog/_includes/news.html @@ -2,7 +2,11 @@

{% t home.latest_news %}

{% for p in site.posts limit: 5 %} {% if p != page %} - {% include post-excerpt.html post=p %} + {% if include.sidebar %} + {% include post-excerpt.html post=p sidebar=true %} + {% else %} + {% include post-excerpt.html post=p %} + {% endif %} {% endif %} {% endfor %} diff --git a/blog/_includes/post-excerpt.html b/blog/_includes/post-excerpt.html index 52704e7..e87b12b 100644 --- a/blog/_includes/post-excerpt.html +++ b/blog/_includes/post-excerpt.html @@ -3,10 +3,13 @@ {% include post-header.html post = post %}
{% if post.page-image %} - {{ post.page-image | img: "magick:resize:290x" }} + {% if include.sidebar %} + {{ post.page-image | img: "magick:resize:290x" }} + {% else %} + {{ post.page-image | img: "magick:resize:290x class:right" }} + {% endif %} {% endif %} {{ post.excerpt }} -

{% t global.read_more %}

diff --git a/blog/_layouts/default.html b/blog/_layouts/default.html index 2daf763..2488ce3 100644 --- a/blog/_layouts/default.html +++ b/blog/_layouts/default.html @@ -11,7 +11,7 @@ {{ content }}
- {% include news.html %} + {% include news.html sidebar=true %} {% if site.links %}