{% extends "base.html" %}

{% block content %}

<a href="/contents/" class="arrow-back h1 text-left" title="back to index"> ⇽ </a>

<div class="themes">

{{ text|safe }}

{% if 'error' in results %}

  {{ results }}

{% else %}

<div class="themeResults">

  {% for result in results %}

  <div class="eachthemeResult">
  <a href="{{ url_for('search.id_search', id=result['id'], core=core) }}">

    <p class="">

    Year:

    {{ result['year'] }}

    </p>

    {% if result['title'] is defined %}
    <p class="">
      <span class="emphasis">Title:</span>
      <span class="result-entry">
        {{ result['title'] }}
      </span>
    </p>
    {% endif %}

    {% if result['country'] is defined %}
    <p class="">
      <span class="emphasis">Country:</span>
      {% if result['country'].name is defined %}
        {{ result['country'].name }} {{ result['country'].flag }}
      {% else %}
        {{ result['country'] }}
      {% endif %}
    </p>
    {% endif %}

    {% if result['abstract'] is defined %}
    <!-- <p class="mb-2">
      <span class="emphasis">Abstract:</span>
      <span class="result-entry">
        {{ result['abstract'] }}
      </span>
    </p> -->
    {% endif %}

    <!-- <div class="search-links">
      <p>
        <span class="emphasis">Link:</span>
          <span class="result-entry">
            {{ result['application_id'] }}
          </span>
      </p>
    </div>  -->

  </a>
  </div>
  {% endfor %}

</div>

{% endif %}

</div>

{% endblock %}
