fix(blog): clean up the layout

This commit is contained in:
Kazhnuz 2020-03-23 18:02:51 +01:00
parent d228f390fa
commit c1e7e28840
9 changed files with 41 additions and 42 deletions

View file

@ -7,8 +7,8 @@
</header>
<% } %>
<div class="article-meta">
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
<%- partial('post/category') %>
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
</div>
<div class="article-entry" itemprop="articleBody">
<% if (post.excerpt && index){ %>
@ -22,18 +22,19 @@
<%- post.content %>
<% } %>
</div>
<footer class="article-footer">
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><%= __('share') %></a>
</div>
</article>
<footer class="article-footer">
<% if (post.comments && config.disqus_shortname){ %>
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('comment') %></a>
<% } %>
<%- partial('post/tag') %>
</footer>
</div>
<% if (!index){ %>
</footer>
<% if (!index){ %>
<%- partial('post/nav') %>
<% } %>
</article>
<% } %>
<% if (!index && post.comments && config.disqus_shortname){ %>
<section id="comments">

View file

@ -4,7 +4,7 @@
show_count: false,
class: 'article-category',
style: 'none',
separator: ''
separator: ''
}) %>
</div>
<% } %>

View file

@ -1,3 +1 @@
<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
</a>
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><em><%= date(post.date, date_format) %></em></time>

View file

@ -1,22 +1,22 @@
<% if (post.prev || post.next){ %>
<nav id="article-nav">
<nav class="article-nav">
<div class="article-prev">
<% if (post.prev){ %>
<a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
<strong class="article-nav-caption"><%= __('newer') %></strong>
<div class="article-nav-title">
<% if (post.prev.title){ %>
<%= post.prev.title %>
<% } else { %>
(no title)
<% } %>
</div>
</a>
<% } %>
</div>
<div class="article-next">
<% if (post.next){ %>
<a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
<strong class="article-nav-caption"><%= __('older') %></strong>
<div class="article-nav-title"><%= post.next.title %></div>
<%= post.next.title %>
</a>
<% } %>
</div>
</nav>
<% } %>

View file

@ -1,9 +1,9 @@
<% if (site.posts.length){ %>
<div class="card card-primary">
<div class="card card-info">
<div class="card-header"><%= __('archive_a') %></div>
<div class="card-menu">
<%- list_archives({show_count: theme.show_count,
type: theme.archive_type, style:"flat", class:"menu-element"}) %>
type: theme.archive_type, style:"list", class:"menu-element"}) %>
</div>
</div>
<% } %>

View file

@ -1,5 +1,5 @@
<% if (site.categories.length){ %>
<div class="card card-primary">
<div class="card card-info">
<div class="card-header"><%= __('categories') %></div>
<div class="card-menu">
<%- list_categories({show_count: theme.show_count}) %>

View file

@ -1,5 +1,5 @@
<% if (site.posts.length){ %>
<div class="card card-primary">
<div class="card card-info">
<div class="card-header"><%= __('recent_posts') %></div>
<div class="card-menu">
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>

View file

@ -1,5 +1,5 @@
<% if (site.tags.length){ %>
<div class="card card-primary">
<div class="card card-info">
<h3 class="card-header"><%= __('tags') %></h3>
<div class="card-menu">
<%- list_tags({show_count: theme.show_count}) %>

View file

@ -1,5 +1,5 @@
<% if (site.tags.length){ %>
<div class="card card-primary">
<div class="card card-info">
<h3 class="card-header"><%= __('tagcloud') %></h3>
<div class="card-body tagcloud">
<%- tagcloud() %>