-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1255 from tangly1024/release/4.0.0
Release/4.0.0
- Loading branch information
Showing
444 changed files
with
11,654 additions
and
4,508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables | ||
NEXT_PUBLIC_VERSION=3.16.4 | ||
NEXT_PUBLIC_VERSION=4.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ const BLOG = { | |
NOTION_HOST: process.env.NEXT_PUBLIC_NOTION_HOST || 'https://www.notion.so', // Notion域名,您可以选择用自己的域名进行反向代理,如果不懂得什么是反向代理,请勿修改此项 | ||
|
||
// 网站字体 | ||
FONT_STYLE: process.env.NEXT_PUBLIC_FONT_STYLE || 'font-serif', // ['font-serif','font-sans'] 两种可选,分别是衬线和无衬线: 参考 https://www.jianshu.com/p/55e410bd2115 | ||
FONT_STYLE: process.env.NEXT_PUBLIC_FONT_STYLE || 'font-sans', // ['font-serif','font-sans'] 两种可选,分别是衬线和无衬线: 参考 https://www.jianshu.com/p/55e410bd2115 | ||
FONT_URL: [ | ||
// 字体CSS 例如 https://npm.elemecdn.com/[email protected]/style.css | ||
'https://fonts.googleapis.com/css?family=Bitter&display=swap', | ||
|
@@ -48,12 +48,12 @@ const BLOG = { | |
'-apple-system', | ||
'BlinkMacSystemFont', | ||
'"Hiragino Sans GB"', | ||
'"Microsoft YaHei"', | ||
'"Segoe UI Emoji"', | ||
'"Segoe UI Symbol"', | ||
'"Segoe UI"', | ||
'"Noto Sans SC"', | ||
'HarmonyOS_Regular', | ||
'"Microsoft YaHei"', | ||
'"Helvetica Neue"', | ||
'Helvetica', | ||
'"Source Han Sans SC"', | ||
|
@@ -98,6 +98,7 @@ const BLOG = { | |
'https://npm.elemecdn.com/prism-themes/themes/prism-a11y-dark.min.css', // 代码样式主题 更多参考 https://github.com/PrismJS/prism-themes | ||
CODE_MAC_BAR: process.env.NEXT_PUBLIC_CODE_MAC_BAR || true, // 代码左上角显示mac的红黄绿图标 | ||
CODE_LINE_NUMBERS: process.env.NEXT_PUBLIC_CODE_LINE_NUMBERS || 'false', // 是否显示行号 | ||
CODE_COLLAPSE: process.env.NEXT_PUBLIC_CODE_COLLAPSE || 'false', // 是否折叠代码框 | ||
|
||
// Mermaid 图表CDN | ||
MERMAID_CDN: process.env.NEXT_PUBLIC_MERMAID_CDN || 'https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js', // CDN | ||
|
@@ -126,6 +127,9 @@ const BLOG = { | |
PREVIEW_CATEGORY_COUNT: 16, // 首页最多展示的分类数量,0为不限制 | ||
PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制 | ||
|
||
POST_DISABLE_GALLERY_CLICK: process.env.NEXT_PUBLIC_POST_DISABLE_GALLERY_CLICK || false, // 画册视图禁止点击,方便在友链页面的画册插入链接 | ||
|
||
// ********动态特效相关******** | ||
// 鼠标点击烟花特效 | ||
FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || false, // 开关 | ||
// 烟花色彩,感谢 https://github.com/Vixcity 提交的色彩 | ||
|
@@ -138,18 +142,18 @@ const BLOG = { | |
|
||
// 樱花飘落特效 | ||
SAKURA: process.env.NEXT_PUBLIC_SAKURA || false, // 开关 | ||
|
||
// 漂浮线段特效 | ||
NEST: process.env.NEXT_PUBLIC_NEST || false, // 开关 | ||
|
||
// 动态彩带特效 | ||
FLUTTERINGRIBBON: process.env.NEXT_PUBLIC_FLUTTERINGRIBBON || false, // 开关 | ||
// 静态彩带特效 | ||
RIBBON: process.env.NEXT_PUBLIC_RIBBON || false, // 开关 | ||
|
||
// 星空雨特效 黑夜模式才会生效 | ||
STARRY_SKY: process.env.NEXT_PUBLIC_STARRY_SKY || false, // 开关 | ||
|
||
// ********挂件组件相关******** | ||
// Chatbase | ||
CHATBASE_ID: process.env.NEXT_PUBLIC_CHATBASE_ID || null, // 是否显示chatbase机器人 https://www.chatbase.co/ | ||
// 悬浮挂件 | ||
WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件 | ||
WIDGET_PET_LINK: | ||
|
@@ -192,6 +196,7 @@ const BLOG = { | |
MUSIC_PLAYER_METING_LRC_TYPE: | ||
process.env.NEXT_PUBLIC_MUSIC_PLAYER_METING_LRC_TYPE || '1', // 可选值: 3 | 1 | 0(0:禁用 lrc 歌词,1:lrc 格式的字符串,3:lrc 文件 url) | ||
|
||
// ********挂件组件相关******** | ||
// ----> 评论互动 可同时开启多个支持 WALINE VALINE GISCUS CUSDIS UTTERRANCES GITALK | ||
|
||
// twikoo | ||
|
@@ -320,14 +325,16 @@ const BLOG = { | |
icon: process.env.NEXT_PUBLIC_NOTION_PROPERTY_ICON || 'icon' | ||
}, | ||
|
||
// RSS | ||
// RSS订阅 | ||
ENABLE_RSS: process.env.NEXT_PUBLIC_ENABLE_RSS || true, // 是否开启RSS订阅功能 | ||
MAILCHIMP_LIST_ID: process.env.MAILCHIMP_LIST_ID || null, // 开启mailichimp邮件订阅 客户列表ID ,具体使用方法参阅文档 | ||
MAILCHIMP_API_KEY: process.env.MAILCHIMP_API_KEY || null, // 开启mailichimp邮件订阅 APIkey | ||
|
||
// 作废配置 | ||
AVATAR: process.env.NEXT_PUBLIC_AVATAR || '/avatar.svg', // 作者头像,被notion中的ICON覆盖。若无ICON则取public目录下的avatar.png | ||
TITLE: process.env.NEXT_PUBLIC_TITLE || 'NotionNext BLOG', // 站点标题 ,被notion中的页面标题覆盖;此处请勿留空白,否则服务器无法编译 | ||
HOME_BANNER_IMAGE: | ||
process.env.NEXT_PUBLIC_HOME_BANNER_IMAGE || './bg_image.jpg', // 首页背景大图, 会被notion中的封面图覆盖,若无封面图则会使用代码中的 /public/bg_image.jpg 文件 | ||
process.env.NEXT_PUBLIC_HOME_BANNER_IMAGE || '/bg_image.jpg', // 首页背景大图, 会被notion中的封面图覆盖,若无封面图则会使用代码中的 /public/bg_image.jpg 文件 | ||
DESCRIPTION: | ||
process.env.NEXT_PUBLIC_DESCRIPTION || '这是一个由NotionNext生成的站点', // 站点描述,被notion中的页面描述覆盖 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import BLOG from '@/blog.config' | ||
|
||
export default function ChatBase() { | ||
if (!BLOG.CHATBASE_ID) { | ||
return <></> | ||
} | ||
|
||
return <iframe | ||
src={`https://www.chatbase.co/chatbot-iframe/${BLOG.CHATBASE_ID}`} | ||
width="100%" | ||
style={{ height: '100%', minHeight: '700px' }} | ||
frameborder="0" | ||
></iframe> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React, { useState } from 'react' | ||
|
||
/** | ||
* 翻转组件 | ||
* @param {*} props | ||
* @returns | ||
*/ | ||
export default function FlipCard(props) { | ||
const [isFlipped, setIsFlipped] = useState(false) | ||
|
||
function handleCardFlip() { | ||
setIsFlipped(!isFlipped) | ||
} | ||
|
||
return ( | ||
<div className={`flip-card ${isFlipped ? 'flipped' : ''}`} > | ||
<div className={`flip-card-front ${props.className || ''}`} onMouseEnter={handleCardFlip}> | ||
{props.frontContent} | ||
</div> | ||
<div className={`flip-card-back ${props.className || ''}`} onMouseLeave={handleCardFlip}> | ||
{props.backContent} | ||
</div> | ||
<style jsx>{` | ||
.flip-card { | ||
width: 100%; | ||
height: 100%; | ||
display: inline-block; | ||
position: relative; | ||
transform-style: preserve-3d; | ||
transition: transform 0.2s; | ||
} | ||
.flip-card-front, | ||
.flip-card-back { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
backface-visibility: hidden; | ||
} | ||
.flip-card-front { | ||
z-index: 2; | ||
transform: rotateY(0); | ||
} | ||
.flip-card-back { | ||
transform: rotateY(180deg); | ||
} | ||
.flip-card.flipped { | ||
transform: rotateY(180deg); | ||
} | ||
`}</style> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { isBrowser } from '@/lib/utils' | ||
import React, { useState } from 'react' | ||
|
||
/** | ||
* 全屏按钮 | ||
* @returns | ||
*/ | ||
const FullScreenButton = () => { | ||
const [isFullScreen, setIsFullScreen] = useState(false) | ||
|
||
const handleFullScreenClick = () => { | ||
if (!isBrowser()) { | ||
return | ||
} | ||
const element = document.documentElement | ||
if (!isFullScreen) { | ||
if (element.requestFullscreen) { | ||
element.requestFullscreen() | ||
} else if (element.webkitRequestFullscreen) { | ||
element.webkitRequestFullscreen() | ||
} else if (element.mozRequestFullScreen) { | ||
element.mozRequestFullScreen() | ||
} else if (element.msRequestFullscreen) { | ||
element.msRequestFullscreen() | ||
} | ||
setIsFullScreen(true) | ||
} else { | ||
if (document.exitFullscreen) { | ||
document.exitFullscreen() | ||
} else if (document.webkitExitFullscreen) { | ||
document.webkitExitFullscreen() | ||
} else if (document.mozCancelFullScreen) { | ||
document.mozCancelFullScreen() | ||
} else if (document.msExitFullscreen) { | ||
document.msExitFullscreen() | ||
} | ||
setIsFullScreen(false) | ||
} | ||
} | ||
|
||
return ( | ||
<button onClick={handleFullScreenClick} className='dark:text-gray-300'> | ||
{isFullScreen ? '退出全屏' : <i className="fa-solid fa-expand"></i>} | ||
</button> | ||
) | ||
} | ||
|
||
export default FullScreenButton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.