generated from nginxinc/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update docs landing page (#76)
* feat: removed "Explore all products" and added new link dropdown instead * fix bug with closing dropdown * updated nginx description in dropdown * added new description for nginx.org
- Loading branch information
1 parent
7920065
commit 485b428
Showing
4 changed files
with
91 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
$(document).ready(function () { | ||
const dropdownContent = document.getElementById("dropdown-content"); | ||
const navbarButton = document.getElementById("navbar-sites-button"); | ||
const chevronIcon = document.getElementById("navbar-sites-button-icon"); | ||
|
||
$("#navbar-sites-button").on("click", () => { | ||
chevronIcon.classList.toggle('rotate-chevron'); | ||
|
||
if (dropdownContent.style.display === "block") { | ||
dropdownContent.style.display = "none"; | ||
navbarButton.classList.remove("remove-bottom-radius"); | ||
} else { | ||
dropdownContent.style.display = "block"; | ||
navbarButton.classList.add("remove-bottom-radius"); | ||
} | ||
}); | ||
|
||
window.onclick = function(event) { | ||
if (!event.target.matches('#navbar-sites-button') && !event.target.matches('#navbar-sites-button-icon')) { | ||
if(dropdownContent.style.display !== "none" && dropdownContent.style.display !== ""){ | ||
chevronIcon.classList.toggle('rotate-chevron'); | ||
} | ||
dropdownContent.style.display = "none" | ||
navbarButton.classList.remove("remove-bottom-radius"); | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters