PageRenderTime 49ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/_includes/author-profile.html

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