Skip to content

Commit 525270a

Browse files
committed
πŸ› パむンビジγƒ₯γ‚’γƒ«γŒε°γ•γγͺってしまうバグ
1 parent f64f94d commit 525270a

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

β€Žbun.lockb

-146 KB
Binary file not shown.

β€Žclient/src/components/HamburgerMenu.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ export function HamburgerMenu({
4848
position="fixed"
4949
style={{
5050
opacity: isOpened ? 1 : 0,
51-
display: isOpened ? "block" : "none",
51+
visibility: isOpened ? "visible" : "hidden",
5252
backgroundColor: token(bgColor),
5353
}}
54-
transition="opacity .3s ease-in-out"
54+
transition="opacity .2s ease-in-out, visibility .21s ease-in-out"
5555
width="100%"
5656
zIndex="header"
5757
>

β€Žclient/src/components/HeaderBody.tsx

+19-14
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Icon } from "@iconify/react";
33
import { css } from "panda/css";
44
import { styled as p } from "panda/jsx";
55
import { token } from "panda/tokens";
6-
import { type ReactElement, type CSSProperties } from "react";
6+
import { type ReactElement, type CSSProperties, useEffect } from "react";
77

88
export function HeaderBody({
99
externalStyle,
@@ -18,6 +18,20 @@ export function HeaderBody({
1818
}): ReactElement {
1919
const shouldWhite = externalStyle?.logo?.color === token("colors.9u-white");
2020

21+
// γƒͺンク遷移時にハンバーガーパニγƒ₯γƒΌγ‚’ι–‰γ˜γ‚‹
22+
useEffect(() => {
23+
const elements = document.querySelectorAll("a");
24+
elements.forEach((e) => {
25+
e.addEventListener("click", onAnchorClick);
26+
});
27+
28+
return () => {
29+
elements.forEach((e) => {
30+
e.removeEventListener("click", onAnchorClick);
31+
});
32+
};
33+
}, []);
34+
2135
return (
2236
<p.header
2337
alignItems="center"
@@ -48,7 +62,6 @@ export function HeaderBody({
4862
}}
4963
height="max-content"
5064
href="/"
51-
onClick={onAnchorClick}
5265
style={externalStyle?.logo}
5366
transition="opacity 0.3s"
5467
>
@@ -90,18 +103,10 @@ export function HeaderBody({
90103
}}
91104
gap="5"
92105
>
93-
<p.a href="/works" onClick={onAnchorClick}>
94-
Works
95-
</p.a>
96-
<p.a href="/blogs" onClick={onAnchorClick}>
97-
Blog
98-
</p.a>
99-
<p.a href="/about" onClick={onAnchorClick}>
100-
About
101-
</p.a>
102-
<p.a href="/contact" onClick={onAnchorClick}>
103-
Contact
104-
</p.a>
106+
<p.a href="/works">Works</p.a>
107+
<p.a href="/blogs">Blog</p.a>
108+
<p.a href="/about">About</p.a>
109+
<p.a href="/contact">Contact</p.a>
105110
</p.nav>
106111
<p.nav
107112
className={css({

β€Žclient/src/components/VisualMain.astro

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ const key: VisualKey = await match(url)
143143
height={imgSize.height}
144144
src={modifySrc(url)}
145145
style={{
146+
height: "100%",
146147
width: "auto",
147148
}}
148149
width={imgSize.width}

0 commit comments

Comments
Β (0)