Skip to content

Commit 04f7e2c

Browse files
committed
feat: add mumu ads
1 parent 3120ab4 commit 04f7e2c

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

public/ads_mumu.jpg

283 KB
Loading

src/pages/index.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export const IndexPage: ComponentType = withGlobalErrorBoundary(() => {
1818
const { isMD } = useCurrentSize()
1919
return (
2020
<div className="flex flex-col md:flex-row px-4 mt-4 md:px-8 md:mt-8 max-w-[96rem] mx-auto">
21-
<div className="md:w-2/3 order-2 md:order-1 mr-0 md:mr-8">
21+
{isMD && <Ads />}
22+
<div className="md:w-2/3 order-2 md:order-1 mr-0 md:mr-8 mt-4 md:mt-0">
2223
<Operations />
2324
</div>
2425
{!isMD && (
@@ -36,7 +37,7 @@ export const IndexPage: ComponentType = withGlobalErrorBoundary(() => {
3637

3738
<AnnPanel className="mb-4" />
3839

39-
<div className="flex flex-wrap leading-relaxed mb-8 section-social-links">
40+
<div className="flex flex-wrap leading-relaxed mb-4 section-social-links">
4041
{SOCIAL_LINKS.map((link) => (
4142
<a
4243
href={link.href}
@@ -55,6 +56,8 @@ export const IndexPage: ComponentType = withGlobalErrorBoundary(() => {
5556
</>
5657
))}
5758
</div>
59+
60+
<Ads />
5861
</div>
5962
</div>
6063
)}
@@ -63,3 +66,17 @@ export const IndexPage: ComponentType = withGlobalErrorBoundary(() => {
6366
</div>
6467
)
6568
})
69+
70+
const Ads = () => (
71+
<a
72+
className="block relative"
73+
href="https://gad.netease.com/gad/access?project_id=201005304&s=SppRGFTnJ1VxfSFEZWE6hY3pO4gn&code_type=1"
74+
target="_blank"
75+
rel="noreferrer"
76+
>
77+
<img src="/ads_mumu.jpg" alt="MuMu模拟器" />
78+
<div className="absolute bottom-2 right-2 border border-current rounded text-[10px] text-zinc-300 px-1">
79+
广告
80+
</div>
81+
</a>
82+
)

0 commit comments

Comments
 (0)