image cdn
This commit is contained in:
parent
d813199658
commit
ca9194b84e
15
_config.yml
15
_config.yml
|
@ -82,13 +82,13 @@ comments:
|
|||
######## Footer ########
|
||||
footer:
|
||||
social:
|
||||
- icon: '<img src="https://7.dusays.com/2021/02/14/25678f144c438.svg"/>'
|
||||
- icon: '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/25678f144c438.svg"/>'
|
||||
url: /atom.xml
|
||||
- icon: '<img src="https://7.dusays.com/2021/02/14/08a41b181ce68.svg"/>'
|
||||
- icon: '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/08a41b181ce68.svg"/>'
|
||||
url: /
|
||||
- icon: '<img src="https://7.dusays.com/2021/02/14/cf1ae151f9e83.svg"/>'
|
||||
- icon: '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/cf1ae151f9e83.svg"/>'
|
||||
url: /
|
||||
- icon: '<img src="https://7.dusays.com/2021/02/14/942ebbf1a4b91.svg"/>'
|
||||
- icon: '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/942ebbf1a4b91.svg"/>'
|
||||
url: /
|
||||
license: '[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)'
|
||||
source: #'[GitHub](https://github.com/xaoxuu/hexo-theme-stellar)'
|
||||
|
@ -147,6 +147,7 @@ plugins:
|
|||
scale: 1 # 0.1~1
|
||||
|
||||
default:
|
||||
avatar: https://7.dusays.com/2021/03/03/87519671e4837.svg
|
||||
link: https://7.dusays.com/2021/02/20/8f277b4ee0ecd.svg
|
||||
cover: https://7.dusays.com/2021/02/20/76b86c0226ffd.svg
|
||||
avatar: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg
|
||||
link: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg
|
||||
cover: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg
|
||||
image: https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg
|
||||
|
|
|
@ -6,7 +6,7 @@ page.header = false;
|
|||
page.robots = 'none';
|
||||
%>
|
||||
<article class='md error-page'>
|
||||
<h1><img id='error' src="https://7.dusays.com/2021/02/20/1c830bfcd517d.svg" alt=""></h1>
|
||||
<h1><img id='error' src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/404/1c830bfcd517d.svg" alt=""></h1>
|
||||
<p class='what'>
|
||||
<strong>
|
||||
<%- __('page.error.what') %>
|
||||
|
|
|
@ -73,13 +73,13 @@ function layoutDiv() {
|
|||
}
|
||||
el += '>';
|
||||
if (item == 'wechat') {
|
||||
el += '<img src="https://7.dusays.com/2021/02/24/b32ef3da1162a.svg"/>';
|
||||
el += '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/b32ef3da1162a.svg"/>';
|
||||
} else if (item == 'weibo') {
|
||||
el += '<img src="https://7.dusays.com/2021/02/24/80c07e4dbb303.svg"/>';
|
||||
el += '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/80c07e4dbb303.svg"/>';
|
||||
} else if (item == 'email') {
|
||||
el += '<img src="https://7.dusays.com/2021/02/24/a1b00e20f425d.svg"/>';
|
||||
el += '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/a1b00e20f425d.svg"/>';
|
||||
} else if (item == 'link') {
|
||||
el += '<img src="https://7.dusays.com/2021/02/24/8411ed322ced6.svg"/>';
|
||||
el += '<img src="https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/8411ed322ced6.svg"/>';
|
||||
}
|
||||
el += '</a>';
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<% if (is_home() && page.total > 1) { %>
|
||||
<div class='paginator-wrap dis-select'>
|
||||
<a class='paginator prev<%- page.prev != 0 ? "" : " disable" %>' href='<%- url_for(page.prev_link) %>'>
|
||||
<img src='https://7.dusays.com/2021/02/26/f049bbd4e88ec.svg'/>
|
||||
<img src='https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/f049bbd4e88ec.svg'/>
|
||||
</a>
|
||||
<div class='paginator current'>
|
||||
<%- page.current %><span class='sep'></span><%- page.total %>
|
||||
</div>
|
||||
<a class='paginator next<%- page.next != 0 ? "" : " disable" %>' href='<%- url_for(page.next_link) %>'>
|
||||
<img src='https://7.dusays.com/2021/02/26/064b95430caf4.svg'/>
|
||||
<img src='https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/064b95430caf4.svg'/>
|
||||
</a>
|
||||
</div>
|
||||
<% } %>
|
||||
|
|
|
@ -50,6 +50,6 @@ if (post.categories && post.categories.length > 0) {
|
|||
<% } %>
|
||||
<% } %>
|
||||
<% if (post.pin) { %>
|
||||
<span class='pin'><img src='https://7.dusays.com/2021/02/27/3279dd441df8b.svg'/></span>
|
||||
<span class='pin'><img src='https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/badge/3279dd441df8b.svg'/></span>
|
||||
<% } %>
|
||||
</div>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
const fs = require('hexo-fs');
|
||||
|
||||
module.exports.processSite = function(htmlContent) {
|
||||
const default_image = this.theme.config.default.image;
|
||||
return htmlContent.replace(/<img(.*?)src="(.*?)"(.*?)>/gi, function(imgTag) {
|
||||
if (/="data:image(.*?)/gi.test(imgTag)) {
|
||||
return imgTag;
|
||||
|
@ -18,6 +19,6 @@ module.exports.processSite = function(htmlContent) {
|
|||
if (imgTag.includes(' no-lazy ') == false) {
|
||||
return imgTag;
|
||||
}
|
||||
return imgTag.slice(0,imgTag.length-1) + ' onerror="javascript:this.classList.add(\'error\');this.src=\'https://7.dusays.com/2021/03/03/87519671e4837.svg\';"' + imgTag.slice(imgTag.length-1);
|
||||
return imgTag.slice(0,imgTag.length-1) + ' onerror="javascript:this.classList.add(\'error\');this.src=\'' + default_image + '\';"' + imgTag.slice(imgTag.length-1);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
margin-top: 19px
|
||||
margin-bottom: 20px
|
||||
.frame
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/volantis-x/cdn-volantis@3/img/frame/iphone11.svg);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/frame/iphone11.svg);
|
||||
width: 329px
|
||||
height: 658px
|
||||
&[focus='top']
|
||||
|
|
|
@ -77,7 +77,7 @@ $(function () {
|
|||
cfg.el = el;
|
||||
cfg.api = api;
|
||||
cfg.class = el.getAttribute('class');
|
||||
cfg.avatar = 'https://7.dusays.com/2021/03/03/87519671e4837.svg';
|
||||
cfg.avatar = 'https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg';
|
||||
friendsjs.layout(cfg);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -80,8 +80,8 @@ $(function () {
|
|||
cfg.class = el.getAttribute('class');
|
||||
cfg.el = el;
|
||||
cfg.api = api;
|
||||
cfg.avatar = 'https://7.dusays.com/2021/02/20/8f277b4ee0ecd.svg';
|
||||
cfg.screenshot = 'https://7.dusays.com/2021/02/20/76b86c0226ffd.svg';
|
||||
cfg.avatar = 'https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg';
|
||||
cfg.screenshot = 'https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg';
|
||||
sitesjs.layout(cfg);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue