Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc7af3a

Browse files
committed
Add sponsors rain
1 parenta192064 commitfc7af3a

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

‎frontend/package-lock.json‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎frontend/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"eslint-config-next":"13.4.19",
2323
"framer-motion":"^11.2.13",
2424
"next":"13.4.12",
25+
"next-emoji-rain":"^1.0.2",
2526
"postcss":"8.4.29",
2627
"react":"18.2.0",
2728
"react-dom":"18.2.0",

‎frontend/src/pages/_app.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import'@/styles/globals.css';
22
importtype{AppProps}from'next/app';
3+
import'next-emoji-rain/dist/index.css';
34

45
exportdefaultfunctionApp({ Component, pageProps}:AppProps){
56
return<Component{...pageProps}/>;

‎frontend/src/pages/sponsors.tsx‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Layout from '@/components/Layout';
22
import{useState}from'react';
33
import{diamondLinks,goldLinks,silverLinks,sponsorInfo}from'@/../public/data/sponsorInfos';
44
importSponsorModalfrom'@/components/Sponsors/SponsorModal';
5+
import{EmojiRain}from'next-emoji-rain';
56

67
exportdefaultfunctionSponsorsPage(){
78
constlogostyle=
@@ -15,10 +16,27 @@ export default function SponsorsPage() {
1516
setShowModal(true);
1617
};
1718

19+
consthandleRainClick=(type:string)=>{
20+
constrainElement=document.getElementById(`${type}Rain`);
21+
22+
if(!rainElement)return;
23+
24+
rainElement.classList.toggle('opacity-0',false);
25+
setTimeout(()=>{
26+
rainElement.classList.toggle('opacity-0',true);
27+
},4000);
28+
};
29+
1830
return(
1931
<Layout>
32+
<divid="diamondRain"className="opacity-0">
33+
<EmojiRainemoji="💎"/>
34+
</div>
35+
<divid="goldRain"className="opacity-0">
36+
<EmojiRainemoji="🪙"/>
37+
</div>
2038
<sectionclassName="py-8">
21-
<h2className="text-4xl font-black text-center font-bold">DIAMOND SPONSORS</h2>
39+
<h2className="text-4xl font-black text-center font-bold"onClick={()=>handleRainClick('diamond')}>DIAMOND SPONSORS</h2>
2240
<div>
2341
<divclassName="w-100 flex flex-col gap-16">
2442
{showModal&&(
@@ -38,7 +56,7 @@ export default function SponsorsPage() {
3856
</div>
3957
</div>
4058
</div>
41-
<h2className="text-4xl font-black text-center font-bold">GOLD SPONSORS</h2>
59+
<h2className="text-4xl font-black text-center font-bold"onClick={()=>handleRainClick('gold')}>GOLD SPONSORS</h2>
4260
<div>
4361
<divclassName="flex flex-wrap rounded-[1rem] px-14 py-10 mb-14 gap-16 justify-evenly rounded border-2 border-[#595F6D] my-10">
4462
{goldLinks.map((item,index)=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp