Merge branch 'main' into preview

This commit is contained in:
tangly1024
2022-04-26 14:50:01 +08:00
3 changed files with 17 additions and 12 deletions

View File

@@ -124,7 +124,7 @@ const BLOG = {
process.env.NEXT_PUBLIC_DESCRIPTION || '这是一个由NotionNext生成的站点', // 站点描述被notion中的页面描述覆盖 process.env.NEXT_PUBLIC_DESCRIPTION || '这是一个由NotionNext生成的站点', // 站点描述被notion中的页面描述覆盖
isProd: process.env.VERCEL_ENV === 'production', // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) isProd: process.env.VERCEL_ENV === 'production' // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) isProd: process.env.VERCEL_ENV === 'production', // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) isProd: process.env.VERCEL_ENV === 'production' // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables)
VERSION: '3.2.1' // 版本号 VERSION: '3.2.2' // 版本号
} }
module.exports = BLOG module.exports = BLOG

View File

@@ -23,15 +23,20 @@ export default function Live2D() {
return <canvas id="live2d" className='cursor-pointer' width="280" height="250" onClick={handleClick} alt='切换主题' title='切换主题' /> return <canvas id="live2d" className='cursor-pointer' width="280" height="250" onClick={handleClick} alt='切换主题' title='切换主题' />
} }
/**
* 加载宠物
*/
function initLive2D() { function initLive2D() {
// 加载 waifu.css live2d.min.js waifu-tips.js setTimeout(() => {
if (screen.width >= 768) { // 加载 waifu.css live2d.min.js waifu-tips.js
Promise.all([ if (screen.width >= 768) {
// loadExternalResource('https://cdn.zhangxinxu.com/sp/demo/live2d/live2d/js/live2d.js', 'js') Promise.all([
loadExternalResource('https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/live2d.min.js', 'js') // loadExternalResource('https://cdn.zhangxinxu.com/sp/demo/live2d/live2d/js/live2d.js', 'js')
]).then((e) => { loadExternalResource('https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/live2d.min.js', 'js')
// https://github.com/xiazeyu/live2d-widget-models ]).then((e) => {
loadlive2d('live2d', BLOG.WIDGET_PET_LINK) // https://github.com/xiazeyu/live2d-widget-models
}) loadlive2d('live2d', BLOG.WIDGET_PET_LINK)
} })
}
}, 1000)
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "notion-next", "name": "notion-next",
"version": "3.2.1", "version": "3.2.2",
"homepage": "https://github.com/tangly1024/NotionNext.git", "homepage": "https://github.com/tangly1024/NotionNext.git",
"license": "MIT", "license": "MIT",
"repository": { "repository": {