From 38f71eb84200aab19ae9f6e27102d05a10a6d0a1 Mon Sep 17 00:00:00 2001 From: Ivan Dimitrov Date: Wed, 15 Jul 2020 09:30:00 +0300 Subject: Feature/header - logged in (#102) * [Update] Styled the header and made it responsive. Changed primary colors. * [Update] Cleaned _header.scss * [Update] all buttons styles * [Update] Merged feature/button-styles, fixed responsive design and fixed #34 #36 #37 #39 * header: remove the duplicated master.css load. We have a function in functions.php which handles the load of the assets files * [Fix] Fixed header logo, register and login buttons classnames handled by wordpress * [Fix] Fixed long word link content breaking down and fixed separator disappearing * [Fix] Fixed logo margin when it is p tag * [Update] Added 'profile' menu when the user is logged in Co-authored-by: Valentin Co-authored-by: metodiew --- wp-content/themes/carmag/assets/src/scripts/scripts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'wp-content/themes/carmag/assets/src/scripts/scripts.js') diff --git a/wp-content/themes/carmag/assets/src/scripts/scripts.js b/wp-content/themes/carmag/assets/src/scripts/scripts.js index 93438c7..6394e2b 100644 --- a/wp-content/themes/carmag/assets/src/scripts/scripts.js +++ b/wp-content/themes/carmag/assets/src/scripts/scripts.js @@ -22,7 +22,7 @@ jQuery(document).ready(function ($) { const toggleDrawer = () => { const drawerClassList = event.target.classList; - const navClassList = document.querySelectorAll(".menu-primary-container")[0] + const navClassList = document.querySelectorAll(".menu-container")[0] .classList; drawerClassList.toggle("opened"); navClassList.toggle("opened"); @@ -31,9 +31,13 @@ const toggleDrawer = () => { const separator = document.createElement("span"); separator.className = "separator"; const loginLink = document.querySelectorAll(".login")[0]; +const profileDropdown = document.querySelectorAll(".profile")[0]; if (loginLink) { loginLink.before(separator); } +if (profileDropdown) { + profileDropdown.before(separator); +} const faqFields = document.querySelectorAll(".faq-field"); faqFields.forEach((field) => { -- cgit v1.3.1-26-gb76a