forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from hans2103/metismenu-frontend
Metismenu frontend
- Loading branch information
Showing
6 changed files
with
83 additions
and
79 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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
document.addEventListener("DOMContentLoaded", function(event) { | ||
const mm1 = new MetisMenu("#menu").on("shown.metisMenu", function(event) { | ||
window.addEventListener("click", function mmClick1(e) { | ||
if (!event.target.contains(e.target)) { | ||
mm1.hide(event.detail.shownElement); | ||
window.removeEventListener("click", mmClick1); | ||
} | ||
}); | ||
}); | ||
const allMenus = document.querySelectorAll('ul.mod-menu_metismenu'); | ||
|
||
allMenus.forEach(menu => { | ||
// eslint-disable-next-line no-new, no-undef | ||
new MetisMenu(menu); | ||
}); | ||
}); |
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 was deleted.
Oops, something went wrong.
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
72 changes: 72 additions & 0 deletions
72
templates/cassiopeia/scss/vendor/metismenu/_metismenu.scss
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,72 @@ | ||
@if $metismenu == true { | ||
.metismenu { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
@media (min-width: 992px) { | ||
flex-direction: row; | ||
} | ||
|
||
> li { | ||
flex: 1 1 0%; | ||
display: flex; | ||
flex-direction: column; | ||
position: relative; | ||
|
||
@media (min-width: 992px) { | ||
flex-direction: column; | ||
|
||
> ul { | ||
position: absolute; | ||
top: 100%; | ||
min-width: 100%; | ||
z-index: 1001; | ||
background-color: #f8f9fa; | ||
color: #333333; | ||
} | ||
} | ||
} | ||
|
||
a { | ||
position: relative; | ||
display: block; | ||
padding: 15px; | ||
color: #adb5bd; | ||
outline-width: 0; | ||
transition: all .3s ease-out; | ||
|
||
&:hover, | ||
&:focus, | ||
&:active { | ||
color: #f8f9fa; | ||
text-decoration: none; | ||
background: #0b7285; | ||
} | ||
} | ||
|
||
.mm-collapse:not(.mm-show) { | ||
display: none; | ||
} | ||
|
||
.has-arrow::after { | ||
position: absolute; | ||
content: ""; | ||
width: 0.5em; | ||
height: 0.5em; | ||
border-width: 1px 0 0 1px; | ||
border-style: solid; | ||
border-color: currentColor; | ||
border-color: initial; | ||
right: 1em; | ||
transform: rotate(-45deg) translate(0, -50%); | ||
transform-origin: top; | ||
top: 50%; | ||
transition: all 0.3s ease-out; | ||
} | ||
|
||
.mm-active > .has-arrow::after, | ||
.has-arrow[aria-expanded="true"]::after { | ||
transform: rotate(-135deg) translate(0, -50%); | ||
} | ||
} | ||
} |