File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ module.exports = /** @param eleventyConfig {UserConfig} */ function (eleventyCon
3030 // be sure to add the directory to .eleventyignore
3131 eleventyConfig . addPassthroughCopy ( "img" ) ;
3232 eleventyConfig . addPassthroughCopy ( "fnt" ) ;
33+ eleventyConfig . addPassthroughCopy ( "js" ) ;
3334 eleventyConfig . addPassthroughCopy ( ".htaccess" ) ;
3435 eleventyConfig . addPassthroughCopy ( "robots.txt" ) ;
3536 eleventyConfig . addPassthroughCopy ( "asdoc" ) ;
Original file line number Diff line number Diff line change 4242 </ div >
4343 </ div >
4444 {% include "footer.html" %}
45+ < script src ="/js/topbar.js "> </ script >
4546</ body >
4647
4748</ html >
Original file line number Diff line number Diff line change 4444 </ div >
4545 </ div >
4646 {% include "footer.html" %}
47+ < script src ="/js/topbar.js "> </ script >
4748</ body >
4849
4950</ html >
Original file line number Diff line number Diff line change 4040 {{ content }}
4141 </ div >
4242 {% include "footer.html" %}
43+ < script src ="/js/topbar.js "> </ script >
4344</ body >
4445
4546</ html >
Original file line number Diff line number Diff line change 127127 .topMenu > li > a :hover
128128 background-color : #e7e7e7
129129
130- .topbar-right :hover .topMenu
131- display : flex
132- z-index : 1000
133130
134131@media (max-width : 599px )
135132 .topbar-left
136133 div
137- width : 140px
134+ width : 140px
135+
136+ @media screen and (max-width : 840px )
137+ .topMenu
138+ display : none
139+ flex-direction : column
140+ position : absolute
141+ right : 10px
142+ top : 70px
143+ z-index : 1000
144+
145+ .topMenu.is-open
146+ display : flex
Original file line number Diff line number Diff line change 1+ document . addEventListener ( "DOMContentLoaded" , ( ) => {
2+ const btn = document . querySelector ( ".topMenu-dropbtn" ) ;
3+ const menu = document . querySelector ( ".topMenu" ) ;
4+
5+ if ( ! btn || ! menu ) return ;
6+
7+ btn . addEventListener ( "click" , ( e ) => {
8+ e . preventDefault ( ) ;
9+ e . stopPropagation ( ) ;
10+ menu . classList . toggle ( "is-open" ) ;
11+ } ) ;
12+
13+ menu . addEventListener ( "click" , ( e ) => {
14+ e . stopPropagation ( ) ;
15+ } ) ;
16+
17+ document . addEventListener ( "click" , ( ) => {
18+ menu . classList . remove ( "is-open" ) ;
19+ } ) ;
20+ } ) ;
You can’t perform that action at this time.
0 commit comments