{% extends "index.html" %}

{% block title %}
    Search &ndash; {{ SITENAME }}
{% endblock title %}

{% block header %}
    <div class="container">
        <div class="row">
            <div class="col-8">
                <h3 id="Search in {{ SITENAME }}" style="color: orange;">Search in {{ SITENAME }}</h3>
            </div>
            <div class="col-4 small" style="margin-top: 0.5rem;">
                {% if ADD_THIS_ID and (page_name or page or article) %}
                    <div class="text-right mb-2 small" style="height: 26px">
                        <div class="addthis_inline_share_toolbox"></div>
                    </div>
                {% endif %}
            </div>
        </div>
    </div>
{% endblock header %}

{% block add_this %}
{# remove ADD_THIS in content, move to above header #}
{% endblock add_this %}

{% block content %}
    <!-- Tipue Search -->
    <form>
        <div class="tipue_search_group">
            <input type="text" name="q" id="tipue_search_input" pattern=".{3,}" title="At least 3 characters" required>
            <button type="submit" class="tipue_search_button">
                <div class="tipue_search_icon">&#9906;</div>
            </button>
        </div>
    </form>

    <div id="tipue_search_content"></div>

    <!-- Google Adsense -->
    {% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.page %}
        <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        <!-- ad-home -->
        <ins class="adsbygoogle"
             style="display:block"
             data-ad-client="{{ GOOGLE_ADSENSE.id }}"
             data-ad-slot="{{ GOOGLE_ADSENSE.ads.page }}"
             data-ad-format="auto"
             data-full-width-responsive="true"></ins>
        <script>
             (adsbygoogle = window.adsbygoogle || []).push({});
        </script>
    {% endif %}

    <!-- Google Search -->
    {% if GOOGLE_CSE_ID %}
        <script async src="https://cse.google.com/cse.js?cx=007986648373531383257:hnbvizg2lks"></script>
        <div class="gcse-search"></div>
    {% endif %} 
{% endblock content %}