recent update

This commit is contained in:
xaoxuu 2021-06-26 12:39:29 +08:00
parent 9c28748064
commit bef1c638cd
2 changed files with 28 additions and 3 deletions

View File

@ -18,17 +18,18 @@ function layoutDiv() {
});
el += '<div class="widget-body fs14">';
arr.sort("updated", -1).limit(item.limit).each(function(post) {
el += '<div class="post-title reveal">';
el += '<div class="line"></div>'
el += '<a class="reveal" href="' + url_for(post.link || post.path) + '">';
el += '<div class="cap">';
el += '<time>' + date(post.updated, config.date_format) + '</time>';
el += '</div>';
el += '<a href="' + url_for(post.link || post.path) + '">';
el += '<span class="title">';
if (post.wiki && (post.title.toUpperCase().includes(post.wiki.toUpperCase()) == false)) {
el += post.wiki + ': ';
}
el += post.title;
el += '</span>';
el += '</a>';
el += '</div>';
el += '';
});
el += '</div>';

View File

@ -140,3 +140,27 @@ nav.menu
margin-bottom: 0.5em
>a:hover
text-decoration: underline
.widget-wrap#recent .widget-body
border: 1px solid var(--block-border)
border-radius: $border-block
background: var(--block)
overflow: hidden
.line
margin: 0
height: 1px
background: var(--block-border)
&+.line,&:first-child,&:last-child
display: none
>a
padding 0.5rem
display: block
line-height: 1.2
color: var(--text-p2)
font-weight: 500
div.cap
margin-bottom: 0.25rem
color: var(--text-p4)
&:hover
color: $color-hover
background: var(--card)