Added banner post option to put an image on post top.

This commit is contained in:
Dominique Da Silva 2015-05-27 13:34:55 +02:00
parent 514da72aa4
commit 760fbf8125
2 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,8 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<div class="article-inner">
<% if (post.banner){ %>
<%- partial('post/banner') %>
<% } %>
<%- partial('post/gallery') %>
<% if (post.link || post.title){ %>
<header class="article-header">

View File

@ -0,0 +1,10 @@
<% if (post.link){ %>
<a href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><img src="<%- post.banner %>" class="article-banner"></a>
<% } else if (post.title){ %>
<% if (index){ %>
<a href="<%- url_for(post.path) %>" itemprop="url"><img src="<%- post.banner %>" class="article-banner"></a>
<% } else { %>
<img src="<%- post.banner %>" class="article-banner">
<% } %>
<% } %>