mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
Harsh Shandilya
9f9fce4b9a
* codex/master: (137 commits) docs: update .all-contributorsrc [skip ci] docs: update README.md [skip ci] Fix nav display error when expanding window with open burger. fix icon sizes docs: update .all-contributorsrc [skip ci] docs: update README.md [skip ci] Conform icons to Google's mobile usability reqs fix relative icon issue + add title docs: Clean up README and config.toml (#65) update screenshot and add to README v1.5.0 added resources folder back refactor: revert md/js files refactor: use semicolon in js refactor: ignore exampleSite/content dir change bottom padding of pages to 1rem update CONTRIBUTING.md add prettier v1.4.0 fix script block ... Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
20 lines
349 B
JavaScript
20 lines
349 B
JavaScript
/*
|
|
* Handles mobile nav
|
|
*/
|
|
|
|
function toggleMobileNavState() {
|
|
const body = document.querySelector("body");
|
|
body.classList.toggle("nav--active");
|
|
}
|
|
|
|
/*
|
|
* Initializes burger functionality
|
|
*/
|
|
|
|
function initBurger() {
|
|
const burger = document.querySelector(".burger");
|
|
burger.addEventListener("click", toggleMobileNavState);
|
|
}
|
|
|
|
initBurger();
|