File tree 6 files changed +9
-9
lines changed
themes/gitbook/components
6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -343,8 +343,8 @@ const BLOG = {
343
343
ADSENSE_GOOGLE_SLOT_AUTO : process . env . NEXT_PUBLIC_ADSENSE_GOOGLE_SLOT_AUTO || '8807314373' , // Google AdScene>广告>按单元广告>新建展示广告 (自动广告)
344
344
345
345
// 万维广告
346
- AD_WWADS_ENABLE : process . env . NEXT_PUBLIC_WWADS_ENABLE || false , // https://wwads.cn/
347
- AD_WWADS_BLOCK_DETECT : process . env . NEXT_PUBLIC_WWADS_AD_BLOCK_DETECT || false , // 是否开启WWADS广告屏蔽插件检测 @see https://github.com/bytegravity/whitelist-wwads
346
+ AD_WWADS_ID : process . env . NEXT_PUBLIC_WWAD_ID || null , // https://wwads.cn/ 创建您的万维广告单元ID
347
+ AD_WWADS_BLOCK_DETECT : process . env . NEXT_PUBLIC_WWADS_AD_BLOCK_DETECT || false , // 是否开启WWADS广告屏蔽插件检测,开启后会在广告位上以文字提示 @see https://github.com/bytegravity/whitelist-wwads
348
348
349
349
// END<----营收相关
350
350
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const CommonScript = () => {
38
38
/>
39
39
</ > ) }
40
40
41
- { BLOG . AD_WWADS_ENABLE && < script type = "text/javascript" charset = "UTF-8" src = "https://cdn.wwads.cn/js/makemoney.js" async > </ script > }
41
+ { BLOG . AD_WWADS_ID && < script type = "text/javascript" charSet = "UTF-8" src = "https://cdn.wwads.cn/js/makemoney.js" async > </ script > }
42
42
43
43
{ BLOG . COMMENT_CUSDIS_APP_ID && < script defer src = { `https://cusdis.com/js/widget/lang/${ BLOG . LANG . toLowerCase ( ) } .js` } /> }
44
44
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ import BLOG from '@/blog.config'
8
8
* @returns {JSX.Element | null } - 返回渲染的 JSX 元素或 null
9
9
*/
10
10
export default function WWAds ( { orientation = 'vertical' , sticky = false , className } ) {
11
- if ( ! JSON . parse ( BLOG . AD_WWADS_ENABLE ) ) {
11
+ if ( ! JSON . parse ( BLOG . AD_WWADS_ID ) ) {
12
12
return null
13
13
}
14
14
15
15
return (
16
- < div className = { `wwads-cn ${ orientation === 'vertical' ? 'wwads-vertical' : 'wwads-horizontal' } ${ sticky ? 'wwads-sticky' : '' } z-30 ${ className || '' } ` } data-id = "265" > </ div >
16
+ < div className = { `wwads-cn ${ orientation === 'vertical' ? 'wwads-vertical' : 'wwads-horizontal' } ${ sticky ? 'wwads-sticky' : '' } z-30 ${ className || '' } ` } data-id = { BLOG . AD_WWADS_ID } > </ div >
17
17
)
18
18
}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const MenuBarMobile = (props) => {
32
32
return (
33
33
< nav id = 'nav' className = ' text-md' >
34
34
{ /* {links.map(link => <NormalMenu key={link?.id} link={link}/>) } */ }
35
- { links ?. map ( link => < MenuItemCollapse onHeightChange = { props . onHeightChange } key = { link ?. id } link = { link } /> ) }
35
+ { links ?. map ( ( link , index ) => < MenuItemCollapse onHeightChange = { props . onHeightChange } key = { index } link = { link } /> ) }
36
36
37
37
</ nav >
38
38
)
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ export const MenuItemCollapse = (props) => {
47
47
48
48
{ /* 折叠子菜单 */ }
49
49
{ hasSubMenu && < Collapse isOpen = { isOpen } onHeightChange = { props . onHeightChange } >
50
- { link ?. subMenus ?. map ( sLink => {
51
- return < div key = { sLink . id } className = '
50
+ { link ?. subMenus ?. map ( ( sLink , index ) => {
51
+ return < div key = { index } className = '
52
52
not:last-child:border-b-0 border-b dark:border-gray-800 py-2 px-14 cursor-pointer hover:bg-gray-100 dark:text-gray-200
53
53
font-extralight dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200' >
54
54
< Link href = { sLink . to } target = { link ?. to ?. indexOf ( 'http' ) === 0 ? '_blank' : '_self' } >
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export default function TopNavBar(props) {
64
64
65
65
{ /* 桌面端顶部菜单 */ }
66
66
< div className = 'hidden md:flex' >
67
- { links && links ?. map ( link => < MenuItemDrop key = { link ?. id } link = { link } /> ) }
67
+ { links && links ?. map ( ( link , index ) => < MenuItemDrop key = { index } link = { link } /> ) }
68
68
< DarkModeButton className = 'text-sm flex items-center h-full' />
69
69
</ div >
70
70
</ div >
You can’t perform that action at this time.
0 commit comments