{% extends "juice/templates/index.html" %}
{% block head %}
<meta name="keywords"
      content="go, golang, go docs, docs, search extension">
<meta itemprop="name"
      content="{{ config.extra.meta_title }}">
<meta itemprop="description"
      content="{{ config.extra.meta_description }}">
<meta itemprop="image" content="https://go.extension.sh/banner.png">

<meta property="og:url" content="https://go.extension.sh">
<meta property="og:type" content="website">
<meta property="og:title"
      content="{{ config.extra.meta_title }}">
<meta property="og:description"
      content="{{ config.extra.meta_description }}">
<meta property="og:image" content="https://go.extension.sh/banner.png">

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@_huhuio">
<meta name="twitter:creator" content="@_huhuio">
<meta name="twitter:title"
      content="{{ config.extra.meta_title }}">
<meta name="twitter:description"
      content="{{ config.extra.meta_description }}">
<meta name="twitter:image" content="https://go.extension.sh/banner.png">
<link rel="stylesheet" href="{{ get_url(path="index.css") }}">
<link rel="stylesheet" href="{{ get_url(path="carbon.css") }}">
{% endblock head %}
{% block hero %}
<section style="padding:10px">
    <h1 class="text-center heading-text">
        The ultimate search extension for Golang
    </h1>
    <h3 class="text" style="text-align: center;">
        Input keyword <b>go</b> then press
        <code>Space</code> in the address bar
        to get started. Just that easy!
    </h3>
    <div style="margin-top: 50px; display: flex; flex-direction: column; align-items: center">
        <a class="subtitle-text" style="text-decoration: underline; margin: 10px"
           href="https://github.com/huhu/go-search-extension/releases">
            Current version 0.2.1
        </a>
        <a class="btn-download chrome"
           href="https://chrome.google.com/webstore/detail/golang-search/epanejkfcekejmmfbcpbcbigfpefbnlb"
           target="_blank">
            Install to Chrome
        </a>
        <a class="btn-download firefox" href="https://addons.mozilla.org/en-US/firefox/addon/go-search-extension/"
           target="_blank">
            Install to Firefox
        </a>
        <a class="btn-download edg"
           href="https://microsoftedge.microsoft.com/addons/detail/ebibclchdmagkhopidkjckjkbhghfehh"
           target="_blank">
            Install to Edge
        </a>
    </div>
</section>
<img class="gopher" src="{{ get_url(path="gopher.svg") }}" alt="gopher">
<div class="explore-more text"
     onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})">
    Explore More ⇩
</div>
<script>
    function mobilizeDownloadButton() {
        let navigator = window.navigator.userAgent.toLocaleLowerCase();
        if (window.innerWidth < 768) {
            document.querySelectorAll('.btn-download').forEach((element) => {
                element.classList.add('hide');
            });
            let target = ['firefox', 'edg'].find(item => navigator.includes(item)) || 'chrome';
            document.querySelector(`.${target}`).classList.remove('hide');
        } else {
            document.querySelectorAll('.btn-download').forEach((element) => {
                element.classList.remove('hide');
            });
        }
    }
    mobilizeDownloadButton();
    window.onresize = function () { mobilizeDownloadButton() };
</script>
{% endblock %}

{% block sidebar %}
<div class="sidebar">
    <script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CEBIL27E&placement=extensionsh" id="_carbonads_js"></script>
</div>
{% endblock %}

{% block footer %}
<iframe id="footer" src="https://huhu.io/extension-footer.html"
        style="display:block;width:100%;border:none;"></iframe>
<script>
    window.onmessage = e => {
        e.data.hasOwnProperty("frameHeight") && (document.getElementById("footer").style.height = `${e.data.frameHeight}px`)
    }
</script>
{% endblock footer %}