{% if include.item.project_data != nil and include.item.project_name != nil %}

{% if include.item.slug == 'index' %}
  {% assign item_slug = include.item.id | split: "/" | reverse | slice: 1 | first %}
{% else %}
  {% assign item_slug = include.item.id | split: "/" | reverse | first %}
{% endif %}
{% assign product_home_url = include.item.project_data.home_url | append: include.item_type | append: "/" | append: item_slug | append: "/" %}

{% else %}

{% assign product_home_url = include.item.url | relative_url %}

{% endif %}

<a class=“item {% if include.item.feature_with_priority != nil %}featured-item{% endif %}”

  href="{{ product_home_url }}" role="article">
{% if include.item_type == 'software' and site.is_hub != true %}
  <div class="logo-container">
    {% include software-symbol.html item_id=include.item.id %}
  </div>
{% endif %}

<header>
  {% if include.item.project_data != nil and include.item.project_name != nil %}
    {% assign project_symbol_path = include.item.project_name | append: "/assets/symbol.svg" %}
    {% assign relative_symbol_path = "/projects/" | append: project_symbol_path %}
    <div class="parent-project">
      <div class="project-logo"><img src="{{ relative_symbol_path }}"></div>
      <h4 class="project-title">{{ include.item.project_data.title }}</h4>
    </div>
  {% endif %}
  <h3 class="title">{{ include.item.title }}</h3>
</header>

<p class="body">
  {{ include.item.description }}
</p>

<footer class="meta">
  {% include tag-list.html tags=include.item.tags item_type=include.item_type %}

  {% if include.item.last_update %}
    <section class="last-update">
      Last update: {{ include.item.last_update | date: "%d/%m/%Y" }}
    </section>
  {% endif %}
</footer>

</a>