Scroll page instead of nested div, removed nested divs

This commit is contained in:
Silvio Giebl 2019-11-27 22:07:22 +01:00
parent cf64965554
commit 73047a078f
3 changed files with 88 additions and 128 deletions

View File

@ -26,7 +26,6 @@ layout: table_wrappers
</symbol>
</svg>
<div class="page-wrap">
<div class="side-bar">
<div class="site-header">
<a href="{{ '/' | absolute_url }}" class="site-title lh-tight">{% include title.html %}</a>
@ -41,7 +40,6 @@ layout: table_wrappers
This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
</footer>
</div>
<div id="main-wrap" class="main-wrap" tabindex="0">
<div class="main">
<div id="main-header" class="main-header">
{% if site.search_enabled != false %}
@ -111,14 +109,12 @@ layout: table_wrappers
</div>
</div>
</div>
</div>
{% if site.search_enabled != false %}
<a href="#" id="search-button" class="search-button">
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#search"></use></svg>
</a>
{% endif %}
</div>
</body>
</html>

View File

@ -2,19 +2,6 @@
// The basic two column layout
//
.page-wrap {
@include mq(md) {
position: absolute;
top: 0;
left: 0;
display: flex;
width: 100%;
height: 100%;
overflow-x: hidden;
overflow-y: hidden;
}
}
.side-bar {
z-index: 100;
display: flex;
@ -23,7 +10,7 @@
@include mq(md) {
flex-wrap: nowrap;
position: absolute;
position: fixed;
width: $nav-width-md;
height: 100%;
flex-direction: column;
@ -37,23 +24,6 @@
}
}
.main-wrap {
@include mq(md) {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
-webkit-overflow-scrolling: touch;
overflow-x: hidden;
overflow-y: scroll;
}
&:focus {
outline: none;
}
}
.main {
@include mq(md) {
position: relative;

View File

@ -306,16 +306,10 @@ function initSearch() {
}
{%- endif %}
function pageFocus() {
var mainWrap = document.getElementById('main-wrap');
mainWrap.focus();
}
// Document ready
jtd.onReady(function(){
initNav();
pageFocus();
{% if site.search_enabled != false -%}
initSearch();
{%- endif %}