<!DOCTYPE html>
<html lang="{{ site.lang }}">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" >
  <meta property="og:image" content="{{ '/images/sticker.png' | relative_url }}" />
  <meta name="apple-mobile-web-app-title" content="Hive Devportal" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />

  <title>{% t page.title %}</title>
  <meta property="og:title" content="{% t page.title %}" />
  <meta name="twitter:card" content="summary" />
  <meta property="twitter:title" content="{% t page.title %}" />

  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
  <link rel="shortcut icon" type="image/png" href="{{ '/favicon.png' | relative_url }}" />
  <link rel="apple-touch-icon" type="image/png" href="{{ '/favicon.png' | relative_url }}" />
  <link rel="apple-touch-icon" sizes="152x152" href="{{ '/favicon.png' | relative_url }}" />
  <link rel="apple-touch-icon" sizes="180x180" href="{{ '/favicon.png' | relative_url }}" />
  <link rel="apple-touch-icon" sizes="167x167" href="{{ '/favicon.png' | relative_url }}" />

  <link rel="stylesheet" href="{{ '/css/style.css' | relative_url }}" />
  <link rel="stylesheet" href="{{ '/css/css/fontawesome-all.min.css' | relative_url }}" />
  <link rel="stylesheet" href="{{ '/css/css/work-sans-v7.css' | relative_url }}" />
  <script src="{{ '/js/hive.min.js' | relative_url }}"></script>
  <script src="{{ '/js/main.js' | relative_url }}"></script>
  <script src="{{ '/js/adjust.js' | relative_url }}"></script>

  {% seo title=false %}

  {% if jekyll.environment == 'production' %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_key }}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '{{ site.google_analytics_key }}');
</script>
  {% endif %}
</head>
<body>
<header>
  <h1>
    <button type="button" class="open-nav" id="open-nav"></button>
    <a href="{{ '/' | relative_url }}"  class="logo-link"><img src="{{ '/images/logotype_black.svg' | relative_url }}" height="40" alt="{{ site.title }} logo"></a>
  </h1>

  {% if jekyll.environment == 'production' %}
  <form action="{{ '/search/' | relative_url }}" method="get">
    <input type="text" name="q" id="search-input" placeholder="Search">
    <input type="submit" value="Search" style="display: none;">
  </form>
  {% else %}
  <form action="{{ '/search/' | relative_url }}" method="get">
    <input type="text" name="q" id="search-input" placeholder="Search">
    <input type="submit" value="Search" style="display: none;">
  </form>
  {% endif %}

  {% include sidebar.html %}
</header>
<div class="main" id="top">
  <div class="hero">
    <h1 class="hero__h1">{% t titles.portal %} {% if page.section %} - {% t page.section %}{% endif %}</h1>
    <img class="hero__img" src="{{ '/images/honey-comb-92.png' | relative_url }}" style="position: relative; top: 10px;" />
  </div>
  {{ content }}
</div>
<div class="footer">
  <a href="#">Back to top</a>
</div>
<script>
    document.getElementById("open-nav").addEventListener("click", function () {
        document.body.classList.toggle("nav-open");
    });
    // assets/js/post.js
    let codeBlocks = document.querySelectorAll('pre.highlight');

    codeBlocks.forEach(function (codeBlock) {
      let copyButton = document.createElement('button');
      copyButton.className = 'copy';
      copyButton.type = 'button';
      copyButton.ariaLabel = 'Copy code to clipboard';
      copyButton.innerText = 'Copy';

      codeBlock.append(copyButton);

      copyButton.addEventListener('click', function () {
        let code = codeBlock.querySelector('code').innerText.trim();
        window.navigator.clipboard.writeText(code);

        copyButton.innerText = 'Copied';
        let fourSeconds = 4000;

        setTimeout(function () {
          copyButton.innerText = 'Copy';
        }, fourSeconds);
      });
    });
</script>
</body>
</html>
