diff --git a/src/theme/book.css b/src/theme/book.css index 6417c67b..cce56a22 100644 --- a/src/theme/book.css +++ b/src/theme/book.css @@ -67,20 +67,12 @@ table thead td { -ms-transition: left 0.5s; transition: left 0.5s; } -@media only screen and (max-width: 1060px) { - .sidebar { - left: -300px; - } -} .sidebar code { line-height: 2em; } .sidebar-hidden .sidebar { left: -300px; } -.sidebar-visible .sidebar { - left: 0; -} .chapter { list-style: none outside none; padding-left: 0; @@ -243,26 +235,20 @@ table thead td { text-decoration: none; } .previous { - left: 315px; + left: 15px; -webkit-transition: left 0.5s; -moz-transition: left 0.5s; -o-transition: left 0.5s; -ms-transition: left 0.5s; transition: left 0.5s; } -@media only screen and (max-width: 1060px) { - .previous { - left: 15px; - } -} .next { right: 15px; } -.sidebar-hidden .previous { - left: 15px; -} -.sidebar-visible .previous { - left: 315px; +@media only screen and (min-width: 1251px) { + .sidebar-visible .previous { + left: 315px; + } } @media only screen and (max-width: 1060px) { .nav-wrapper { diff --git a/src/theme/book.js b/src/theme/book.js index 0f147a22..c85e7be1 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -68,14 +68,6 @@ $( document ).ready(function() { // Toggle sidebar $("#sidebar-toggle").click(sidebarToggle); - // Hide sidebar on section link click if it occupies large space - // in relation to the whole screen (phone in portrait) - $("#sidebar a").click(function(event){ - if (sidebar.width() > window.screen.width * 0.4) { - sidebarToggle(); - } - }); - // Scroll sidebar to current active section var activeSection = sidebar.find(".active"); if(activeSection.length) { diff --git a/src/theme/index.hbs b/src/theme/index.hbs index bc5855f4..9df89a7e 100644 --- a/src/theme/index.hbs +++ b/src/theme/index.hbs @@ -62,9 +62,10 @@