<article class="card card--custom">
    {% if post.image %}
        <figure class="card__image-container">
            <img{{ post.image|get_timber_image_responsive('card') }}>
        </figure>
    {% endif %}
    <div class="card__content">
        <header class="card__header">
            <h2 class="card__title">{{ post.title }}</h2>
        </header>

        {% if post.text %}
            <div class="card__excerpt">
                {{ post.text }}
            </div>
        {% endif %}

        {% if post.link.url %}
            <a href="{{ post.link.url }}" class="card__button button button--primary" {{ post.link.target ? 'target="' ~ post.link.target ~ '"' }}>
                {{ post.link.title }}
            </a>
        {% endif %}
    </div>

    {% if post.link.url %}
        <a href="{{ post.link.url }}" class="card__link-overlay" {{ post.link.target ? 'target="' ~ post.link.target ~ '"' }}></a>
    {% endif %}
</article>
