<a 
    data-toubiz-gallery-item
    href="{item.sourceUri}"
    data-sub-html="<p>{item.title} <span>{f:render(section: 'Copyright', arguments: '{copyright: item.copyright}')}</span></p>"
    class="tb-gallery-preview__link">

    <img 
        src="{item.sourceUri}"
        alt="{item.title}"
        class="tb-gallery-preview__image"
        itemprop="image" />

    <f:if condition="{caption}">
        <div class="tb-gallery-preview__caption">
            <p class="text-sm">
                <f:if condition="{item.title}">
                    {item.title}
                    <br />
                </f:if>
                <span class="text-xs">
                    <f:render section="Copyright" arguments="{copyright: item.copyright}" />
                </span>
            </p>
        </div>
    </f:if>
</a>

<f:section name="Copyright">
    <f:if condition="{copyright}">
        © {copyright}
    </f:if>
</f:section>
