author-profile.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. {% assign author = page.author | default: page.authors[0] | default: site.author %}
  2. {% assign author = site.data.authors[author] | default: author %}
  3. <div itemscope itemtype="https://schema.org/Person">
  4. {% if author.avatar %}
  5. <div class="author__avatar">
  6. {% if author.home %}
  7. <a href="{{ author.home | relative_url }}">
  8. <img src="{{ author.avatar | relative_url }}" alt="{{ author.name }}" itemprop="image">
  9. </a>
  10. {% else %}
  11. <img src="{{ author.avatar | relative_url }}" alt="{{ author.name }}" itemprop="image">
  12. {% endif %}
  13. </div>
  14. {% endif %}
  15. <div class="author__content">
  16. {% if author.home %}
  17. <a href="{{ author.home | relative_url }}"><h3 class="author__name" itemprop="name">{{ author.name }}</h3></a>
  18. {% else %}
  19. <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
  20. {% endif %}
  21. {% if author.bio %}
  22. <div class="author__bio" itemprop="description">
  23. {{ author.bio | markdownify }}
  24. </div>
  25. {% endif %}
  26. </div>
  27. <div class="author__urls-wrapper">
  28. <button class="btn btn--inverse">{{ site.data.ui-text[site.locale].follow_label | remove: ":" | default: "Follow" }}</button>
  29. <ul class="author__urls social-icons">
  30. {% if author.location %}
  31. <li itemprop="homeLocation" itemscope itemtype="https://schema.org/Place">
  32. <i class="fas fa-fw fa-map-marker-alt" aria-hidden="true"></i> <span itemprop="name">{{ author.location }}</span>
  33. </li>
  34. {% endif %}
  35. {% if author.links %}
  36. {% for link in author.links %}
  37. {% if link.label and link.url %}
  38. <li><a href="{{ link.url }}" rel="nofollow noopener noreferrer"><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i><span class="label">{{ link.label }}</span></a></li>
  39. {% endif %}
  40. {% endfor %}
  41. {% endif %}
  42. {% if author.uri %}
  43. <li>
  44. <a href="{{ author.uri }}" itemprop="url">
  45. <i class="fas fa-fw fa-link" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].website_label | default: "Website" }}</span>
  46. </a>
  47. </li>
  48. {% endif %}
  49. {% if author.email %}
  50. <li>
  51. <a href="mailto:{{ author.email }}">
  52. <meta itemprop="email" content="{{ author.email }}" />
  53. <i class="fas fa-fw fa-envelope-square" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
  54. </a>
  55. </li>
  56. {% endif %}
  57. {% if author.keybase %}
  58. <li>
  59. <a href="https://keybase.io/{{ author.keybase }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  60. <i class="fas fa-fw fa-key" aria-hidden="true"></i><span class="label">Keybase</span>
  61. </a>
  62. </li>
  63. {% endif %}
  64. {% if author.twitter %}
  65. <li>
  66. <a href="https://twitter.com/{{ author.twitter }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  67. <i class="fab fa-fw fa-twitter-square" aria-hidden="true"></i><span class="label">Twitter</span>
  68. </a>
  69. </li>
  70. {% endif %}
  71. {% if author.facebook %}
  72. <li>
  73. <a href="https://www.facebook.com/{{ author.facebook }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  74. <i class="fab fa-fw fa-facebook-square" aria-hidden="true"></i><span class="label">Facebook</span>
  75. </a>
  76. </li>
  77. {% endif %}
  78. {% if author.linkedin %}
  79. <li>
  80. <a href="https://www.linkedin.com/in/{{ author.linkedin }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  81. <i class="fab fa-fw fa-linkedin" aria-hidden="true"></i><span class="label">LinkedIn</span>
  82. </a>
  83. </li>
  84. {% endif %}
  85. {% if author.xing %}
  86. <li>
  87. <a href="https://www.xing.com/profile/{{ author.xing }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  88. <i class="fab fa-fw fa-xing-square" aria-hidden="true"></i><span class="label">XING</span>
  89. </a>
  90. </li>
  91. {% endif %}
  92. {% if author.instagram %}
  93. <li>
  94. <a href="https://instagram.com/{{ author.instagram }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  95. <i class="fab fa-fw fa-instagram" aria-hidden="true"></i><span class="label">Instagram</span>
  96. </a>
  97. </li>
  98. {% endif %}
  99. {% if author.tumblr %}
  100. <li>
  101. <a href="https://{{ author.tumblr }}.tumblr.com" itemprop="sameAs" rel="nofollow noopener noreferrer">
  102. <i class="fab fa-fw fa-tumblr-square" aria-hidden="true"></i><span class="label">Tumblr</span>
  103. </a>
  104. </li>
  105. {% endif %}
  106. {% if author.bitbucket %}
  107. <li>
  108. <a href="https://bitbucket.org/{{ author.bitbucket }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  109. <i class="fab fa-fw fa-bitbucket" aria-hidden="true"></i><span class="label">Bitbucket</span>
  110. </a>
  111. </li>
  112. {% endif %}
  113. {% if author.github %}
  114. <li>
  115. <a href="https://github.com/{{ author.github }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  116. <i class="fab fa-fw fa-github" aria-hidden="true"></i><span class="label">GitHub</span>
  117. </a>
  118. </li>
  119. {% endif %}
  120. {% if author.gitlab %}
  121. <li>
  122. <a href="https://gitlab.com/{{ author.gitlab }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  123. <i class="fab fa-fw fa-gitlab" aria-hidden="true"></i><span class="label">GitLab</span>
  124. </a>
  125. </li>
  126. {% endif %}
  127. {% if author.stackoverflow %}
  128. <li>
  129. <a href="https://stackoverflow.com/users/{{ author.stackoverflow }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  130. <i class="fab fa-fw fa-stack-overflow" aria-hidden="true"></i><span class="label">Stack Overflow</span>
  131. </a>
  132. </li>
  133. {% endif %}
  134. {% if author.lastfm %}
  135. <li>
  136. <a href="https://last.fm/user/{{ author.lastfm }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  137. <i class="fab fa-fw fa-lastfm-square" aria-hidden="true"></i><span class="label">Last.fm</span>
  138. </a>
  139. </li>
  140. {% endif %}
  141. {% if author.dribbble %}
  142. <li>
  143. <a href="https://dribbble.com/{{ author.dribbble }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  144. <i class="fab fa-fw fa-dribbble" aria-hidden="true"></i><span class="label">Dribbble</span>
  145. </a>
  146. </li>
  147. {% endif %}
  148. {% if author.pinterest %}
  149. <li>
  150. <a href="https://www.pinterest.com/{{ author.pinterest }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  151. <i class="fab fa-fw fa-pinterest" aria-hidden="true"></i><span class="label">Pinterest</span>
  152. </a>
  153. </li>
  154. {% endif %}
  155. {% if author.foursquare %}
  156. <li>
  157. <a href="https://foursquare.com/{{ author.foursquare }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  158. <i class="fab fa-fw fa-foursquare" aria-hidden="true"></i><span class="label">Foursquare</span>
  159. </a>
  160. </li>
  161. {% endif %}
  162. {% if author.steam %}
  163. <li>
  164. <a href="https://steamcommunity.com/id/{{ author.steam }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  165. <i class="fab fa-fw fa-steam" aria-hidden="true"></i><span class="label">Steam</span>
  166. </a>
  167. </li>
  168. {% endif %}
  169. {% if author.youtube %}
  170. {% if author.youtube contains "://" %}
  171. <li>
  172. <a href="{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  173. <i class="fab fa-fw fa-youtube" aria-hidden="true"></i><span class="label">YouTube</span>
  174. </a>
  175. </li>
  176. {% elsif author.youtube %}
  177. <li>
  178. <a href="https://www.youtube.com/user/{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  179. <i class="fab fa-fw fa-youtube" aria-hidden="true"></i><span class="label">YouTube</span>
  180. </a>
  181. </li>
  182. {% endif %}
  183. {% endif %}
  184. {% if author.soundcloud %}
  185. <li>
  186. <a href="https://soundcloud.com/{{ author.soundcloud }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  187. <i class="fab fa-fw fa-soundcloud" aria-hidden="true"></i><span class="label">SoundCloud</span>
  188. </a>
  189. </li>
  190. {% endif %}
  191. {% if author.weibo %}
  192. <li>
  193. <a href="https://www.weibo.com/{{ author.weibo }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  194. <i class="fab fa-fw fa-weibo" aria-hidden="true"></i><span class="label">Weibo</span>
  195. </a>
  196. </li>
  197. {% endif %}
  198. {% if author.flickr %}
  199. <li>
  200. <a href="https://www.flickr.com/{{ author.flickr }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  201. <i class="fab fa-fw fa-flickr" aria-hidden="true"></i><span class="label">Flickr</span>
  202. </a>
  203. </li>
  204. {% endif %}
  205. {% if author.codepen %}
  206. <li>
  207. <a href="https://codepen.io/{{ author.codepen }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  208. <i class="fab fa-fw fa-codepen" aria-hidden="true"></i><span class="label">CodePen</span>
  209. </a>
  210. </li>
  211. {% endif %}
  212. {% if author.vine %}
  213. <li>
  214. <a href="https://vine.co/u/{{ author.vine }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
  215. <i class="fab fa-fw fa-vine" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
  216. </a>
  217. </li>
  218. {% endif %}
  219. {% include author-profile-custom-links.html %}
  220. </ul>
  221. </div>
  222. </div>