<!doctype html>
<html lang="de">

  {% include head.html %}

  <body>

    {% include sidebar.html %}

    <div class="wrap">
      <div class="masthead">
        <div class="container">
          <h3 class="masthead-title">
            <a href="/" title="Home">Gamekeller</a>
            <small>{{ site.title | replace: 'Gamekeller', '' }}</small>
          </h3>
        </div>
      </div>

      <div class="container content">
        {{ content }}
      </div>
    </div>

    <label for="sidebar-checkbox" class="sidebar-toggle"></label>

  </body>
</html>

<!doctype html>
<html lang="de">

  {% include head.html %}

  <body>

    {% include sidebar.html %}

    <div class="wrap">
      <div class="masthead">
        <div class="container">
          <h3 class="masthead-title">
            <a href="/" title="Home">Gamekeller</a>
            <small>{{ site.title | replace: 'Gamekeller', '' }}</small>
          </h3>
        </div>
      </div>

      <div class="container content">
        {{ content }}
      </div>
    </div>

    <label for="sidebar-checkbox" class="sidebar-toggle"></label>
    <script>
      (function(document) {
        var toggle = document.querySelector('.sidebar-toggle');
        var sidebar = document.querySelector('#sidebar');
        var checkbox = document.querySelector('#sidebar-checkbox');
        var trigger = 'ontouchstart' in document ? 'touchstart' : 'click';

        document.addEventListener(trigger, function (e) {
          var target = e.target;
          if(!checkbox.checked ||
             sidebar.contains(target) ||
             (target === checkbox || target === toggle)) return;
          checkbox.checked = false;
        }, false);
      })(document);
    </script>
  </body>
</html>

Add JS to close nav when the wrap is clicked
Add JS to close nav when the wrap is clicked
