setup the basic css structure for the slider nav menu

- toggles the persistent sidenav under the open-nav class
- adds a toggle/hover bar to the side of the sidenav that shows the nav
  on hover
This commit is contained in:
Joe Wegner 2015-05-19 16:36:33 -05:00 committed by Hannah Wolfe
parent 36f190247f
commit 0eef6b6284
3 changed files with 71 additions and 12 deletions

View File

@ -15,29 +15,83 @@
display: flex;
}
.gh-nav {
flex: 0 0 220px;
display: flex;
flex-direction: column;
border-right: #e1e1e1 1px solid;
background: #f6f6f6;
}
.gh-main {
position: relative;
flex-grow: 1;
display: flex;
margin-left: 15px;
}
.open-nav .gh-main {
margin-left: 0;
}
/* Global Nav
/* ---------------------------------------------------------- */
.gh-nav {
position: absolute;
top: 0;
left: -220px;
z-index: 10;
display: block;
width: 235px;
height: 100%;
border-right: #e1e1e1 1px solid;
background: #f6f6f6;
transition: transform 0.2s;
transform: translateX(0);
}
.gh-nav:hover {
transform: translateX(220px);
}
.open-nav .gh-nav {
position: static;
flex: 0 0 235px;
display: flex;
flex-direction: column;
width: auto;
height: auto;
transform: translateX(0);
}
.gh-nav-toggle {
position: absolute;
top: 0;
right: 0;
z-index: 5;
width: 15px;
height: 100%;
text-align: center;
cursor: pointer;
}
.gh-nav-toggle:hover {
background-color: rgb(224, 238, 250);
}
.gh-nav-toggle:after {
content: ">";
position: absolute;
top: 50%;
left: 50%;
font-size: 14px;
opacity: 0.25;
transform: translateX(-50%) translateY(-50%);
}
.open-nav .gh-nav-toggle:after {
content: "<";
}
.gh-nav-menu {
flex-shrink: 0;
display: flex;
align-items: center;
padding: 15px;
padding: 15px 30px 15px 15px;
}
.gh-nav-menu i {
@ -93,7 +147,7 @@
.gh-nav-search {
position: relative;
margin: 0 15px 10px;
margin: 0 30px 10px;
}
.gh-nav-search-input {
@ -127,7 +181,7 @@
.gh-nav-list {
margin: 0;
padding: 0 15px 0 0;
padding: 0 30px 0 0;
list-style: none;
font-size: 1.3rem;
line-height: 1.5em;
@ -174,9 +228,13 @@
}
.gh-nav-footer {
position: absolute;
bottom: 0;
flex-shrink: 0;
display: flex;
align-items: center;
padding-right: 15px;
width: 100%;
height: 40px;
border-top: #e1e1e1 1px solid;
}

View File

@ -60,4 +60,5 @@
{{/gh-dropdown}}
</div>{{! .help-menu }}
</footer>
<section class="gh-nav-toggle"></section>
</nav>

View File

@ -14,7 +14,7 @@
</aside>
-->
<div class="gh-viewport-container">
<div class="gh-viewport-container open-nav">
{{#unless signedOut}}
{{partial "nav-menu"}}