This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44c38f8
commit ec2b0a3
Showing
5 changed files
with
137 additions
and
143 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,140 +1,106 @@ | ||
/*sidebar*/ | ||
/*! | ||
* Start Bootstrap - Simple Sidebar (https://startbootstrap.com/template-overviews/simple-sidebar) | ||
* Copyright 2013-2017 Start Bootstrap | ||
* Licensed under MIT | ||
(https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/blob/master/LICENSE) | ||
*/ | ||
|
||
#menu-toggle { | ||
color: white; | ||
position: absolute; | ||
top: 10px; | ||
left: 10px; | ||
background: black; | ||
} | ||
|
||
/*https://codepen.io/lfrichter/pen/mQJJyB*/ | ||
#wrapper { | ||
padding-left: 250px; | ||
-webkit-transition: all 0.5s ease; | ||
-moz-transition: all 0.5s ease; | ||
-o-transition: all 0.5s ease; | ||
transition: all 0.5s ease; | ||
} | ||
|
||
#wrapper.toggled { | ||
padding-left: 0; | ||
#wrapper.sidebar-expanded { | ||
padding-left: 250px; | ||
} | ||
|
||
#wrapper.sidebar-collapsed { | ||
padding-left: 80px; | ||
} | ||
|
||
#sidebar-wrapper { | ||
top: 80px; | ||
position: fixed; | ||
left: 250px; | ||
width: 250px; | ||
height: 100%; | ||
margin-left: -250px; | ||
height: 100vh; | ||
background-color: #151515; | ||
/*padding: 0;*/ | ||
overflow-y: scroll; | ||
overflow-x: hidden; | ||
background: #000; | ||
-webkit-transition: all 0.5s ease; | ||
-moz-transition: all 0.5s ease; | ||
-o-transition: all 0.5s ease; | ||
transition: all 0.5s ease; | ||
} | ||
|
||
#wrapper.toggled #sidebar-wrapper { | ||
width: 0; | ||
#sidebar-wrapper.sidebar-expanded { | ||
width: 250px; | ||
left: 250px; | ||
margin-left: -250px; | ||
} | ||
|
||
#page-content-wrapper { | ||
/*calc method - https://stackoverflow.com/a/14101451/11214013*/ | ||
width: calc(100% - 250px); | ||
position: absolute; | ||
padding: 50px; | ||
#sidebar-wrapper.sidebar-collapsed { | ||
width: 80px; | ||
left: 80px; | ||
margin-left: -80px; | ||
} | ||
|
||
#wrapper.toggled #page-content-wrapper { | ||
#page-content-wrapper { | ||
position: absolute; | ||
margin-right: -250px; | ||
width: 100%; | ||
padding: 10px; | ||
} | ||
|
||
/* Sidebar Styles */ | ||
|
||
.sidebar-nav { | ||
position: absolute; | ||
top: 0; | ||
width: 250px; | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
#page-content-wrapper.sidebar-expanded { | ||
/*calc method - https://stackoverflow.com/a/14101451/11214013*/ | ||
width: -moz-calc(100% - 250px); /* Firefox */ | ||
width: -webkit-calc(100% - 250px); /* WebKit */ | ||
width: -o-calc(100% - 250px); /* Opera */ | ||
width: calc(100% - 250px); /* Standard */ | ||
} | ||
|
||
.sidebar-nav li { | ||
text-indent: 20px; | ||
line-height: 40px; | ||
#page-content-wrapper.sidebar-collapsed { | ||
/*calc method - https://stackoverflow.com/a/14101451/11214013*/ | ||
width: -moz-calc(100% - 80px); /* Firefox */ | ||
width: -webkit-calc(100% - 80px); /* WebKit */ | ||
width: -o-calc(100% - 80px); /* Opera */ | ||
width: calc(100% - 80px); /* Standard */ | ||
} | ||
|
||
.sidebar-nav li a { | ||
display: block; | ||
text-decoration: none; | ||
color: #999999; | ||
/* ----------| Menu item*/ | ||
#sidebar-wrapper .list-group a { | ||
height: 50px; | ||
color: white; | ||
} | ||
|
||
.sidebar-nav li a:hover { | ||
text-decoration: none; | ||
color: #fff; | ||
background: rgba(255, 255, 255, 0.2); | ||
/* ----------| Submenu item*/ | ||
#sidebar-wrapper .list-group li.list-group-item { | ||
background-color: #151515; | ||
} | ||
|
||
.sidebar-nav li a:active, .sidebar-nav li a:focus { | ||
text-decoration: none; | ||
#sidebar-wrapper .list-group .sidebar-submenu a { | ||
height: 45px; | ||
padding-left: 30px; | ||
} | ||
|
||
.sidebar-nav>.sidebar-brand { | ||
height: 65px; | ||
font-size: 18px; | ||
line-height: 60px; | ||
.sidebar-submenu { | ||
font-size: 0.9rem; | ||
} | ||
|
||
.sidebar-nav>.sidebar-brand a { | ||
color: #999999; | ||
/* ----------| Separators */ | ||
.sidebar-separator-title { | ||
background-color: #151515; | ||
height: 35px; | ||
} | ||
|
||
.sidebar-nav>.sidebar-brand a:hover { | ||
color: #fff; | ||
background: none; | ||
.sidebar-separator { | ||
background-color: #151515; | ||
height: 25px; | ||
} | ||
|
||
/** | ||
@media(min-width:768px) { | ||
#wrapper { | ||
padding-left: 0; | ||
} | ||
#wrapper.toggled { | ||
padding-left: 0px; | ||
} | ||
#sidebar-wrapper { | ||
width: 250px; | ||
} | ||
#wrapper.toggled | ||
#sidebar-wrapper { | ||
width: 250px; | ||
} | ||
#page-content-wrapper { | ||
padding-left: 50px; | ||
position: relative; | ||
} | ||
.logo-separator { | ||
background-color: #151515; | ||
height: 60px; | ||
} | ||
|
||
#wrapper.toggled #page-content-wrapper { | ||
position: relative; | ||
margin-right: 0; | ||
padding-left: 35px; } | ||
a.bg-dark { | ||
background-color: #151515 !important; | ||
} | ||
|
||
a.bg-dark:not(.no-hover):hover { | ||
background-color: #303436 !important; | ||
} | ||
**/ |
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,17 +1,22 @@ | ||
$("#menu-toggle").click(function(e) { | ||
e.preventDefault(); | ||
const isIE11 = !!navigator.userAgent.match(/Trident.*rv\:11\./); | ||
//https://codepen.io/lfrichter/pen/mQJJyB | ||
|
||
$("#toggleIcon").toggleClass("fa fa-angle-double-left fa fa-angle-double-right"); | ||
let wrapper = $("#wrapper") | ||
wrapper.toggleClass("toggled"); | ||
// Collapse/Expand icon | ||
button = $('#collapse-icon') | ||
button.addClass('fa-xmark'); | ||
|
||
if(isIE11){ | ||
let sidebarWrapper = $("#sidebar-wrapper") | ||
if(wrapper.hasClass("toggled")){ | ||
sidebarWrapper.css("margin-left", "-268px") | ||
} else { | ||
sidebarWrapper.css("margin-left", "-250px") | ||
} | ||
} | ||
// Collapse click | ||
$('[data-toggle=sidebar-collapse]').click(function() { | ||
SidebarCollapse(); | ||
}); | ||
|
||
function SidebarCollapse () { | ||
$('.sidebar-separator-title').toggleClass('invisible'); | ||
$('.menu-collapsed').toggleClass('d-none'); | ||
$('#wrapper').toggleClass('sidebar-expanded sidebar-collapsed'); | ||
$('#sidebar-wrapper').toggleClass('sidebar-expanded sidebar-collapsed'); | ||
$('#page-content-wrapper').toggleClass('sidebar-expanded sidebar-collapsed'); | ||
$('.sidebar-item').toggleClass('justify-content-start justify-content-center') | ||
|
||
// Collapse/Expand icon | ||
button.toggleClass('fa-xmark fa-bars'); | ||
} |
Oops, something went wrong.