<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>ungleich.ch - {% block title %}Welcome!{% endblock %}</title>
    <!-- Bootstrap + helpers2 -->
    <link rel="stylesheet"
          href="/u/static/bootstrap-4.4.1-dist/css/bootstrap.min.css">

    <link rel="shortcut icon" href="/u/static/images/favicon.ico"/>
    <link rel="stylesheet" href="/u/static/generic-header.css"/>

    <!-- Google analytics -->
    <script>
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

        ga('create', 'UA-62285904-1', 'auto');
        ga('send', 'pageview');
    </script>
    <!-- End Google Analytics -->

  </head>
  <body>
    {% if this.header %}
      {% set nav_style = 'background-color:' + this.header.blocks[0].primary_color + ';' %}
      {% set nav_classes = this.header.blocks[0].nav_link_color %}
    {% else %}
      {% set nav_classes = 'navbar-light bg-light' %}
    {% endif %}

    <nav class="navbar navbar-expand-lg {{ nav_classes }}" style="{{ nav_style }}">
      <a class="navbar-brand" href="https://ungleich.ch">
        {% if 'navbar-dark' in nav_classes %}
          <img src="/u/image/ungleich-logo-white.svg" width="100px" alt="ungleich" style='padding-top: 0.5rem; padding-bottom: 0.8rem;'>
        {% else %}
          <img src="/u/image/ungleich-logo-black.svg" width="100px" alt="ungleich" style='padding-top: 0.5rem; padding-bottom: 0.8rem;'>
        {% endif %}
      </a>
      <button class="navbar-toggler" type="button"
              data-toggle="collapse"
              data-target="#navbarSupportedContent"
              aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>

      <!-- MENU HERE -->
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
          <li class="nav-item active">
            <a class="nav-link" href="/blog/">Old Blog<a/>
          </li>
          <li class="nav-item active">
            <a class="nav-link" href="/u/blog/">New Blog<a/>
          </li>
          <li class="nav-item active">
            <a class="nav-link" href="https://chat.ungleich.ch/">Chat<a/>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/u/products/">Products</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/u/projects/">Projects</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/u/deals/">Deals</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/u/events/">Events</a>
          </li>
        </ul>
        <form class="form-inline my-2 my-lg-0"
              action="https://search.ungleich.ch/yacysearch.html" method="get">
          <input class="form-control mr-sm-2" type="search"
                 placeholder="Search" name="query" aria-label="Search">
          <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>

          <a class="nav-link" href="/u/">
            <button type="button" class="btn btn-info"
                    style="margin-left: 8px;">
              BETA Website
            </button>
          </a>
        </form>
      </div>
    </nav>
    {% if this.header %}
      {{ this.header.blocks[0] }}
    {% else %}
    <div class="position-relative overflow-hidden p-3 p-md-5 m-md-3 text-center bg-light">
      <div class="col-md-5 p-lg-5 mx-auto my-5">
        <h1 class="display-4 font-weight-normal">{{ self.title() }}
        <p class="lead font-weight-normal">
          {% block subtitle %}{% endblock %}
        </p>
      </div>
      <div class="product-device shadow-sm d-none d-md-block"></div>
      <div class="product-device product-device-2 shadow-sm d-none d-md-block"></div>
    </div>
    {% endif %}

    {% block content %}{% endblock %}

    <hr/>
    <footer class="footer mt-auto py-3">
      <div class="container">
        <span class="text-muted">Copyright
          <a class=footer-link href="https://ungleich.ch">ungleich
            glarus ag</a>.</span>
      </div>
    </footer>

    <!-- slow javascript at the end -->
    <script type="text/javascript"
            src="/u/static/js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript"
            src="/u/static/popper.js-1.16.0/dist/esm/popper.min.js"></script>
    <script type="text/javascript"
            src="/u/static/bootstrap-4.4.1-dist/js/bootstrap.min.js"></script>
  </body>
</html>
