File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1- < ul >
2- < li >
3- < input id ="menutoggle " class ="menucheck " type ="checkbox ">
4- </ li >
5- < li >
1+ < ul id ="navUl ">
2+ < li class ="renderOnSm ">
3+ < input id ="menutoggle " class ="menucheck " type ="checkbox " onclick ="toggleNav() ">
64 < label for ="menutoggle " class ="menutext "> Menu</ label >
75 </ li >
86 {% for item in site.data.navlist.docs %}
1412 </ a >
1513 </ li >
1614 </ ul >
15+ < script >
16+ function toggleNav ( ) {
17+ document . getElementById ( "navUl" ) . classList . toggle ( "navChecked" ) ;
18+ }
19+ </ script >
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ nav ul {
6161 line-height : 1.15 ;
6262}
6363
64- nav ul li {
64+ nav ul li : not (. renderOnSm ) {
6565 float : left;
6666 line-height : 1.15 ;
6767}
@@ -211,7 +211,7 @@ pre.highlight code {
211211}
212212
213213@media screen and (max-width : 980px ) {
214- nav ul li {
214+ nav ul li : not (. renderOnSm ) {
215215 float : none;
216216 display : none;
217217 }
@@ -251,9 +251,6 @@ pre.highlight code {
251251 text-decoration : none;
252252 color : whitesmoke;
253253 }
254- .menucheck : checked ~ li {
255- display : block;
256- }
257254 .fixednav {
258255 position : relative;
259256 }
@@ -287,6 +284,10 @@ pre.highlight code {
287284 display : flex;
288285 justify-content : center;
289286 }
287+
288+ nav ul .navChecked li {
289+ display : block;
290+ }
290291}
291292
292293@media (prefers-color-scheme : light) {
You can’t perform that action at this time.
0 commit comments