{% set tags = h.get_facet_items_dict('tags', search_facets, limit=3) %}
{% set placeholder = _('E.g. environment') %}
{% set dataset_type = h.default_package_type() %}

<div class="module-search card box">
  <form class="module-content search-form" method="get" action="{% url_for dataset_type ~ '.search' %}">
    <h3 class="heading">{{ _("Search data") }}</h3>
    <div class="search-input form-group search-giant">
      <input aria-label="{% block header_site_search_label %}{{ h.humanize_entity_type('package', dataset_type, 'search placeholder') or _('Search datasets') }}{% endblock %}" id="field-main-search" type="text" class="form-control" name="q" value="" autocomplete="off" placeholder="{% block search_placeholder %}{{ placeholder }}{% endblock %}" />
      <button class="btn" type="submit" aria-labelledby="search-label">
        <i class="fa fa-search"></i>
        <span class="sr-only" id="search-label">{{ _('Search') }}</span>
      </button>
    </div>
  </form>
  <div class="tags">
    <h3>{{ _('Popular tags') }}</h3>
    {% for tag in tags %}
      <a class="tag" href="{% url_for 'dataset.search', tags=tag.name %}" aria-label="{{ _('Search datasets with the tag: {tag}').format(tag=tag.display_name) }}"> {{ tag.display_name|truncate(22) }}</a>
    {% endfor %}
  </div>
</div>
