fix(blog): clean up the layout
This commit is contained in:
parent
d228f390fa
commit
c1e7e28840
9 changed files with 41 additions and 42 deletions
|
@ -7,8 +7,8 @@
|
||||||
</header>
|
</header>
|
||||||
<% } %>
|
<% } %>
|
||||||
<div class="article-meta">
|
<div class="article-meta">
|
||||||
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
|
|
||||||
<%- partial('post/category') %>
|
<%- partial('post/category') %>
|
||||||
|
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="article-entry" itemprop="articleBody">
|
<div class="article-entry" itemprop="articleBody">
|
||||||
<% if (post.excerpt && index){ %>
|
<% if (post.excerpt && index){ %>
|
||||||
|
@ -22,18 +22,19 @@
|
||||||
<%- post.content %>
|
<%- post.content %>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<footer class="article-footer">
|
</div>
|
||||||
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><%= __('share') %></a>
|
</article>
|
||||||
|
|
||||||
|
<footer class="article-footer">
|
||||||
<% if (post.comments && config.disqus_shortname){ %>
|
<% if (post.comments && config.disqus_shortname){ %>
|
||||||
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('comment') %></a>
|
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('comment') %></a>
|
||||||
<% } %>
|
<% } %>
|
||||||
<%- partial('post/tag') %>
|
<%- partial('post/tag') %>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
|
||||||
<% if (!index){ %>
|
<% if (!index){ %>
|
||||||
<%- partial('post/nav') %>
|
<%- partial('post/nav') %>
|
||||||
<% } %>
|
<% } %>
|
||||||
</article>
|
|
||||||
|
|
||||||
<% if (!index && post.comments && config.disqus_shortname){ %>
|
<% if (!index && post.comments && config.disqus_shortname){ %>
|
||||||
<section id="comments">
|
<section id="comments">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
show_count: false,
|
show_count: false,
|
||||||
class: 'article-category',
|
class: 'article-category',
|
||||||
style: 'none',
|
style: 'none',
|
||||||
separator: '►'
|
separator: ''
|
||||||
}) %>
|
}) %>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
|
@ -1,3 +1 @@
|
||||||
<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
|
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><em><%= date(post.date, date_format) %></em></time>
|
||||||
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
|
|
||||||
</a>
|
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
<% if (post.prev || post.next){ %>
|
<% if (post.prev || post.next){ %>
|
||||||
<nav id="article-nav">
|
<nav class="article-nav">
|
||||||
|
<div class="article-prev">
|
||||||
<% if (post.prev){ %>
|
<% if (post.prev){ %>
|
||||||
<a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
|
<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){ %>
|
<% if (post.prev.title){ %>
|
||||||
<%= post.prev.title %>
|
<%= post.prev.title %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
(no title)
|
(no title)
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
</div>
|
||||||
|
<div class="article-next">
|
||||||
<% if (post.next){ %>
|
<% if (post.next){ %>
|
||||||
<a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
|
<a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
|
||||||
<strong class="article-nav-caption"><%= __('older') %></strong>
|
<%= post.next.title %>
|
||||||
<div class="article-nav-title"><%= post.next.title %></div>
|
|
||||||
</a>
|
</a>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<% } %>
|
<% } %>
|
|
@ -1,9 +1,9 @@
|
||||||
<% if (site.posts.length){ %>
|
<% if (site.posts.length){ %>
|
||||||
<div class="card card-primary">
|
<div class="card card-info">
|
||||||
<div class="card-header"><%= __('archive_a') %></div>
|
<div class="card-header"><%= __('archive_a') %></div>
|
||||||
<div class="card-menu">
|
<div class="card-menu">
|
||||||
<%- list_archives({show_count: theme.show_count,
|
<%- 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>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% if (site.categories.length){ %>
|
<% if (site.categories.length){ %>
|
||||||
<div class="card card-primary">
|
<div class="card card-info">
|
||||||
<div class="card-header"><%= __('categories') %></div>
|
<div class="card-header"><%= __('categories') %></div>
|
||||||
<div class="card-menu">
|
<div class="card-menu">
|
||||||
<%- list_categories({show_count: theme.show_count}) %>
|
<%- list_categories({show_count: theme.show_count}) %>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% if (site.posts.length){ %>
|
<% if (site.posts.length){ %>
|
||||||
<div class="card card-primary">
|
<div class="card card-info">
|
||||||
<div class="card-header"><%= __('recent_posts') %></div>
|
<div class="card-header"><%= __('recent_posts') %></div>
|
||||||
<div class="card-menu">
|
<div class="card-menu">
|
||||||
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
|
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% if (site.tags.length){ %>
|
<% if (site.tags.length){ %>
|
||||||
<div class="card card-primary">
|
<div class="card card-info">
|
||||||
<h3 class="card-header"><%= __('tags') %></h3>
|
<h3 class="card-header"><%= __('tags') %></h3>
|
||||||
<div class="card-menu">
|
<div class="card-menu">
|
||||||
<%- list_tags({show_count: theme.show_count}) %>
|
<%- list_tags({show_count: theme.show_count}) %>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% if (site.tags.length){ %>
|
<% if (site.tags.length){ %>
|
||||||
<div class="card card-primary">
|
<div class="card card-info">
|
||||||
<h3 class="card-header"><%= __('tagcloud') %></h3>
|
<h3 class="card-header"><%= __('tagcloud') %></h3>
|
||||||
<div class="card-body tagcloud">
|
<div class="card-body tagcloud">
|
||||||
<%- tagcloud() %>
|
<%- tagcloud() %>
|
||||||
|
|
Reference in a new issue