add sidebar thumbnail option
This commit is contained in:
parent
234771d06c
commit
a8442f2447
|
@ -16,6 +16,7 @@ widgets:
|
|||
- tag
|
||||
- tagcloud
|
||||
- archive
|
||||
thumbnail: true
|
||||
|
||||
# Contacts
|
||||
contacts:
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
<div class="widget-wrap">
|
||||
<h3 class="widget-title"><%= __('widget.recents') %></h3>
|
||||
<div class="widget">
|
||||
<ul id="recent-post">
|
||||
<ul id="recent-post" class="<%= (theme.thumbnail?'':'no-thumbnail') %>">
|
||||
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
|
||||
<li>
|
||||
<% if(theme.thumbnail == true) { %>
|
||||
<div class="item-thumbnail">
|
||||
<%- partial('../_partial/post/thumbnail.ejs', {post: post}) %>
|
||||
</div>
|
||||
<% } %>
|
||||
<div class="item-inner">
|
||||
<p class="item-category"><%- list_categories(post.categories, {show_count: false, depth:2, class: 'article-category', style: 'none', separator: '<i class="fa fa-angle-right"></i>'}) %></p>
|
||||
<p class="item-title"><a href="<%- url_for((post.link?post.link:post.path)) %>" class="title"><%= post.title %></a></p>
|
||||
|
|
|
@ -110,6 +110,10 @@
|
|||
li
|
||||
clearfix()
|
||||
padding: 10px 0 10px 94px
|
||||
&.no-thumbnail
|
||||
li
|
||||
padding: 10px 0px
|
||||
li
|
||||
.item-thumbnail
|
||||
opacity: 1
|
||||
float: left
|
||||
|
|
Loading…
Reference in New Issue