Skip to content

Commit 8517494

Browse files
authored
Merge pull request #81 from FunTechInc/dev
css修正
2 parents 65b9ad7 + b09fd41 commit 8517494

File tree

4 files changed

+79
-75
lines changed

4 files changed

+79
-75
lines changed

app/_home/index.module.scss

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1+
.canvas {
2+
width: 100%;
3+
height: 100svh;
4+
position: fixed;
5+
top: 0;
6+
left: 0;
7+
}
8+
19
.wrapper {
210
width: 100%;
311
height: 100svh;
412
display: flex;
513
flex-direction: column;
614
align-items: center;
715
justify-content: center;
8-
}
9-
10-
.canvas {
11-
position: fixed;
12-
width: 100%;
13-
height: 100%;
14-
top: 0;
15-
left: 0;
16+
pointer-events: none;
17+
overflow: hidden;
18+
position: relative;
1619
}
1720

1821
.content {
@@ -22,13 +25,11 @@
2225
align-items: center;
2326
justify-content: center;
2427
mix-blend-mode: difference;
25-
pointer-events: none;
2628
}
2729

2830
.title {
2931
font-size: 40px;
3032
font-weight: 500;
31-
pointer-events: none;
3233
@media (max-width: 560px) {
3334
font-size: 9vw;
3435
}
@@ -81,3 +82,14 @@
8182
}
8283
}
8384
}
85+
86+
.snsLink {
87+
position: absolute;
88+
bottom: 16px;
89+
right: 16px;
90+
display: flex;
91+
align-items: center;
92+
gap: 16px;
93+
mix-blend-mode: difference;
94+
pointer-events: auto;
95+
}

app/_home/index.tsx

Lines changed: 55 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -62,75 +62,67 @@ export default function Page() {
6262
];
6363

6464
return (
65-
<div className={s.wrapper}>
65+
<>
6666
<div className={s.canvas}>
6767
<ShaderFx>
6868
<Playground bpm={bpm} easing={easing} />
6969
</ShaderFx>
7070
</div>
71-
<div className={s.content}>
72-
<h1 className={s.title}>⚡️ More FXs, Less GLSL</h1>
73-
<Install />
74-
<p className={s.link}>
75-
Oh, right, u can download the gradient from
76-
<a href="/gradation" target="_blank">
77-
here 👉
78-
</a>
79-
</p>
80-
<div className={s.input}>
81-
<p>BPM:</p>
82-
<input
83-
type="number"
84-
value={bpm}
85-
onChange={(e) => {
86-
setBpm(+e.target.value);
87-
}}
88-
/>
89-
</div>
90-
<div className={s.input}>
91-
<p>Easing:</p>
92-
<select
93-
value={easing}
94-
onChange={(e) => {
95-
setEasing(e.target.value as EasingTypes);
96-
}}>
97-
{easingTypes.map((type) => (
98-
<option key={type} value={type}>
99-
{type}
100-
</option>
101-
))}
102-
</select>
71+
<div className={s.wrapper}>
72+
<div className={s.content}>
73+
<h1 className={s.title}>⚡️ More FXs, Less GLSL</h1>
74+
<Install />
75+
<p className={s.link}>
76+
Oh, right, u can download the gradient from
77+
<a href="/gradation" target="_blank">
78+
here 👉
79+
</a>
80+
</p>
81+
<div className={s.input}>
82+
<p>BPM:</p>
83+
<input
84+
type="number"
85+
value={bpm}
86+
onChange={(e) => {
87+
setBpm(+e.target.value);
88+
}}
89+
/>
90+
</div>
91+
<div className={s.input}>
92+
<p>Easing:</p>
93+
<select
94+
value={easing}
95+
onChange={(e) => {
96+
setEasing(e.target.value as EasingTypes);
97+
}}>
98+
{easingTypes.map((type) => (
99+
<option key={type} value={type}>
100+
{type}
101+
</option>
102+
))}
103+
</select>
104+
</div>
103105
</div>
106+
<ul className={s.snsLink}>
107+
<li>
108+
<a
109+
href="https://github.com/FunTechInc/use-shader-fx"
110+
target={"_blank"}>
111+
<Image
112+
src="github-logo.svg"
113+
alt="GitHub"
114+
width={28}
115+
height={28}
116+
/>
117+
</a>
118+
</li>
119+
<li>
120+
<a href="https://twitter.com/tkm_hmng8" target={"_blank"}>
121+
<Image src="x-logo.svg" alt="X" width={24} height={24} />
122+
</a>
123+
</li>
124+
</ul>
104125
</div>
105-
<ul
106-
style={{
107-
position: "fixed",
108-
bottom: "16px",
109-
right: "16px",
110-
zIndex: 100,
111-
display: "flex",
112-
alignItems: "center",
113-
gap: "16px",
114-
mixBlendMode: "difference",
115-
}}>
116-
<li>
117-
<a
118-
href="https://github.com/FunTechInc/use-shader-fx"
119-
target={"_blank"}>
120-
<Image
121-
src="github-logo.svg"
122-
alt="GitHub"
123-
width={28}
124-
height={28}
125-
/>
126-
</a>
127-
</li>
128-
<li>
129-
<a href="https://twitter.com/tkm_hmng8" target={"_blank"}>
130-
<Image src="x-logo.svg" alt="X" width={24} height={24} />
131-
</a>
132-
</li>
133-
</ul>
134-
</div>
126+
</>
135127
);
136128
}

src/assets/css/index.module.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/css/index.module.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)