{% assign writers = site.data.authors %} {% assign homepage = false %}

<header class=“site-header outer”>

<div class="inner">
        {% include navbar.html %}
        <div class="site-header-content">
                <img class="author-profile-image" src="{{ writers.image | relative_url }}" alt="{{ writers.name }}">
                <h1 class="site-title">{{ writers.name }}</h1>
                <h2 class="author-bio">
                        {% if writers.bio %}
                                {{ writers.bio }}
                        {% else %}
                        {% endif %}
                </h2>
                <div class="author-meta">
                        <div class="author-location">
                                {% if writers.location %}
                                        {{ writers.location }}
                                        <span class="bull">•</span>
                                {% endif %}
                        </div>
                        <div class="author-stats">
                                {% assign number_of_category_post = 0 %}
                                {% for post in site.posts %}
                                        {% if post.author == writers.user_name %} 
                                                {% assign number_of_category_post=number_of_category_post | plus: 1 %}
                                        {% endif %}
                                {% endfor %}
                                {{ number_of_category_post }} posts
                                <span class="bull">•</span>
                        </div>
                        {% if writers.link %}
                                <a class="social-link" href="{{ writers.link }}" target="_blank" rel="noopener">
                                        {% include icons/web.svg %}
                                </a>
                        {% endif %}
                        {% if writers.facebook %}
                                <a class="social-link" href="https://www.facebook.com/{{ writers.facebook }}" target="_blank" rel="noopener">
                                        {% include icons/facebook.svg %}
                                </a>
                        {% endif %}
                        {% if writers.twitter %}
                                <a class="social-link" href="https://www.twitter.com/{{ writers.twitter }}" target="_blank" rel="noopener">
                                        {% include icons/twitter.svg %}
                                </a>
                        {% endif %}
                        {% if writers.github %}
                                <a class="social-link" href="https://www.github.com/{{ writers.github }}" target="_blank" rel="noopener">
                                        {% include icons/github.svg %}
                                </a>
                        {% endif %}
                        {% if writers.gitlab %}
                                <a class="social-link" href="https://www.gitlab.com/{{ writers.gitlab }}" target="_blank" rel="noopener">
                                        {% include icons/gitlab.svg %}
                                </a>
                        {% endif %}
                        <a class="social-link social-link-rss" href="{{ '/feed.xml' | relative_url }}" target="_blank" rel="noopener">
                                {% include icons/rss.svg %}
                        </a>
                </div>
        </div>
</div>

</header>

<main id=“site-main” class=“site-main outer”>

<div class="inner">
        <div class="post-feed">
                {% for post in site.posts reversed %}
                        {% if post.author == writers.user_name %}
                                {% include card.html url=post.url image=post.image category=post.category title=post.title description=post.description author=post.author content=post.content %}
                        {% endif %}
                {% endfor %}
        </div>
</div>

</main>