Skip to content
Snippets Groups Projects
Commit 73047a07 authored by Silvio Giebl's avatar Silvio Giebl
Browse files

Scroll page instead of nested div, removed nested divs

parent cf649655
No related merge requests found
...@@ -26,99 +26,95 @@ layout: table_wrappers ...@@ -26,99 +26,95 @@ layout: table_wrappers
</symbol> </symbol>
</svg> </svg>
<div class="page-wrap"> <div class="side-bar">
<div class="side-bar"> <div class="site-header">
<div class="site-header"> <a href="{{ '/' | absolute_url }}" class="site-title lh-tight">{% include title.html %}</a>
<a href="{{ '/' | absolute_url }}" class="site-title lh-tight">{% include title.html %}</a> <a href="#" id="menu-button" class="site-button">
<a href="#" id="menu-button" class="site-button"> <svg viewBox="0 0 24 24" class="icon"><use xlink:href="#menu"></use></svg>
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#menu"></use></svg> </a>
</a>
</div>
<nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
{% include nav.html %}
</nav>
<footer class="site-footer">
This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
</footer>
</div> </div>
<div id="main-wrap" class="main-wrap" tabindex="0"> <nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
<div class="main"> {% include nav.html %}
<div id="main-header" class="main-header"> </nav>
{% if site.search_enabled != false %} <footer class="site-footer">
<div class="search"> This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
<div class="search-input-wrap"> </footer>
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off"> </div>
<svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#search"></use></svg> <div class="main">
</div> <div id="main-header" class="main-header">
<div id="search-results" class="search-results"></div> {% if site.search_enabled != false %}
</div> <div class="search">
{% endif %} <div class="search-input-wrap">
{% if site.aux_links %} <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
<nav aria-label="Auxiliary" class="aux-nav"> <svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#search"></use></svg>
<ul class="aux-nav-list"> </div>
{% for link in site.aux_links %} <div id="search-results" class="search-results"></div>
<li class="aux-nav-list-item"><a href="{{ link.last }}">{{ link.first }}</a></li>
{% endfor %}
</ul>
</nav>
{% endif %}
</div> </div>
<div id="main-content-wrap" class="main-content-wrap"> {% endif %}
{% unless page.url == "/" %} {% if site.aux_links %}
{% if page.parent %} <nav aria-label="Auxiliary" class="aux-nav">
<nav aria-label="Breadcrumb" class="breadcrumb-nav"> <ul class="aux-nav-list">
<ol class="breadcrumb-nav-list"> {% for link in site.aux_links %}
{% if page.grand_parent %} <li class="aux-nav-list-item"><a href="{{ link.last }}">{{ link.first }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li> {% endfor %}
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li> </ul>
{% else %} </nav>
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li> {% endif %}
{% endif %} </div>
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li> <div id="main-content-wrap" class="main-content-wrap">
</ol> {% unless page.url == "/" %}
</nav> {% if page.parent %}
{% endif %} <nav aria-label="Breadcrumb" class="breadcrumb-nav">
{% endunless %} <ol class="breadcrumb-nav-list">
<div id="main-content" class="main-content" role="main"> {% if page.grand_parent %}
{% if site.heading_anchors != false %} <li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#link\"></use></svg>" anchorClass="anchor-heading" %} <li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
{% else %} {% else %}
{{ content }} <li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
{% endif %} {% endif %}
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
</ol>
</nav>
{% endif %}
{% endunless %}
<div id="main-content" class="main-content" role="main">
{% if site.heading_anchors != false %}
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#link\"></use></svg>" anchorClass="anchor-heading" %}
{% else %}
{{ content }}
{% endif %}
{% if page.has_children == true and page.has_toc != false %} {% if page.has_children == true and page.has_toc != false %}
<hr> <hr>
<h2 class="text-delta">Table of contents</h2> <h2 class="text-delta">Table of contents</h2>
{% assign children_list = site.pages | sort:"nav_order" %} {% assign children_list = site.pages | sort:"nav_order" %}
<ul> <ul>
{% for child in children_list %} {% for child in children_list %}
{% if child.parent == page.title and child.title != page.title %} {% if child.parent == page.title and child.title != page.title %}
<li> <li>
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %} <a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
</li> </li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
{% if site.footer_content != nil %} {% if site.footer_content != nil %}
<hr> <hr>
<footer role="contentinfo"> <footer role="contentinfo">
<p class="text-small text-grey-dk-000 mb-0">{{ site.footer_content }}</p> <p class="text-small text-grey-dk-000 mb-0">{{ site.footer_content }}</p>
</footer> </footer>
{% endif %} {% endif %}
</div>
</div>
</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> </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 %}
</body> </body>
</html> </html>
...@@ -2,19 +2,6 @@ ...@@ -2,19 +2,6 @@
// The basic two column layout // 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 { .side-bar {
z-index: 100; z-index: 100;
display: flex; display: flex;
...@@ -23,7 +10,7 @@ ...@@ -23,7 +10,7 @@
@include mq(md) { @include mq(md) {
flex-wrap: nowrap; flex-wrap: nowrap;
position: absolute; position: fixed;
width: $nav-width-md; width: $nav-width-md;
height: 100%; height: 100%;
flex-direction: column; flex-direction: column;
...@@ -37,23 +24,6 @@ ...@@ -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 { .main {
@include mq(md) { @include mq(md) {
position: relative; position: relative;
......
...@@ -306,16 +306,10 @@ function initSearch() { ...@@ -306,16 +306,10 @@ function initSearch() {
} }
{%- endif %} {%- endif %}
function pageFocus() {
var mainWrap = document.getElementById('main-wrap');
mainWrap.focus();
}
// Document ready // Document ready
jtd.onReady(function(){ jtd.onReady(function(){
initNav(); initNav();
pageFocus();
{% if site.search_enabled != false -%} {% if site.search_enabled != false -%}
initSearch(); initSearch();
{%- endif %} {%- endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment