File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 99< body >
1010 < nav >
1111 < ul class ="sidebar ">
12- < li > < a href ="# "> < svg xmlns ="http://www.w3.org/2000/svg " height ="26 " viewBox ="0 96 960 960 " width ="26 "> < path d ="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z "/> </ svg > </ a > </ li >
12+ < li > < a href ="# " onclick = hideSidebar() > < svg xmlns ="http://www.w3.org/2000/svg " height ="26 " viewBox ="0 96 960 960 " width ="26 "> < path d ="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z "/> </ svg > </ a > </ li >
1313 < li > < a href ="# "> Blog</ a > </ li >
1414 < li > < a href ="# "> Products</ a > </ li >
1515 < li > < a href ="# "> About</ a > </ li >
2323 < li class ="hideOnMobile "> < a href ="# "> About</ a > </ li >
2424 < li class ="hideOnMobile "> < a href ="# "> Forum</ a > </ li >
2525 < li class ="hideOnMobile "> < a href ="# "> Login</ a > </ li >
26- < li class ="menu-button "> < a href ="# "> < svg xmlns ="http://www.w3.org/2000/svg " height ="26 " viewBox ="0 96 960 960 " width ="26 "> < path d ="M120 816v-60h720v60H120Zm0-210v-60h720v60H120Zm0-210v-60h720v60H120Z "/> </ svg > </ a > </ li >
26+ < li class ="menu-button " onclick = showSidebar() > < a href ="# "> < svg xmlns ="http://www.w3.org/2000/svg " height ="26 " viewBox ="0 96 960 960 " width ="26 "> < path d ="M120 816v-60h720v60H120Zm0-210v-60h720v60H120Zm0-210v-60h720v60H120Z "/> </ svg > </ a > </ li >
2727 </ ul >
2828 </ nav >
2929 < script >
30-
30+ function showSidebar ( ) {
31+ const sidebar = document . querySelector ( '.sidebar' )
32+ sidebar . style . display = 'flex'
33+ }
34+ function hideSidebar ( ) {
35+ const sidebar = document . querySelector ( '.sidebar' )
36+ sidebar . style . display = 'none'
37+ }
3138 </ script >
3239</ body >
3340</ html >
You can’t perform that action at this time.
0 commit comments