update lazyload img

This commit is contained in:
Nofated095 2023-11-28 21:46:43 +08:00
parent 8ca700b83e
commit 9af74d10dc
3 changed files with 4 additions and 4 deletions

View File

@ -6,8 +6,8 @@ bulma-stylus-root = '../../../../node_modules/bulma-stylus/stylus'
$body-size ?= 14px
$body-background-color ?= #f7f7f7
$family-sans-serif ?= Ubuntu, Roboto, 'Open Sans', 'Microsoft YaHei', sans-serif
$family-code ?= 'Source Code Pro', monospace, 'Microsoft YaHei'
$family-sans-serif ?= Ubuntu, Roboto, 'Open Sans', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", STHeiti, "Microsoft YaHei", SimSun, sans-serif
$family-code ?= 'JetBrains Mono', Consolas, Monaco, "Andale Mono", "Ubuntu Mono", 'Microsoft YaHei', 'Source Code Pro', monospace
$size-7 ?= .85rem
$size-small ?= .75rem

View File

@ -1,6 +1,6 @@
{
"name": "hexo-theme-amane",
"version": "0.0.35",
"version": "0.0.36",
"author": "Nofated095 <nofated095@users.noreply.github.com>",
"license": "MIT",
"description": "A simple, delicate, and modern theme for Hexo",

View File

@ -1,7 +1,7 @@
'use strict';
const fs = require('hexo-fs');
function lazyProcess(htmlContent) {
let loadingImage = this.config.lazyload.loadingImg || 'https://img-blog.csdnimg.cn/2022010612032074818.gif';
let loadingImage = this.config.lazyload.loadingImg || 'https://blog.amane.icu/lazy.gif';
return htmlContent.replace(/<img(.*?)src="(.*?)"(.*?)>/gi, (str, p1, p2) => {
if (/data-src/gi.test(str)) {
return str;