Blog sidebar #109

This commit is contained in:
Artur Paikin 2016-07-28 13:21:03 -04:00
parent 25c2c4b66f
commit 2ea46f49f5
3 changed files with 21 additions and 3 deletions

View file

@ -1,10 +1,26 @@
<div class="Sidebar js-Sidebar is-blog">
<ul class="main-menu">
<%- partial('partials/main_menu') %>
<%- partial('partials/main_menu') %>
</ul>
<div class="list">
<h2>
Recent Posts
<a href="/atom.xml" target="_blank" style="vertical-align: middle; margin-left: 5px">
<img src="/images/feed.png" style="width:15px;height:15px">
</a>
</h2>
<ul>
<% site.posts.sort('date', -1).limit(10).each(function (post) { %>
<li>
<a href="/<%- post.path %>" class="sidebar-link<%- page.title === post.title ? ' current' : '' %>"><%- post.title %></a>
</li>
<% }) %>
</ul>
<%- partial('partials/social') %>
</div>
</div>
<div class="Content js-Content">
<div class="Content js-Content with-sidebar">
<h1 style="text-align: center; margin-bottom:.5em">The <%- config.title %> Blog</h1>
<% site.posts.sort('date', -1).each(function (post) { %>
<div class="post">

View file

@ -9,7 +9,7 @@
<img src="/images/feed.png" style="width:15px;height:15px">
</a>
</h2>
<ul style="padding:0">
<ul>
<% site.posts.sort('date', -1).limit(10).each(function (post) { %>
<li>
<a href="/<%- post.path %>" class="sidebar-link<%- page.title === post.title ? ' current' : '' %>"><%- post.title %></a>

View file

@ -52,6 +52,8 @@
padding-left: 1em;
}
&.is-blog ul { padding-left: 0; }
li {
margin-bottom: 0.6em;
}