update
This commit is contained in:
parent
e392b66506
commit
0835ab6716
|
@ -139,7 +139,7 @@ plugins:
|
|||
|
||||
# https://scrollrevealjs.org/api/reveal.html
|
||||
scrollreveal:
|
||||
enable: true
|
||||
enable: #true
|
||||
js: https://cdn.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
|
||||
distance: 8px
|
||||
duration: 500 # ms
|
||||
|
|
|
@ -4,11 +4,9 @@ function layoutDiv() {
|
|||
var title = __('meta.read_next');
|
||||
var title_prev = __('meta.read_prev');
|
||||
if (page.layout == 'post') {
|
||||
prev = page.next;
|
||||
next = page.prev;
|
||||
title_prev = __('meta.older');
|
||||
prev = page.prev;
|
||||
next = page.next;
|
||||
} else if (page.layout == 'wiki' && page.wiki && page.wiki.length > 0) {
|
||||
title_prev = __('meta.read_prev');
|
||||
var wikis = [];
|
||||
wikis = site.pages.filter(function (p) {
|
||||
if (p.layout == 'wiki' && p.wiki && p.wiki == page.wiki) {
|
||||
|
|
|
@ -1,30 +1,39 @@
|
|||
<div class='widget-wrap' id='recent'>
|
||||
<div class='widget-header h4 dis-select'>
|
||||
<span class='name'><%- __('meta.recent_update') %></span>
|
||||
<% if (item.rss) { %>
|
||||
<a class='cap-action' id='rss' title='Subscribe' href='<%- item.rss %>'>
|
||||
<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8938"><path d="M800.966 947.251c0-404.522-320.872-732.448-716.69-732.448V62.785c477.972 0 865.44 395.987 865.44 884.466h-148.75z m-162.273 0h-148.74c0-228.98-181.628-414.598-405.678-414.598v-152.01c306.205 0 554.418 253.68 554.418 566.608z m-446.24-221.12c59.748 0 108.189 49.503 108.189 110.557 0 61.063-48.44 110.563-108.188 110.563-59.747 0-108.18-49.5-108.18-110.563 0-61.054 48.433-110.556 108.18-110.556z" p-id="8939"></path></svg>
|
||||
</a>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class='widget-body fs14'>
|
||||
<%
|
||||
var arr = page.menu_id == 'wiki' ? site.pages.filter(function(p){
|
||||
return p.layout == 'wiki' && p.title && p.title.length > 0;
|
||||
<%
|
||||
function layoutDiv() {
|
||||
var el = '<div class="widget-wrap" id="recent">';
|
||||
// header
|
||||
el += '<div class="widget-header h4 dis-select">';
|
||||
el += '<span class="name">' + __("meta.recent_update") + '</span>';
|
||||
if (item.rss) {
|
||||
el += '<a class="cap-action" id="rss" title="Subscribe" href="' + item.rss + '">';
|
||||
el += '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8938"><path d="M800.966 947.251c0-404.522-320.872-732.448-716.69-732.448V62.785c477.972 0 865.44 395.987 865.44 884.466h-148.75z m-162.273 0h-148.74c0-228.98-181.628-414.598-405.678-414.598v-152.01c306.205 0 554.418 253.68 554.418 566.608z m-446.24-221.12c59.748 0 108.189 49.503 108.189 110.557 0 61.063-48.44 110.563-108.188 110.563-59.747 0-108.18-49.5-108.18-110.563 0-61.054 48.433-110.556 108.18-110.556z" p-id="8939"></path></svg>';
|
||||
el += '</a>';
|
||||
}
|
||||
el += '</div>';
|
||||
// body
|
||||
var arr = page.menu_id == "wiki" ? site.pages.filter(function(p){
|
||||
return p.layout == "wiki" && p.title && p.title.length > 0;
|
||||
}) : site.posts.filter(function(p){
|
||||
return p.title && p.title.length > 0;
|
||||
});
|
||||
%>
|
||||
<% arr.sort('updated', -1).limit(item.limit).each(function(post){ %>
|
||||
<div class='post-title'>
|
||||
<a href="<%= url_for(post.link || post.path) %>">
|
||||
<% if (post.wiki && (post.title.toUpperCase().includes(post.wiki.toUpperCase()) == false)) { %>
|
||||
<%- post.wiki ? post.wiki + ': ' : '' %><%- post.title %>
|
||||
<% } else { %>
|
||||
<%- post.title %>
|
||||
<% } %>
|
||||
</a>
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
</div>
|
||||
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="cap">';
|
||||
el += __("meta.updated") + ' ' + '<time>' + date(post.updated, config.date_format) + '</time>';
|
||||
el += '</div>';
|
||||
el += '<a href="' + url_for(post.link || post.path) + '">';
|
||||
if (post.wiki && (post.title.toUpperCase().includes(post.wiki.toUpperCase()) == false)) {
|
||||
el += post.wiki + ': ';
|
||||
}
|
||||
el += post.title;
|
||||
el += '</a>';
|
||||
el += '</div>';
|
||||
el += '';
|
||||
});
|
||||
el += '</div>';
|
||||
el += '</div>';
|
||||
return el;
|
||||
}
|
||||
%>
|
||||
<%- layoutDiv() %>
|
||||
|
|
|
@ -47,9 +47,15 @@ h6
|
|||
|
||||
.widgets
|
||||
.post-title
|
||||
margin: 0.5rem 0
|
||||
margin: 0.75rem 0
|
||||
line-height: 1.2
|
||||
display: block
|
||||
txt-ellipsis()
|
||||
.cap
|
||||
margin-bottom: 2px
|
||||
opacity: 0.5
|
||||
a
|
||||
color: inherit
|
||||
font-weight: 500
|
||||
&:hover
|
||||
color: $color-hover
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@require('_defines/const')
|
||||
|
||||
// 通用主题色
|
||||
$color-theme = #ff7043
|
||||
$color-theme = #1BCDFC
|
||||
$color-link = #2196f3
|
||||
$color-button = #1BCDFC
|
||||
$color-hover = #ff5722
|
||||
|
@ -13,8 +13,8 @@ $color-cat-hover = darken($color-cat, 20)
|
|||
// 浅色页面
|
||||
$c-site-bg-light = #f8f8f8
|
||||
$c-block-light = #f2f2f2
|
||||
$c-title-light = #111
|
||||
$c-text-light = #333
|
||||
$c-title-light = #000
|
||||
$c-text-light = #222
|
||||
$c-card-light = white
|
||||
|
||||
// 深色页面
|
||||
|
|
|
@ -69,7 +69,7 @@ article.md code
|
|||
color: $color-inlinecode
|
||||
font-family: $ff-code
|
||||
word-break: break-all
|
||||
font-size: $fs-p
|
||||
font-size: inherit
|
||||
background: var(--block)
|
||||
padding: 2px
|
||||
border-radius: 2px
|
||||
|
|
Loading…
Reference in New Issue