<article class="post-card {{post_class}} {{#unless feature_image}}no-image{{else}}{{#is "home"}}{{#has index="nth:6"}}post-card-large{{/has}}{{/is}}{{/unless}}">
    {{#if from}}
        <div class="post-card-content">
            {{#if next}}
                <a class="post-card-content-link" href="{{url}}"><h2 class="post-card-title">下一篇 - {{title}}</h2></a>
            {{/if}}
            {{#if prev}}
                <a class="post-card-content-link" href="{{url}}"><h2 class="post-card-title">上一篇 - {{title}}</h2></a>
            {{/if}}
        </div>
    {{/if}}
    {{#if feature_image}}
    <a class="post-card-image-link" href="{{url}}">
        {{!-- This is a responsive image, it loads different sizes depending on device
        https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
        <img class="post-card-image"
            srcset="{{img_url feature_image size="s"}} 300w,
                    {{img_url feature_image size="m"}} 600w,
                    {{img_url feature_image size="l"}} 1000w,
                    {{img_url feature_image size="xl"}} 2000w"
            sizes="(max-width: 1000px) 400px, 700px"
            src="{{img_url feature_image size="m"}}"
            alt="{{title}}"
        />
    </a>
    {{/if}}

    
    {{#if from}}
        <header class="post-card-header">
            {{#foreach tags}}
                <a class='tag-name' href="{{url}}">{{name}}</a>
            {{/foreach}}
        </header>
    {{else}}
    <div class="post-card-content" >

            <header class="post-card-header">
                <a class="post-card-content-link" href="{{url}}"><h2 class="post-card-title">{{title}}</h2></a>
            </header>
            <section class="post-card-excerpt">
                
                {{#if feature_image}}
                    <p>文章简介 <span class="bull">&bull;</span> {{excerpt words="30"}}</p>
                {{else}}
                    <p>文章简介 <span class="bull">&bull;</span> {{excerpt words="44"}}</p>
                {{/if}}
            </section>
            {{#if tags}}
                <header class="post-card-header" >
                {{#foreach tags}}
                    <a class='tag-name' href="{{url}}">{{name}}</a>
                {{/foreach}}
                </header>
            {{/if}}

        <footer class="post-card-meta" style="padding-left: 0px;">
            <ul class="author-list">
                {{#foreach authors}}
                <li class="author-list-item">
            
                    <div class="author-name-tooltip">
                        {{name}}
                    </div>
            
                    {{#if profile_image}}
                    <a href="{{url}}" class="static-avatar">
                        <img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
                    </a>
                    {{else}}
                    <a href="{{url}}" class="static-avatar author-profile-image">{{> "icons/avatar"}}</a>
                    {{/if}}
                </li>
                {{/foreach}}
            </ul>
            <div class="post-card-byline-content" style="margin-top: 0.8em;">
                <span>{{#has author="count:>2"}}多个作者{{else}}{{authors}}{{/has}}</span>
                <span class="post-card-byline-date">更新时间 - <time datetime="{{date updated_at format="YYYY-MM-DD"}}">{{date updated_at format="YYYY-MM-DD"}}</time> 
            </div>
        </footer>

    </div>{{!--/.post-card-content--}}
    {{/if}}


</article>
