{% include setlang.html %}
<div class="row row-eq-height">
{% for software in include.items %}

  {% assign description = software.publiccode.description[active_lang]
          | default: software.publiccode.description.en
          | default: software.publiccode.description.it %}

  {% assign sw_name = description.localisedName | default: software.publiccode.name %}

  {% assign sw_url = '/' | append: active_lang | append: '/software/' | append: software.slug | downcase %}
  {% if software.publiccode.it.riuso.codiceIPA != nil %}
    {% assign category = "software_reuse" %}
    {% assign icon = "it-software" %}
    {% assign fallback = "/assets/images/cover_softwareriuso.png" %}
  {% else %}
    {% assign category = "software_open" %}
    {% assign fallback = "it-open-source" %}
    {% assign fallback = "/assets/images/cover_software_opensource.png" %}
  {% endif %}

  {% assign first_screenshot = description.screenshots | first %}

  <div class="col-md">
    <catalogue-item
      class="main-image"
      id="{{ include.scope }}-{{  software.id }}"
      name="{{ sw_name }}"
      description="{{ description.shortDescription | escape }}"
      url="{{ sw_url }}"
      icon="{{ icon }}"
      category="{{ category }}"
      logo="{{ software.publiccode.logo | default: first_screenshot }}"
      fallback="{{ fallback }}"
    ></catalogue-item>
  </div>
{% endfor %}

</div>
