{% 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 ~'"') %}
    {% set image = url(particle.image) %}
    
    {% if particle.link == true %}
        <a href="{{ url }}" target="{{ particle.target|default('_self') }}" title="{{ particle.text }}" {{ rel|default('')|raw }} {{ class|default('')|raw }}>
    {% else %}<div {{ class|default('')|raw }}>{% endif %}
        {% if particle.svg is not empty %}
            {{ particle.svg|raw }}
        {% elseif image %}
            <img src="{{ url(particle.image) }}" alt="{{ particle.text }}" />
        {% else %}
            {{ particle.text|default('Logo') }}
        {% endif %}
    {% if particle.link == true %}</a>{% else %}</div>{% endif %}
{% endblock %}
