File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { Card } from '@blueprintjs/core'
2
2
3
+ import dayjs from 'dayjs'
3
4
import { ComponentType } from 'react'
4
5
5
6
import { CardTitle } from 'components/CardTitle'
@@ -18,12 +19,13 @@ export const IndexPage: ComponentType = withGlobalErrorBoundary(() => {
18
19
const { isMD } = useCurrentSize ( )
19
20
return (
20
21
< div className = "flex flex-col md:flex-row px-4 mt-4 md:px-8 md:mt-8 max-w-[96rem] mx-auto" >
22
+ { isMD && < Ad /> }
21
23
< div className = "md:w-2/3 order-2 md:order-1 mr-0 md:mr-8 mt-4 md:mt-0" >
22
24
< Operations />
23
25
</ div >
24
26
{ ! isMD && (
25
27
< div className = "md:w-1/3 order-1 md:order-2" >
26
- < div className = "sticky top-20" >
28
+ < div className = "top-20" >
27
29
< Card className = "flex flex-col mb-4 space-y-2" >
28
30
< CardTitle icon = "add" className = "mb-4" >
29
31
创建新作业
@@ -55,6 +57,8 @@ export const IndexPage: ComponentType = withGlobalErrorBoundary(() => {
55
57
</ >
56
58
) ) }
57
59
</ div >
60
+
61
+ < Ad />
58
62
</ div >
59
63
</ div >
60
64
) }
@@ -63,3 +67,19 @@ export const IndexPage: ComponentType = withGlobalErrorBoundary(() => {
63
67
</ div >
64
68
)
65
69
} )
70
+
71
+ const Ad = dayjs ( ) . isBefore ( '2025-05-11 00:00:00+8' )
72
+ ? ( ) => (
73
+ // eslint-disable-next-line react/jsx-no-target-blank
74
+ < a
75
+ className = "block relative dark:brightness-[85%]"
76
+ href = "https://www.ldmnq.com/ldy/ldymuban/#/landing/9651"
77
+ target = "_blank"
78
+ >
79
+ < img src = "/ad_leidian.jpg" alt = "雷电模拟器" />
80
+ < div className = "absolute bottom-2 right-2 border border-current rounded text-[10px] text-zinc-300 px-1 " >
81
+ 广告
82
+ </ div >
83
+ </ a >
84
+ )
85
+ : ( ) => null
You can’t perform that action at this time.
0 commit comments