Website Summary Files Commits Branches @commit @diff @stats
path: root / wp-content / themes / carmag / assets / src / scripts / scripts.js
diff options
context:
space:
mode:
Commit38f71eb84200aab19ae9f6e27102d05a10a6d0a1 (patch)
Author
 Ivan Dimitrov <ivan.dimitrov293@gmail.com>
2020-07-15 09:30:00 +0300
Committer
 GitHub <noreply@github.com>
2020-07-15 09:30:00 +0300
Filesb9469167fd727caa1376f124c5c1b915359fe768 /wp-content/themes/carmag/assets/src/scripts/scripts.js
tues-interns-2020-38f71eb84200aab19ae9f6e27102d05a10a6d0a1.tar
tues-interns-2020-38f71eb84200aab19ae9f6e27102d05a10a6d0a1.tar.gz
tues-interns-2020-38f71eb84200aab19ae9f6e27102d05a10a6d0a1.zip
Parentce17a28c56c5fe8b06e6807bbe49da5cdc27465a (diff)
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 <valentinspasov9669@gmail.com> Co-authored-by: metodiew <stanko@metodiew.com>
1 files changed, 5 insertions, 1 deletions
-rw-r--r--wp-content/themes/carmag/assets/src/scripts/scripts.js6
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) => {