Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilevel Menu #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,049 changes: 539 additions & 510 deletions assets/css/argon.css

Large diffs are not rendered by default.

18 changes: 1 addition & 17 deletions assets/css/argon.min.css

Large diffs are not rendered by default.

29 changes: 28 additions & 1 deletion assets/js/argon.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,33 @@ var NavbarCollapse = (function() {

})();


//
// Nav With Child collapse
//


var NavWithChild = (function() {

// Variables

var $nav = $('.nav-item.nav-with-child');
setTimeout(function(){
$nav.each(function(index, each) {

$(each).on('click',function(event) {
if($(each).is('.nav-item-expanded')) {
$(each).removeClass('nav-item-expanded')

} else {
$(each).addClass('nav-item-expanded')
}
})
});
},300)

})();

//
// Form control
//
Expand Down Expand Up @@ -955,7 +982,7 @@ var OrdersChart = (function() {
}

content += '<span class="popover-body-value">' + yLabel + '</span>';

return content;
}
}
Expand Down
31 changes: 31 additions & 0 deletions assets/scss/core/navs/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,37 @@
&:hover {
color: $nav-link-hover-color;
}
i.ni {
position: relative;
top: 2px;
}
}

.nav-item {
&:hover {
cursor: pointer;
}
&.nav-with-child{
> .nav-item-child{
list-style: none;
height: 0 ;
min-height: 0px;
overflow: hidden !important;
padding: 0px 1.5rem ;
transition: all .5s ease-in-out;
margin-left: 25px
}
&.nav-item-expanded {
> .nav-item-child {
padding: .5rem 1.5rem;
position: relative;
height: auto;
min-height: 50px;
display: block;
transition: all .5s ease-in-out;
}
}
}

i.ni {
position: relative;
Expand Down
20 changes: 19 additions & 1 deletion examples/icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,24 @@ <h6 class="text-overflow m-0">Welcome!</h6>
<i class="ni ni-circle-08 text-pink"></i> Register
</a>
</li>
<li class="nav-item nav-with-child">
<a class="nav-link" >
<i class="ni ni-align-left-2"></i> Multilevel
</a>
<ul class="nav-item-child">
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 1
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 2
</a>
</li>

</ul>
</li>
</ul>
<!-- Divider -->
<hr class="my-3">
Expand Down Expand Up @@ -1188,4 +1206,4 @@ <h3 class="mb-0">Icons</h3>
<script src="../assets/js/argon.js?v=1.0.0"></script>
</body>

</html>
</html>
20 changes: 19 additions & 1 deletion examples/maps.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,24 @@ <h6 class="text-overflow m-0">Welcome!</h6>
<i class="ni ni-circle-08 text-pink"></i> Register
</a>
</li>
<li class="nav-item nav-with-child">
<a class="nav-link" >
<i class="ni ni-align-left-2"></i> Multilevel
</a>
<ul class="nav-item-child">
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 1
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 2
</a>
</li>

</ul>
</li>
</ul>
<!-- Divider -->
<hr class="my-3">
Expand Down Expand Up @@ -373,4 +391,4 @@ <h5 class="card-title text-uppercase text-muted mb-0">Performance</h5>
<script src="../assets/js/argon.js?v=1.0.0"></script>
</body>

</html>
</html>
20 changes: 19 additions & 1 deletion examples/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,24 @@ <h6 class="text-overflow m-0">Welcome!</h6>
<i class="ni ni-circle-08 text-pink"></i> Register
</a>
</li>
<li class="nav-item nav-with-child">
<a class="nav-link" >
<i class="ni ni-align-left-2"></i> Multilevel
</a>
<ul class="nav-item-child">
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 1
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 2
</a>
</li>

</ul>
</li>
</ul>
<!-- Divider -->
<hr class="my-3">
Expand Down Expand Up @@ -434,4 +452,4 @@ <h6 class="heading-small text-muted mb-4">About me</h6>
<script src="../assets/js/argon.js?v=1.0.0"></script>
</body>

</html>
</html>
2 changes: 1 addition & 1 deletion examples/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@ <h1 class="text-white">Welcome!</h1>
<script src="../assets/js/argon.js?v=1.0.0"></script>
</body>

</html>
</html>
24 changes: 23 additions & 1 deletion examples/tables.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ <h6 class="text-overflow m-0">Welcome!</h6>
<i class="ni ni-support-16"></i>
<span>Support</span>
</a>
<a href="../examples/profile.html" class="dropdown-item">
<i class="ni ni-support-16"></i>
<span>Support</span>
</a>
<div class="dropdown-divider"></div>
<a href="#!" class="dropdown-item">
<i class="ni ni-user-run"></i>
Expand Down Expand Up @@ -145,6 +149,24 @@ <h6 class="text-overflow m-0">Welcome!</h6>
<i class="ni ni-circle-08 text-pink"></i> Register
</a>
</li>
<li class="nav-item nav-with-child">
<a class="nav-link" >
<i class="ni ni-align-left-2"></i> Multilevel
</a>
<ul class="nav-item-child">
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 1
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 2
</a>
</li>

</ul>
</li>
</ul>
<!-- Divider -->
<hr class="my-3">
Expand Down Expand Up @@ -1021,4 +1043,4 @@ <h3 class="text-white mb-0">Card tables</h3>
<script src="../assets/js/argon.js?v=1.0.0"></script>
</body>

</html>
</html>
20 changes: 19 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,24 @@ <h6 class="text-overflow m-0">Welcome!</h6>
<i class="ni ni-circle-08 text-pink"></i> Register
</a>
</li>
<li class="nav-item nav-with-child">
<a class="nav-link" >
<i class="ni ni-align-left-2"></i> Multilevel
</a>
<ul class="nav-item-child">
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 1
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">
Multilevel 2
</a>
</li>

</ul>
</li>
</ul>
<!-- Divider -->
<hr class="my-3">
Expand Down Expand Up @@ -641,4 +659,4 @@ <h3 class="mb-0">Social traffic</h3>
<script src="./assets/js/argon.js?v=1.0.0"></script>
</body>

</html>
</html>