<% var profile = theme.customize.profile; %>
<% var tagCount = site.tags.filter(function(tag) { return tag.length; }).length; %>
<aside id="profile" class="<%= (theme.customize.profile.fixed ? 'profile-fixed' : '')  %>">
    <div class="inner profile-inner">
        <div class="base-info profile-block">
            <img id="avatar" src="<%= ( profile.gravatar ? gravatar(profile.gravatar, 128) : url_for(profile.avatar)) %>" />
            <h2 id="name"><%= profile.author %></h2>
            <h3 id="title"><%= profile.author_title %></h3>
            <span id="location"><i class="fas fa-map-marker-alt" style="padding-right: 5px"></i><%= profile.location %></span>
            <a id="follow" target="_blank" href="<%= profile.follow %>"><%= __('profile.follow') %></a>
        </div>
        <div class="article-info profile-block">
            <div class="article-info-block">
                <%= site.posts.length %>
                <span><%= (site.posts.length > 1 ? __('profile.posts') : __('profile.post')) %></span>
            </div>
            <div class="article-info-block">
                <%= tagCount %>
                <span><%= (tagCount > 1 ? __('profile.tags') : __('profile.tag')) %></span>
            </div>
        </div>
        <% if(theme.customize.social_links) { %>
        <div class="profile-block social-links">
            <table>
                <tr>
                    <% var tooltipClass = theme.customize.social_link_tooltip === false ? '' : 'class=tooltip'; %>
                    <% for(var i in theme.customize.social_links) { %>
                    <td>
                        <a href="<%- url_for(theme.customize.social_links[i]) %>" target="_blank" title="<%= i %>" <%= tooltipClass %>>
                            <i class="fab fa-<%= i %>"></i>
                        </a>
                    </td>
                    <% } %>
                </tr>
            </table>
        </div>
        <% } %>
    </div>
</aside>
