Styled the navbar; allowed collapsing it to give the user more screen space

This commit is contained in:
2022-12-18 23:31:43 -05:00
parent 5139d8b492
commit 97ced7d80e
7 changed files with 138 additions and 8 deletions

View File

@ -0,0 +1,12 @@
$(document).ready( ->
$('#nav-toggle').on('click', toggleNav)
)
toggleNav = () ->
bodyElem = $('body')
if bodyElem.hasClass('collapsed')
bodyElem.removeClass('collapsed')
else
bodyElem.addClass('collapsed')

View File

@ -6,6 +6,7 @@ $box-shadow-2: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
body{
background: lightgrey;
padding-left: $nav-width;
transition: padding-left 230ms ease-in-out;
}
.card{
@ -26,9 +27,21 @@ body{
color: white;
box-shadow: $box-shadow-1;
box-sizing: border-box;
transition: left 230ms ease-in-out;
h3{
text-align: center;
padding-left: 15px;
text-align: left;
i{
position: absolute;
right: 22px;
margin-top: 5px;
font-size: 3rem;
&:hover{
cursor: pointer;
}
}
}
ul{
@ -41,6 +54,13 @@ body{
&:first-child{
border-top: 1px solid #999;
}
i{
position: absolute;
right: 18px;
margin-top: 5px;
font-size: 3rem;
}
}
a{
@ -60,6 +80,13 @@ body{
}
}
body.collapsed{
padding-left: 64px;
}
body.collapsed #main-nav{
left: calc($nav-width * -1 + 64px);
}
#main-actions{
width: 100%;
max-width: 100%;