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,19 +22,20 @@
<%- post.content %>
<% } %>
</div>
<footer class="article-footer">
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><%= __('share') %></a>
<% 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){ %>
<%- partial('post/nav') %>
<% } %>
</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>
<% if (!index){ %>
<%- partial('post/nav') %>
<% } %>
<% if (!index && post.comments && config.disqus_shortname){ %>
<section id="comments">
<div id="disqus_thread">

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">
<% 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>
<% } %>
<% 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>
</a>
<% } %>
<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">
<% if (post.prev.title){ %>
<%= post.prev.title %>
<% } else { %>
(no title)
<% } %>
</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">
<%= 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() %>