{% extends '@nucleus/partials/particle.html.twig' %}

{% block particle %}
    {% set url = url(particle.url)|default(gantry.siteUrl()) %}
    {% if (url == gantry.siteUrl()) %}{% set rel='rel="home"' %}{% endif %}
    {% set class=(particle.class ? 'class="'~ particle.class ~'"') %}

<a href="{{ url }}" title="{{ particle.text }}" {{ rel|default('')|raw }} {{ class|default('')|raw }}>
    {% set image = url(particle.image) %}
    {% if image %}
    <img src="{{ url(particle.image) }}" alt="{{ particle.text }}" />
    {% else %}
    {{ particle.text|default('Logo') }}
    {% endif %}
</a>
{% endblock %}
