-
Notifications
You must be signed in to change notification settings - Fork 52
Fix the mobile menu and prevent the page scrolling when the mobile menu open #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: website
Are you sure you want to change the base?
Changes from 3 commits
7c97dcf
0a84d23
9521887
ab2393b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -23,6 +23,7 @@ html[data-theme="dark"] { | |||
| --button-primary-color: white; | ||||
| } | ||||
|
|
||||
|
|
||||
| /* add a transition to ease into new themes */ | ||||
| /* looks best in Mozilla, text transitions late in Safari/Chrome */ | ||||
| html.transition-theme, | ||||
|
|
@@ -377,6 +378,7 @@ img.responsive { | |||
| display: block; | ||||
| border: 0; | ||||
| padding: 0; | ||||
| height: 100vh; | ||||
| } | ||||
|
|
||||
| .navbar .navbar-hamburger-button { | ||||
|
|
@@ -404,6 +406,7 @@ img.responsive { | |||
| border-bottom: 1px solid var(--border-color-softer); | ||||
| padding: 2rem; | ||||
| max-height: unset; | ||||
|
|
||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: unnecessary change
Suggested change
|
||||
| } | ||||
|
|
||||
| @media only screen and (min-width: 600px) { | ||||
|
|
@@ -425,6 +428,8 @@ img.responsive { | |||
| width: 100%; | ||||
| border: 0; | ||||
| padding: 0; | ||||
| /* height: 100vh; */ | ||||
|
|
||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: comment cruft
Suggested change
|
||||
| } | ||||
|
|
||||
| .navbar-download-button .button { | ||||
|
|
@@ -749,3 +754,11 @@ article.news + article.news { | |||
| padding: 1em; | ||||
| margin: 0 0 2em 0; | ||||
| } | ||||
|
|
||||
|
|
||||
|
|
||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: unnecessary spaces
Suggested change
|
||||
| .scroll-lock { | ||||
| overflow: auto; | ||||
| position: fixed; | ||||
| width: 100%; | ||||
| } | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,5 +65,17 @@ | |
| {% include "footer.html" %} | ||
| {% endblock %} | ||
| </div> | ||
|
|
||
| <script> | ||
| const navToggle = document.getElementById('navbar-hamburger-button'); | ||
|
|
||
| navToggle.addEventListener('change', () => { | ||
| if (navToggle.checked) { | ||
| document.body.classList.add('scroll-lock'); | ||
| } else { | ||
| document.body.classList.remove('scroll-lock'); | ||
| } | ||
| }); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| </script> | ||
| </body> | ||
| </html> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: unnecessary change