Skip to content
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

Fix main logo drawing over nav overlay #55

Merged
merged 2 commits into from
Dec 20, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix logoBig drawing over nav overlay
  • Loading branch information
chinkung committed Dec 8, 2018
commit 7b1f33bcbf4f7e4ef912a257a120d8557d4e91dd
11 changes: 10 additions & 1 deletion static/scripts/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,19 @@
$$('.nav-full, main').forEach(function(el) {
el.classList.toggle('active')
})
this.querySelector('nav-icon').classList.toggle('nav-icon')
})
})

// Fix logoBig drawing over nav when click
// on logoSmall while nav open
$('.logo').addEventListener('click', function() {
if ($('.nav-full').classList.contains('active')) {
$$('.nav-full, main').forEach(function(el) {
el.classList.toggle('active')
})
}
})

// Disable scroll when full screen nav is open
$('body').addEventListener('click', function() {
if ($('.nav-full').classList.contains('active')) {
Expand Down