layout: default


{% assign t = site.data.language.t %} <div class=“page-home”>

{% if site.paginate %}
    {% assign posts = paginator.posts %}
{% else %}
    {% assign posts = site.posts %}
{% endif %}
<div class="content m-auto d-flex d-sm-block">
    <div class="left flex-sm-none">
        <div class="catalogue">
            {% for post in posts %}
                {% include post-info.html post=post %}
            {% endfor %}
        </div>
        {% if site.paginate %}
        <!-- Pagination links -->
        {% include paginator.html %}
        {% endif %}
    </div>

    {% assign _stickies = site.posts | map: "sticky" %}
    <div class="right flex-sm-none">
        {% if _stickies contains true %}
        <div class="w-100 item">
            <h2 class="d-flex color-secondary title">
                <p class="flex-grow-1"><i class="fas fa-feather"></i> {{ t.pinned_articles | default: 'Pinned Articles' }}</p>
            </h2>
            <ul class="list-container">
                {% assign sticky_index = 0 %}
                {% for post in site.posts %}
                    {% if post.sticky %}
                        {% assign sticky_index = sticky_index | plus:1 %}
                        {% include trending-article-item.html post=post index=sticky_index  %}
                    {% endif %}
                {% endfor %}
            </ul>
        </div>
        {% endif %}

        {% if site.tags.size > 0 and site.morph.include.home_tags_bar %}
        {% assign home_tags_bar = site.morph.include.home_tags_bar %}
        <div class="w-100 item">
            <h2 class="d-flex color-secondary title">
                <p class="flex-grow-1"><i class="fas fa-tag"></i> {{ home_tags_bar.title | default: 'Top Tags' }}</p>
                <a class="fw-normal" href="{{ home_tags_bar.path | prepend: site.baseurl }}">
                    <span style="font-size: .9rem">{{ t.show_more | default: 'show more' }} »</span>
                </a>
            </h2>
            <ul class="list-container">
                {% for tag in site.tags limit:12 %}
                <li class="horizontal list-style-none">
                    <a class="flat" href="{{ home_tags_bar.path | prepend: site.baseurl }}#{{ tag[0] }}">{{ tag[0] }}</a>
                </li>
                {% endfor %}
            </ul>
        </div>
        {% endif %}

        {% if site.categories.size > 0 and site.morph.include.home_categories_bar %}
        {% assign home_categories_bar = site.morph.include.home_categories_bar %}
        <div class="w-100 item">
            <h2 class="d-flex color-secondary title">
                <p class="flex-grow-1"><i class="fas fa-folder-open"></i> {{ home_categories_bar.title | default: 'Top Categories' }}</p>
                <a class="fw-normal" href="{{ home_categories_bar.path | prepend: site.baseurl }}">
                    <span style="font-size: .9rem">{{ t.show_more | default: 'show more' }} »</span>
                </a>
            </h2>
            <ul class="list-container">
                {% for cate in site.categories limit:10 %}
                <li class="horizontal list-style-none">
                    <a class="flat" href="{{ home_categories_bar.path | prepend: site.baseurl }}#{{ cate[0] }}">{{ cate[0] }}</a>
                </li>
                {% endfor %}
            </ul>
        </div>
        {% endif %}
    </div>
</div>

</div>