improvement(blog): fix sidebar

Fix #4
This commit is contained in:
Kazhnuz 2020-03-09 20:56:59 +01:00
parent af41fef9d3
commit 35bda6258b
12 changed files with 85 additions and 86 deletions

View file

@ -119,30 +119,30 @@
<div class="widget-wrap">
<h3 class="widget-title">Archives</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/03/">mars 2020</a></li></ul>
<div class="card card-primary">
<div class="card-header">Archives</div>
<div class="card-menu">
<a class="menu-element-link" href="/blog/archives/2020/03/">mars 2020</a>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">Articles récents</h3>
<div class="widget">
<ul>
<div class="card card-primary">
<div class="card-header">Articles récents</div>
<div class="card-menu">
<li>
<a href="/blog/2020/03/08/hello-world/">Hello World</a>
</li>
<a class="menu-element" href="/blog/2020/03/08/hello-world/">
<span class="trim-that">Hello World</span>
</a>
</ul>
</div>
</div>
</div>

View file

@ -101,30 +101,30 @@
<div class="widget-wrap">
<h3 class="widget-title">Archives</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/03/">mars 2020</a></li></ul>
<div class="card card-primary">
<div class="card-header">Archives</div>
<div class="card-menu">
<a class="menu-element-link" href="/blog/archives/2020/03/">mars 2020</a>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">Articles récents</h3>
<div class="widget">
<ul>
<div class="card card-primary">
<div class="card-header">Articles récents</div>
<div class="card-menu">
<li>
<a href="/blog/2020/03/08/hello-world/">Hello World</a>
</li>
<a class="menu-element" href="/blog/2020/03/08/hello-world/">
<span class="trim-that">Hello World</span>
</a>
</ul>
</div>
</div>
</div>

View file

@ -101,30 +101,30 @@
<div class="widget-wrap">
<h3 class="widget-title">Archives</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/03/">mars 2020</a></li></ul>
<div class="card card-primary">
<div class="card-header">Archives</div>
<div class="card-menu">
<a class="menu-element-link" href="/blog/archives/2020/03/">mars 2020</a>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">Articles récents</h3>
<div class="widget">
<ul>
<div class="card card-primary">
<div class="card-header">Articles récents</div>
<div class="card-menu">
<li>
<a href="/blog/2020/03/08/hello-world/">Hello World</a>
</li>
<a class="menu-element" href="/blog/2020/03/08/hello-world/">
<span class="trim-that">Hello World</span>
</a>
</ul>
</div>
</div>
</div>

View file

@ -101,30 +101,30 @@
<div class="widget-wrap">
<h3 class="widget-title">Archives</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/03/">mars 2020</a></li></ul>
<div class="card card-primary">
<div class="card-header">Archives</div>
<div class="card-menu">
<a class="menu-element-link" href="/blog/archives/2020/03/">mars 2020</a>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">Articles récents</h3>
<div class="widget">
<ul>
<div class="card card-primary">
<div class="card-header">Articles récents</div>
<div class="card-menu">
<li>
<a href="/blog/2020/03/08/hello-world/">Hello World</a>
</li>
<a class="menu-element" href="/blog/2020/03/08/hello-world/">
<span class="trim-that">Hello World</span>
</a>
</ul>
</div>
</div>
</div>

24
dist/blog/index.html vendored
View file

@ -119,30 +119,30 @@
<div class="widget-wrap">
<h3 class="widget-title">Archives</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/03/">mars 2020</a></li></ul>
<div class="card card-primary">
<div class="card-header">Archives</div>
<div class="card-menu">
<a class="menu-element-link" href="/blog/archives/2020/03/">mars 2020</a>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">Articles récents</h3>
<div class="widget">
<ul>
<div class="card card-primary">
<div class="card-header">Articles récents</div>
<div class="card-menu">
<li>
<a href="/blog/2020/03/08/hello-world/">Hello World</a>
</li>
<a class="menu-element" href="/blog/2020/03/08/hello-world/">
<span class="trim-that">Hello World</span>
</a>
</ul>
</div>
</div>
</div>

4
dist/style.css vendored
View file

@ -880,7 +880,7 @@ ul.social {
.card-menu, .menu-menu {
display: flex;
flex-direction: column; }
.card-menu .menu-element, .menu-menu .menu-element {
.card-menu .menu-element, .card-menu .menu-element-link, .menu-menu .menu-element, .menu-menu .menu-element-link {
display: flex;
line-height: 1.5rem;
padding-right: 0.75rem;
@ -896,7 +896,7 @@ ul.social {
position: relative;
z-index: 1;
overflow: visible; }
.card-menu .menu-element:before, .menu-menu .menu-element:before {
.card-menu .menu-element:before, .card-menu .menu-element-link:before, .menu-menu .menu-element:before, .menu-menu .menu-element-link:before {
content: " ";
position: absolute;
top: 0;

View file

@ -1,8 +1,9 @@
<% if (site.posts.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('archive_a') %></h3>
<div class="widget">
<%- list_archives({show_count: theme.show_count, type: theme.archive_type}) %>
<div class="card card-primary">
<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"}) %>
</div>
</div>
<% } %>

View file

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

View file

@ -1,14 +1,12 @@
<% if (site.posts.length){ %>
<div class="widget-wrap">
<h3 class="widget-title"><%= __('recent_posts') %></h3>
<div class="widget">
<ul>
<div class="card card-primary">
<div class="card-header"><%= __('recent_posts') %></div>
<div class="card-menu">
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
<li>
<a href="<%- url_for(post.path) %>"><%= post.title || '(no title)' %></a>
</li>
<a class="menu-element" href="<%- url_for(post.path) %>">
<span class="trim-that"><%= post.title || '(no title)' %></span>
</a>
<% }) %>
</ul>
</div>
</div>
<% } %>

View file

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

View file

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

View file

@ -73,7 +73,7 @@ $card-smallpad: $lineheight_half;
&-menu {
display:flex;
flex-direction: column;
.menu-element {
.menu-element, .menu-element-link {
display:flex;
line-height:$lineheight;
padding-right:$lineheight_half;