Skip to content

Commit

Permalink
fix menu on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamz-a committed May 7, 2023
1 parent 20ad813 commit a969093
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions _includes/navigation.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% if site.data.navigation %}
<div class="navigation-wrapper">
<a href="#menu-toggle" id="menu-toggle">{{ site.data.text[site.locale].menu_label | default: 'Menu' }}</a>
<nav id="primary-nav" class="site-nav animated drop">
<nav id="primary-nav" class="site-nav animated drop js-menu-is-open">
<ul>
{%- for link in site.data.navigation -%}
{%- if link.url contains '://' -%}
Expand Down
10 changes: 0 additions & 10 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
$(document).ready(function() {
// main menu toggle
var toggleButton = document.getElementById("menu-toggle");
var menu = document.getElementById("primary-nav");

if (toggleButton && menu) {
toggleButton.addEventListener("click", function() {
menu.classList.toggle("js-menu-is-open");
});
}

// initialize smooth scroll
$("a").smoothScroll({ offset: -20 });

Expand Down

0 comments on commit a969093

Please sign in to comment.