{# -*- coding: utf-8 -*-
    Copyright (C) 2020 CERN.
    Copyright (C) 2020 Northwestern University.
    Copyright (C) 2021 New York University.

    Invenio App RDM is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.
#}

{%- extends config.THEME_HEADER_TEMPLATE %}

{#- Remove search field from top bar on frontpage #}
{%- block navbar_search %}{% endblock %}

{%- block navbar %}
{{ super() }}

{%- block frontpage_search %}
<div id="frontpage-search-bar" class="ui container fluid frontpage-header">
  <div class="ui container grid rel-mt-2">
    <div class="row">
      <div class="sixteen wide column center aligned">
        {%- block frontpage_title %}
        <h1 class="ui center aligned header inverted">
          {{ _(config.THEME_FRONTPAGE_TITLE) }}
        </h1>
      </div>
    </div>
      {%- endblock frontpage_title %}
      {%- block frontpage_form %}
      <div class="row">
          <div class="sixteen wide mobile four wide computer column"></div>
          <div class="sixteen wide mobile eight wide computer column center aligned">
            <form action="{{ url_for('invenio_search_ui.search') }}" class="ui form" role="search">
              <div class="ui fluid big action input">
                <input type="text" name="q" class="form-control" placeholder="{{ _('Search') }}">
                <button type="submit" class="ui icon search button" aria-label="{{ _('Search') }}"><i class="search icon"></i></button>
              </div>
            </form>
          </div>
        </div>
        <div class="ui divider hidden"></div>
        {%- endblock frontpage_form %}
  </div>
</div>
{%- endblock frontpage_search %}

{% endblock %}
