Skip to content

Commit

Permalink
Merge pull request #49 from lifeafter619/new
Browse files Browse the repository at this point in the history
New
  • Loading branch information
lifeafter619 authored Oct 22, 2023
2 parents ffdf292 + 6048e83 commit 8a93149
Show file tree
Hide file tree
Showing 59 changed files with 5,912 additions and 6,950 deletions.
3 changes: 1 addition & 2 deletions .env.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
NEXT_PUBLIC_VERSION=4.0.15

NEXT_PUBLIC_VERSION=4.0.16
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ yarn-error.log*
.env.development.local
.env.test.local
.env.production.local
.env

# vercel
.vercel
Expand Down
13 changes: 7 additions & 6 deletions components/StarrySky.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
/* eslint-disable */
import React from 'react'
import { useEffect } from 'react'

const StarrySky = () => {
React.useEffect(() => {
dark()
useEffect(() => {
renderStarrySky()
}, [])
return (
<div className="relative">
<canvas id="starry-sky-vixcity" style={{zIndex:1}} className="top-0 fixed pointer-events-none"></canvas>
<canvas id="starry-sky-vixcity" style={{zIndex:5}} className="top-0 fixed pointer-events-none"></canvas>
</div>
)
}

export default StarrySky

/**
* 创建星空雨
* @param config
*/
function dark() {
function renderStarrySky() {
window.requestAnimationFrame =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
Expand Down Expand Up @@ -124,7 +125,7 @@ function dark() {
u()
})(),
(function t() {
document.getElementsByTagName('html')[0].className == 'dark' && u(),
document.getElementsByTagName('html')[0].className.indexOf('dark')>=0 && u(),
window.requestAnimationFrame(t)
})()
}
2 changes: 1 addition & 1 deletion lib/notion/getNotionData.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export function getNavPages({ allPages }) {
return post && post?.slug && (!post?.slug?.startsWith('http')) && post?.type === 'Post' && post?.status === 'Published'
})

return allNavPages.map(item => ({ id: item.id, title: item.title || '', pageCoverThumbnail: item.pageCoverThumbnail || '', category: item.category || null, tags: item.tags || null, summary: item.summary || null, slug: item.slug, lastEditedDate: item.lastEditedDate }))
return allNavPages.map(item => ({ id: item.id, title: item.title || '', pageCoverThumbnail: item.pageCoverThumbnail || '', category: item.category || null, tags: item.tags || null, summary: item.summary || null, slug: item.slug, pageIcon: item.pageIcon || '', lastEditedDate: item.lastEditedDate }))
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/notion/mapImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import BLOG from '@/blog.config'
* 2. UnPlash 图片可以通过api q=50 控制压缩质量 width=400 控制图片尺寸
* @param {*} image
*/
const compressImage = (image, width = 400, quality = 50, fmt = 'webp') => {
const compressImage = (image, width = 800, quality = 50, fmt = 'webp') => {
if (!image) {
return null
}
Expand Down
1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ module.exports = withBundleAnalyzer({
// 'react-dom': 'preact/compat'
// })
// }

// 动态主题:添加 resolve.alias 配置,将动态路径映射到实际路径
config.resolve.alias['@theme-components'] = path.resolve(__dirname, 'themes', THEME)
return config
Expand Down
Loading

1 comment on commit 8a93149

@vercel
Copy link

@vercel vercel bot commented on 8a93149 Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.