Skip to content

Commit 00c9a14

Browse files
author
贺子良
committed
🐞 fix(/layout): nav
fix open nav menu's bug
1 parent 9a0fe59 commit 00c9a14

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/layout/index.jsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,7 @@ export default function Layout() {
6868
<span className="header-menu__line"></span>
6969
<span className="header-menu__line"></span>
7070
</figure>
71-
<div
72-
className="header-nav"
73-
style={
74-
showMenu
75-
? {
76-
opacity: 1,
77-
PointerEvents: "none",
78-
}
79-
: null
80-
}
81-
>
71+
<div className="header-nav">
8272
<CustomLink
8373
to="/projects"
8474
onClick={() => setShowMenu(false)}

src/layout/styles.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,14 @@ export const LayoutWrapper = styled.div`
179179
transform: translateX(3px) rotate(-45deg);
180180
}
181181
182+
.header-menu--open + .header-nav {
183+
opacity: 1;
184+
pointer-events: initial;
185+
}
186+
182187
.header-nav {
183188
opacity: 0;
189+
pointer-events: none;
184190
position: fixed;
185191
display: flex;
186192
flex-direction: column;
@@ -192,6 +198,11 @@ export const LayoutWrapper = styled.div`
192198
height: 100vh;
193199
z-index: 5;
194200
background: #fff;
201+
> a {
202+
font-size: 25px;
203+
margin-left: 0 !important;
204+
}
205+
195206
> a:not(:last-child) {
196207
margin-bottom: 40px;
197208
}

0 commit comments

Comments
 (0)