mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
add nested menus capability
This commit is contained in:
12
assets/icons/chevron-down.svg
Normal file
12
assets/icons/chevron-down.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 317 B |
11
assets/js/header.js
Normal file
11
assets/js/header.js
Normal file
@@ -0,0 +1,11 @@
|
||||
function header_toggle_nested_menu(element) {
|
||||
if (!element) {
|
||||
throw new Error("Could not find button")
|
||||
}
|
||||
let parent_element = element.parentElement;
|
||||
if(!parent_element) {
|
||||
throw new Error("Could not get parent element from button")
|
||||
}
|
||||
let nested_menu = parent_element.querySelector(".header-nested-menu")
|
||||
nested_menu.classList.toggle('hidden');
|
||||
}
|
||||
Reference in New Issue
Block a user