move navbar to burger menu on mobile

Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
This commit is contained in:
Jérémie Drouet 2020-05-20 09:48:43 +02:00
parent 135a21401e
commit dbe4953982
5 changed files with 38 additions and 29 deletions

View File

@ -15,13 +15,13 @@
<span class="icon-bar"></span>
</button>
</div>
<div class="nav-container">
<div class="nav-container hidden-sm hidden-xs">
<div id="tabs">
<ul class="tabs" id="jsTOCHorizontal">
<ul class="tabs jsTOCHorizontal">
</ul>
</div>
<div class="ctrl-right hidden-xs hidden-sm">
<div class="ctrl-right">
<a href="javascript:void(0)" id="menu-toggle"><i class="fa fa-indent" aria-hidden="true"></i></a>
{% include archive-list.html %}
</div>

View File

@ -1,4 +1,7 @@
{% if page.landing == true %}<div id="navbar" class="nav-sidebar">{%else%}<div id="navbar" class="nav-sidebar">{% endif %}
<div id="navbar" class="nav-sidebar">
<ul class="nav jsTOCHorizontal hidden-md hidden-lg">
</ul>
<div class="divider hidden-md hidden-lg"></div>
<ul class="nav" id="jsTOCLeftNav">
</ul>
</div>

View File

@ -4,9 +4,9 @@
*
*/
@media only screen
@media only screen
and (min-width : 376px)
and (max-width : 1150px) {
and (max-width : 1150px) {
.nav-primary,
.hero-text,
.banner,
@ -55,9 +55,9 @@
}
}
@media only screen
@media only screen
and (min-width : 376px)
and (max-width : 900px) {
and (max-width : 900px) {
.sidebar {
position: fixed;
width: 100%;
@ -76,8 +76,8 @@
*/
/* Portrait and Landscape */
@media only screen
and (min-device-width: 320px)
@media only screen
and (min-device-width: 320px)
and (max-device-width: 670px) {
.logo,
.hero-text,
@ -92,8 +92,8 @@
}
/* Portrait */
@media only screen
and (min-device-width: 320px)
@media only screen
and (min-device-width: 320px)
and (max-device-width: 667px)
and (orientation: portrait) {
h1,
@ -121,7 +121,6 @@
.nav-secondary-tabs,
.nav-secondary {
background-color: $black;
height: 100px;
}
.nav-secondary input[type=search] {
background: rgb(78, 77, 77) url(/images/search.png) no-repeat 10px 9px;
@ -143,7 +142,7 @@
font-size: 12px;
}
.content {
padding: 120px 25px;
padding: 65px 25px;
}
.main-content {
padding: 10px 25px;
@ -212,9 +211,9 @@
}
/* Landscape */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 667px)
@media only screen
and (min-device-width: 320px)
and (max-device-width: 667px)
and (orientation: landscape) {
h1,
h2,
@ -284,8 +283,8 @@
*/
@media only screen
and (min-device-width: 768px)
@media only screen
and (min-device-width: 768px)
and (max-device-width: 1110px) {
.logo {
margin: 12px 10px 0 10px;
@ -316,9 +315,9 @@
}
/* Portrait */
@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: portrait) {
.nav-secondary input[type=search] {
background: rgba(255, 255, 255, 0.17) url(/images/search.png) no-repeat 10px 9px;
@ -326,9 +325,9 @@
}
/* Landscape */
@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: landscape) {
.search-form {
float: left;

View File

@ -164,7 +164,7 @@
.collapsed
{
cursor:pointer;
cursor:pointer;
}
/*
@ -308,7 +308,7 @@ input:checked+.slider:before {
#tabs {
float: left;
margin: 0;
padding-left: 8px;
padding-left: 8px;
ul {
padding: 0;
}
@ -384,4 +384,9 @@ input:checked+.slider:before {
margin: 2px 0 0;
}
.divider {
height: 1px;
margin: 9px 35px;
overflow: hidden;
background-color: #077CBC;
}

View File

@ -104,7 +104,9 @@ function renderNav(docstoc) {
}
outputHorzTabs.push('><a href="' + docstoc.horizontalnav[i].path + '">' + docstoc.horizontalnav[i].title + "</a></li>\n");
}
document.getElementById("jsTOCHorizontal").innerHTML = outputHorzTabs.join("");
document.querySelectorAll('.jsTOCHorizontal').forEach(function(element) {
element.innerHTML = outputHorzTabs.join("");
});
document.getElementById("jsTOCLeftNav").innerHTML = outputLetNav.join("");
}