{{!--
    Parameters:
    - title: String
--}}

<div class="slide-card"> 
    <a href="{{url}}" class="slide-card-image-link hover-image-opacity" aria-label="{{#if isPost}}{{title}}{{else}}{{name}}{{/if}}"> 
        {{#if feature_image}}                  
            <figure class="slide-card-image-wrapper">
                <img             
                    srcset="{{img_url feature_image size="xxs" format="webp"}} 100w,
                            {{img_url feature_image size="xs" format="webp"}} 150w,
                            {{img_url feature_image size="s" format="webp"}} 320w"
                    src="{{img_url feature_image size="s"}}"
                    alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
                    loading="{{#match @index 0}}eager{{else}}lazy{{/match}}"
                >
            </figure> 
        {{else}}
            <div class="slide-placeholder">
                {{> "icons/placeholder" }}
            </div>
        {{/if}}
    </a>                            
    

    <a href="{{url}}" class="small-text hover-underline slide-card-heading two-lines">
        {{title}}
    </a>

    <small class="slide-card-small-text">
        {{#if isPost}}
            {{#unless access}}
                <span class="restricted-access-icon access-icon-smaller">
                    {{> "icons/lock-icon" }}
                </span>
            {{/unless}}
            
            {{date published_at format="MMM DD, YYYY"}}
        {{else}}
            {{plural count.posts empty=(t "No Articles") singular=(t "1 Article") plural=(t "% Articles")}}
        {{/if}}
    </small>
</div>