profile.ejs 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. <% var profile = theme.customize.profile; %>
  2. <% var tagCount = site.tags.filter(function(tag) { return tag.length; }).length; %>
  3. <aside id="profile">
  4. <div class="inner profile-inner">
  5. <div class="base-info profile-block">
  6. <img id="avatar" src="<%= ( profile.gravatar ? gravatar(profile.gravatar, 128) : url_for(profile.avatar)) %>" />
  7. <h2 id="name"><%= profile.author %></h2>
  8. <h3 id="title"><%= profile.author_title %></h3>
  9. <span id="location"><i class="fa fa-map-marker"></i><%= profile.location %></span>
  10. <a id="follow" target="_blank" href="<%= profile.follow %>"><%= __('profile.follow') %></a>
  11. </div>
  12. <div class="article-info profile-block">
  13. <div class="article-info-block">
  14. <%= site.posts.length %>
  15. <span><%= (site.posts.length > 1 ? __('profile.posts') : __('profile.post')) %></span>
  16. </div>
  17. <div class="article-info-block">
  18. <%= tagCount %>
  19. <span><%= (tagCount > 1 ? __('profile.tags') : __('profile.tag')) %></span>
  20. </div>
  21. </div>
  22. <% if(theme.customize.social_links) { %>
  23. <div class="profile-block social-links">
  24. <table>
  25. <tr>
  26. <% for(var i in theme.customize.social_links) { %>
  27. <td><a href="<%- url_for(theme.customize.social_links[i]) %>" target="_blank" title="<%= i %>"><i class="fa fa-<%= i %>"></i></a></td>
  28. <% } %>
  29. </tr>
  30. </table>
  31. </div>
  32. <% } %>
  33. </div>
  34. </aside>