update
This commit is contained in:
parent
e392b66506
commit
0835ab6716
|
@ -139,7 +139,7 @@ plugins:
|
||||||
|
|
||||||
# https://scrollrevealjs.org/api/reveal.html
|
# https://scrollrevealjs.org/api/reveal.html
|
||||||
scrollreveal:
|
scrollreveal:
|
||||||
enable: true
|
enable: #true
|
||||||
js: https://cdn.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
|
js: https://cdn.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
|
||||||
distance: 8px
|
distance: 8px
|
||||||
duration: 500 # ms
|
duration: 500 # ms
|
||||||
|
|
|
@ -4,11 +4,9 @@ function layoutDiv() {
|
||||||
var title = __('meta.read_next');
|
var title = __('meta.read_next');
|
||||||
var title_prev = __('meta.read_prev');
|
var title_prev = __('meta.read_prev');
|
||||||
if (page.layout == 'post') {
|
if (page.layout == 'post') {
|
||||||
prev = page.next;
|
prev = page.prev;
|
||||||
next = page.prev;
|
next = page.next;
|
||||||
title_prev = __('meta.older');
|
|
||||||
} else if (page.layout == 'wiki' && page.wiki && page.wiki.length > 0) {
|
} else if (page.layout == 'wiki' && page.wiki && page.wiki.length > 0) {
|
||||||
title_prev = __('meta.read_prev');
|
|
||||||
var wikis = [];
|
var wikis = [];
|
||||||
wikis = site.pages.filter(function (p) {
|
wikis = site.pages.filter(function (p) {
|
||||||
if (p.layout == 'wiki' && p.wiki && p.wiki == page.wiki) {
|
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'>
|
function layoutDiv() {
|
||||||
<span class='name'><%- __('meta.recent_update') %></span>
|
var el = '<div class="widget-wrap" id="recent">';
|
||||||
<% if (item.rss) { %>
|
// header
|
||||||
<a class='cap-action' id='rss' title='Subscribe' href='<%- item.rss %>'>
|
el += '<div class="widget-header h4 dis-select">';
|
||||||
<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 += '<span class="name">' + __("meta.recent_update") + '</span>';
|
||||||
</a>
|
if (item.rss) {
|
||||||
<% } %>
|
el += '<a class="cap-action" id="rss" title="Subscribe" href="' + item.rss + '">';
|
||||||
</div>
|
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>';
|
||||||
<div class='widget-body fs14'>
|
el += '</a>';
|
||||||
<%
|
}
|
||||||
var arr = page.menu_id == 'wiki' ? site.pages.filter(function(p){
|
el += '</div>';
|
||||||
return p.layout == 'wiki' && p.title && p.title.length > 0;
|
// body
|
||||||
}) : site.posts.filter(function(p){
|
var arr = page.menu_id == "wiki" ? site.pages.filter(function(p){
|
||||||
return p.title && p.title.length > 0;
|
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'>
|
el += '<div class="widget-body fs14">';
|
||||||
<a href="<%= url_for(post.link || post.path) %>">
|
arr.sort("updated", -1).limit(item.limit).each(function(post) {
|
||||||
<% if (post.wiki && (post.title.toUpperCase().includes(post.wiki.toUpperCase()) == false)) { %>
|
el += '<div class="post-title reveal">';
|
||||||
<%- post.wiki ? post.wiki + ': ' : '' %><%- post.title %>
|
el += '<div class="cap">';
|
||||||
<% } else { %>
|
el += __("meta.updated") + ' ' + '<time>' + date(post.updated, config.date_format) + '</time>';
|
||||||
<%- post.title %>
|
el += '</div>';
|
||||||
<% } %>
|
el += '<a href="' + url_for(post.link || post.path) + '">';
|
||||||
</a>
|
if (post.wiki && (post.title.toUpperCase().includes(post.wiki.toUpperCase()) == false)) {
|
||||||
</div>
|
el += post.wiki + ': ';
|
||||||
<% }) %>
|
}
|
||||||
</div>
|
el += post.title;
|
||||||
</div>
|
el += '</a>';
|
||||||
|
el += '</div>';
|
||||||
|
el += '';
|
||||||
|
});
|
||||||
|
el += '</div>';
|
||||||
|
el += '</div>';
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<%- layoutDiv() %>
|
||||||
|
|
|
@ -47,9 +47,15 @@ h6
|
||||||
|
|
||||||
.widgets
|
.widgets
|
||||||
.post-title
|
.post-title
|
||||||
margin: 0.5rem 0
|
margin: 0.75rem 0
|
||||||
line-height: 1.2
|
line-height: 1.2
|
||||||
|
display: block
|
||||||
|
txt-ellipsis()
|
||||||
|
.cap
|
||||||
|
margin-bottom: 2px
|
||||||
|
opacity: 0.5
|
||||||
a
|
a
|
||||||
color: inherit
|
color: inherit
|
||||||
|
font-weight: 500
|
||||||
&:hover
|
&:hover
|
||||||
color: $color-hover
|
color: $color-hover
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@require('_defines/const')
|
@require('_defines/const')
|
||||||
|
|
||||||
// 通用主题色
|
// 通用主题色
|
||||||
$color-theme = #ff7043
|
$color-theme = #1BCDFC
|
||||||
$color-link = #2196f3
|
$color-link = #2196f3
|
||||||
$color-button = #1BCDFC
|
$color-button = #1BCDFC
|
||||||
$color-hover = #ff5722
|
$color-hover = #ff5722
|
||||||
|
@ -13,8 +13,8 @@ $color-cat-hover = darken($color-cat, 20)
|
||||||
// 浅色页面
|
// 浅色页面
|
||||||
$c-site-bg-light = #f8f8f8
|
$c-site-bg-light = #f8f8f8
|
||||||
$c-block-light = #f2f2f2
|
$c-block-light = #f2f2f2
|
||||||
$c-title-light = #111
|
$c-title-light = #000
|
||||||
$c-text-light = #333
|
$c-text-light = #222
|
||||||
$c-card-light = white
|
$c-card-light = white
|
||||||
|
|
||||||
// 深色页面
|
// 深色页面
|
||||||
|
|
|
@ -69,7 +69,7 @@ article.md code
|
||||||
color: $color-inlinecode
|
color: $color-inlinecode
|
||||||
font-family: $ff-code
|
font-family: $ff-code
|
||||||
word-break: break-all
|
word-break: break-all
|
||||||
font-size: $fs-p
|
font-size: inherit
|
||||||
background: var(--block)
|
background: var(--block)
|
||||||
padding: 2px
|
padding: 2px
|
||||||
border-radius: 2px
|
border-radius: 2px
|
||||||
|
|
Loading…
Reference in New Issue