mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 15:09:40 +00:00
gitbook 增加新文章红点机制
This commit is contained in:
11
components/Badge.js
Normal file
11
components/Badge.js
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 红点
|
||||
*/
|
||||
export default function Badge() {
|
||||
return <>
|
||||
{/* 红点 */}
|
||||
<span class="absolute right-1 top-1 flex h-2 w-2">
|
||||
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"></span>
|
||||
<span class="relative inline-flex rounded-full h-2 w-2 bg-red-500"></span>
|
||||
</span></>
|
||||
}
|
||||
@@ -80,6 +80,7 @@ const ExternalPlugin = (props) => {
|
||||
const GLOBAL_JS = siteConfig('GLOBAL_JS')
|
||||
const CLARITY_ID = siteConfig('CLARITY_ID')
|
||||
const IMG_SHADOW = siteConfig('IMG_SHADOW')
|
||||
const ANIMATE_CSS_URL = siteConfig('ANIMATE_CSS_URL')
|
||||
|
||||
// 自定义样式css和js引入
|
||||
if (isBrowser) {
|
||||
@@ -93,6 +94,10 @@ const ExternalPlugin = (props) => {
|
||||
loadExternalResource('/css/img-shadow.css', 'css')
|
||||
}
|
||||
|
||||
if (ANIMATE_CSS_URL) {
|
||||
loadExternalResource(ANIMATE_CSS_URL, 'css')
|
||||
}
|
||||
|
||||
// 导入外部自定义脚本
|
||||
if (CUSTOM_EXTERNAL_JS && CUSTOM_EXTERNAL_JS.length > 0) {
|
||||
for (const url of CUSTOM_EXTERNAL_JS) {
|
||||
|
||||
Reference in New Issue
Block a user