1{%- assign _author = include.author -%}
2
3<div class="author-links">
4  <ul class="menu menu--nowrap menu--inline">
5
6    {%- if _author.url -%}
7      <link itemprop="url" href="{{ _author.url }}">
8    {%- endif -%}
9
10    {%- if _author.type == 'organization' -%}
11      {%- include snippets/get-locale-string.html key='EMAIL_US' -%}
12      {%- assign _locale_string_email = __return -%}
13      {%- include snippets/get-locale-string.html key='FOLLOW_US' -%}
14      {%- assign _locale_string_follow = __return -%}
15    {%- else -%}
16      {%- include snippets/get-locale-string.html key='EMAIL_ME' -%}
17      {%- assign _locale_string_email = __return -%}
18      {%- include snippets/get-locale-string.html key='FOLLOW_ME' -%}
19      {%- assign _locale_string_follow = __return -%}
20    {%- endif -%}
21
22    {%- include snippets/get-locale-string.html key='EMAIL_ME' -%}
23    {%- if _author.email -%}
24      <li title="{{ _locale_string_email }}">
25      <a class="button button--circle mail-button" itemprop="email" href="mailto:{{ _author.email }}" target="_blank" rel="noopener noreferrer">
26        <i class="fas fa-envelope"></i>
27      </a>
28    {%- endif -%}
29
30
31    {%- if _author.facebook -%}
32      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Facebook' }}">
33        <a class="button button--circle facebook-button" itemprop="sameAs" href="https://www.facebook.com/{{ _author.facebook }}" target="_blank" rel="noopener noreferrer">
34          <div class="icon">{%- include svg/icon/social/facebook.svg -%}</div>
35        </a>
36      </li>
37    {%- endif -%}
38
39    {%- if _author.twitter -%}
40      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Twitter' }}">
41        <a class="button button--circle twitter-button" itemprop="sameAs" href="https://twitter.com/{{ _author.twitter }}" target="_blank" rel="noopener noreferrer">
42          <div class="icon">{%- include svg/icon/social/twitter.svg -%}</div>
43        </a>
44      </li>
45    {%- endif -%}
46
47    {%- if _author.weibo -%}
48      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Weibo' }}">
49        <a class="button button--circle weibo-button" itemprop="sameAs" href="https://weibo.com/{{ _author.weibo }}" target="_blank" rel="noopener noreferrer">
50          <div class="icon">{%- include svg/icon/social/weibo.svg -%}</div>
51        </a>
52      </li>
53    {%- endif -%}
54
55    {%- if _author.googleplus -%}
56      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Google+' }}">
57        <a class="button button--circle googlepluse-button" itemprop="sameAs" href="https://plus.google.com/u/0/{{ _author.googleplus }}" target="_blank" rel="noopener noreferrer">
58          <div class="icon">{%- include svg/icon/social/googleplus.svg -%}</div>
59        </a>
60      </li>
61    {%- endif -%}
62
63    {%- if _author.telegram -%}
64      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Telegram' }}">
65        <a class="button button--circle telegram-button" itemprop="sameAs" href="https://t.me/{{ _author.telegram }}" target="_blank" rel="noopener noreferrer">
66          <div class="icon">{%- include svg/icon/social/telegram.svg -%}</div>
67        </a>
68      </li>
69    {%- endif -%}
70
71    {%- if _author.medium -%}
72      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Medium' }}">
73        <a class="button button--circle medium-button" itemprop="sameAs" href="https://medium.com/{{ _author.medium }}" target="_blank" rel="noopener noreferrer">
74          <div class="icon">{%- include svg/icon/social/medium.svg -%}</div>
75        </a>
76      </li>
77    {%- endif -%}
78
79    {%- if _author.zhihu -%}
80      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Zhihu' }}">
81        <a class="button button--circle zhihu-button" itemprop="sameAs" href="https://www.zhihu.com/people/{{ _author.zhihu }}" target="_blank" rel="noopener noreferrer">
82          <div class="icon">{%- include svg/icon/social/zhihu.svg -%}</div>
83        </a>
84      </li>
85    {%- endif -%}
86
87    {%- if _author.douban -%}
88      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Douban' }}">
89        <a class="button button--circle douban-button" itemprop="sameAs" href="https://www.douban.com/people/{{ _author.douban }}" target="_blank" rel="noopener noreferrer">
90          <div class="icon">{%- include svg/icon/social/douban.svg -%}</div>
91        </a>
92      </li>
93    {%- endif -%}
94
95    {%- if _author.linkedin -%}
96      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Linkedin' }}">
97        <a class="button button--circle linkedin-button" itemprop="sameAs" href="https://www.linkedin.com/in/{{ _author.linkedin }}" target="_blank" rel="noopener noreferrer">
98          <div class="icon">{%- include svg/icon/social/linkedin.svg -%}</div>
99        </a>
100      </li>
101    {%- endif -%}
102
103    {%- if _author.github -%}
104      <li title="{{ _locale_string_follow | replace: '[NAME]', 'Github' }}">
105        <a class="button button--circle github-button" itemprop="sameAs" href="https://github.com/{{ _author.github }}" target="_blank" rel="noopener noreferrer">
106          <div class="icon">{%- include svg/icon/social/github.svg -%}</div>
107        </a>
108      </li>
109    {%- endif -%}
110
111    {%- if _author.npm -%}
112      <li title="{{ _locale_string_follow | replace: '[NAME]', 'npm' }}">
113        <a class="button button--circle npm-button" itemprop="sameAs" href="https://www.npmjs.com/~{{ _author.npm }}" target="_blank" rel="noopener noreferrer">
114          <div class="icon">{%- include svg/icon/social/npm.svg -%}</div>
115        </a>
116      </li>
117    {%- endif -%}
118
119  </ul>
120</div>
121