improvement(blog): basic article theming

This commit is contained in:
Kazhnuz 2020-03-22 18:53:55 +01:00
parent f6cb84cfc6
commit 9ef7721b8c
2 changed files with 7 additions and 21 deletions

View File

@ -1,8 +1,4 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<div class="article-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
<%- partial('post/category') %>
</div>
<article id="<%= post.layout %>-<%= post.slug %>" class="card card-primary article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<div class="article-inner">
<%- partial('post/gallery') %>
<% if (post.link || post.title){ %>
@ -10,6 +6,10 @@
<%- partial('post/title', {class_name: 'article-title'}) %>
</header>
<% } %>
<div class="article-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
<%- partial('post/category') %>
</div>
<div class="article-entry" itemprop="articleBody">
<% if (post.excerpt && index){ %>
<%- post.excerpt %>
@ -41,4 +41,4 @@
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</section>
<% } %>
<% } %>

View File

@ -1,15 +1 @@
<% if (post.link){ %>
<h1 itemprop="name">
<a class="<%= class_name %>" href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a>
</h1>
<% } else if (post.title){ %>
<% if (index){ %>
<h1 itemprop="name">
<a class="<%= class_name %>" href="<%- url_for(post.path) %>"><%= post.title %></a>
</h1>
<% } else { %>
<h1 class="<%= class_name %>" itemprop="name">
<%= post.title %>
</h1>
<% } %>
<% } %>
<div class="card-header"><h1><%= post.title %></h1></div>