mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-01 07:26:47 +00:00
@@ -69,6 +69,8 @@
|
|||||||
|
|
||||||
<td align="center"><a href="https://github.com/ykxkykx"><img src="https://avatars.githubusercontent.com/u/17985993" width="64px;" alt="Joshua Astray"/><br/><sub><b>Joshua Astray</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=ykxkykx" title="ykxkykx" >🔧 🐛</a></td>
|
<td align="center"><a href="https://github.com/ykxkykx"><img src="https://avatars.githubusercontent.com/u/17985993" width="64px;" alt="Joshua Astray"/><br/><sub><b>Joshua Astray</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=ykxkykx" title="ykxkykx" >🔧 🐛</a></td>
|
||||||
|
|
||||||
|
<td align="center"><a href="https://github.com/Vixcity"><img src="https://avatars.githubusercontent.com/u/57704177" width="64px;" alt="Vixcity"/><br/><sub><b>Vixcity</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Vixcity" title="Vixcity" >🔧 🐛</a></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ const BLOG = {
|
|||||||
PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制
|
PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制
|
||||||
|
|
||||||
// 鼠标点击烟花特效
|
// 鼠标点击烟花特效
|
||||||
FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || false, // 鼠标点击烟花特效
|
FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || false, // 开关
|
||||||
|
// 烟花色彩,感谢 https://github.com/Vixcity 提交的色彩
|
||||||
|
FIREWORKS_COLOR: ['255, 20, 97', '24, 255, 146', '90, 135, 255', '251, 243, 140'],
|
||||||
|
|
||||||
// 悬浮挂件
|
// 悬浮挂件
|
||||||
WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件
|
WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import anime from 'animejs'
|
import anime from 'animejs'
|
||||||
|
import BLOG from 'blog.config'
|
||||||
|
|
||||||
export const Fireworks = () => {
|
export const Fireworks = () => {
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
@@ -17,9 +18,8 @@ export const Fireworks = () => {
|
|||||||
* @param config
|
* @param config
|
||||||
*/
|
*/
|
||||||
function createFireworks(config) {
|
function createFireworks(config) {
|
||||||
const defaultColors = ['102, 167, 221', '62, 131, 225', '33, 78, 194']
|
|
||||||
const defaultConfig = {
|
const defaultConfig = {
|
||||||
colors: defaultColors,
|
colors: BLOG.FIREWORKSCOLOR,
|
||||||
numberOfParticules: 20,
|
numberOfParticules: 20,
|
||||||
orbitRadius: {
|
orbitRadius: {
|
||||||
min: 50,
|
min: 50,
|
||||||
@@ -44,7 +44,7 @@ function createFireworks(config) {
|
|||||||
let pointerY = 0
|
let pointerY = 0
|
||||||
|
|
||||||
// sky blue
|
// sky blue
|
||||||
const colors = config.colors || defaultColors
|
const colors = config.colors
|
||||||
|
|
||||||
const canvasEl = document.querySelector('.fireworks')
|
const canvasEl = document.querySelector('.fireworks')
|
||||||
const ctx = canvasEl.getContext('2d')
|
const ctx = canvasEl.getContext('2d')
|
||||||
|
|||||||
Reference in New Issue
Block a user