Skip to content

Commit

Permalink
Remove zen mode references from primary-nav.js and primary_nav.html
Browse files Browse the repository at this point in the history
  • Loading branch information
ramram-mf committed Jun 17, 2024
1 parent 514f22c commit d01ee6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
12 changes: 3 additions & 9 deletions network-api/networkapi/templates/fragments/primary_nav.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% load primary_active_nav i18n %}

{% if page.zen_nav == True %}<div data-nav-mode="zen" class="zen-mode primary-nav-container">
{% else %}<div class="primary-nav-container">
{% endif %}
<div class="primary-nav-container">
<div class="wrapper-burger {% block wrapper_classes %}{% endblock %}">
<div class="menu-container xlarge:tw-h-40 tw-py-8 small:tw-pl-0 medium:tw-py-10 xlarge:tw-py-0 {% block menu_container_classes %}{% endblock %}">
{% block menu_content %}
Expand Down Expand Up @@ -34,7 +32,7 @@
<div class="tw-flex tw-flex-row tw-justify-between xlarge:tw-items-center">
<div id="primary-nav-links" class="tw-w-full tw-py-0 xlarge:tw-w-auto xlarge:tw-items-center">
<div class="tw-flex tw-items-center tw-flex-wrap">
<button class="burger tw-z-50 tw-bg-white {% if page.zen_nav is not True %} xlarge:tw-hidden small:tw-ml-0 {% endif %}" aria-label="{% trans 'Open menu' %}">
<button class="burger tw-z-50 tw-bg-white xlarge:tw-hidden small:tw-ml-0" aria-label="{% trans 'Open menu' %}">
<span class="burger-bar burger-bar-top"></span>
<span class="burger-bar burger-bar-middle"></span>
<span class="burger-bar burger-bar-bottom"></span>
Expand All @@ -44,11 +42,7 @@
<a class="logo text-hide tw-z-50" href="/" aria-label="{% trans "Mozilla Foundation Homepage" %}">{% trans "Mozilla Foundation" %}</a>
{% endblock %}

{% if page.zen_nav == True %}
<div class="wide-screen-menu hidden">
{% else %}
<div class="wide-screen-menu xlarge:tw-h-full xlarge:tw-flex xlarge:tw-items-center">
{% endif %}
<div class="wide-screen-menu xlarge:tw-h-full xlarge:tw-flex xlarge:tw-items-center">

{% block wide_screen_menu %}
<div class="nav-links d-none d-xl-block">
Expand Down
11 changes: 0 additions & 11 deletions source/js/primary-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ let primaryNav = {
let navMode = primaryNavContainer.dataset.navMode;
let menuOpen = false;

function setWideMenuState(openMenu) {
if (navMode === `zen`) {
if (openMenu) {
elWideMenu.classList.remove(`hidden`);
} else {
elWideMenu.classList.add(`hidden`);
}
}
}

function setNarrowMenuState(openMenu) {
if (openMenu) {
elNarrowMenu.classList.remove(`hidden`);
Expand Down Expand Up @@ -75,7 +65,6 @@ let primaryNav = {
}

function setMenuState(openMenu) {
setWideMenuState(openMenu);
setNarrowMenuState(openMenu);
setBurgerState(openMenu);
trackMenuState(openMenu);
Expand Down

0 comments on commit d01ee6f

Please sign in to comment.