mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
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:
parent
0fd9b52b62
commit
19ccc32b9a
@ -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;
|
||||
}
|
||||
|
@ -60,4 +60,5 @@
|
||||
{{/gh-dropdown}}
|
||||
</div>{{! .help-menu }}
|
||||
</footer>
|
||||
<section class="gh-nav-toggle"></section>
|
||||
</nav>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</aside>
|
||||
-->
|
||||
|
||||
<div class="gh-viewport-container">
|
||||
<div class="gh-viewport-container open-nav">
|
||||
|
||||
{{#unless signedOut}}
|
||||
{{partial "nav-menu"}}
|
||||
|
Loading…
Reference in New Issue
Block a user