Skip to content

Commit

Permalink
feat: add "follow us" and "email us" (Korean need update), close kiti…
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Jan 27, 2019
1 parent 677ec62 commit ae015c2
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 14 deletions.
10 changes: 9 additions & 1 deletion _data/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ en: &EN
LICENSE_ANNOUNCE : "This work is licensed under a [LICENSE] license."
POST_ON_GITHUB : "Edit on Github"
FOLLOW_ME : "Follow me on [NAME]."
FOLLOW_US : "Follow us on [NAME]."
EMAIL_ME : "Send me Email."
EMAIL_US : "Send us Email."
COPYRIGHT_DATES : "2019"

en-GB:
Expand Down Expand Up @@ -44,7 +46,9 @@ zh-Hans: &ZH_HANS
LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 许可协议。"
POST_ON_GITHUB : "在 Github 上修改"
FOLLOW_ME : "在 [NAME] 上关注我。"
FOLLOW_US : "在 [NAME] 上关注我们。"
EMAIL_ME : "给我发邮件。"
EMAIL_US : "给我们发邮件。"
COPYRIGHT_DATES : "2019"

zh:
Expand All @@ -71,7 +75,9 @@ zh-Hant: &ZH_HANT
LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 許可協議。"
POST_ON_GITHUB : "在 Github 上修改"
FOLLOW_ME : "在 [NAME] 上關注我。"
FOLLOW_US : "在 [NAME] 上關注我們。"
EMAIL_ME : "給我發郵件。"
EMAIL_US : "給我們發郵件。"
COPYRIGHT_DATES : "2019"

zh-TW:
Expand All @@ -96,8 +102,10 @@ ko: &KO
LICENSE_ANNOUNCE : "이 글의 저작권은 [LICENSE] 라이센스를 따릅니다."
POST_ON_GITHUB : "Github에서 확인하기"
FOLLOW_ME : "[NAME]에서 팔로우하기"
FOLLOW_US : "[NAME]에서 팔로우하기"
EMAIL_ME : "이메일 보내기"
EMAIL_US : "이메일 보내기"
COPYRIGHT_DATES : "2019"

ko-KR:
<<: *KO
<<: *KO
37 changes: 24 additions & 13 deletions _includes/author-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,98 +7,109 @@
<link itemprop="url" href="{{ _author.url }}">
{%- endif -%}

{%- if _author.type == 'organization' -%}
{%- include snippets/get-locale-string.html key='EMAIL_US' -%}
{%- assign _locale_string_email = __return -%}
{%- include snippets/get-locale-string.html key='FOLLOW_US' -%}
{%- assign _locale_string_follow = __return -%}
{%- else -%}
{%- include snippets/get-locale-string.html key='EMAIL_ME' -%}
{%- assign _locale_string_email = __return -%}
{%- include snippets/get-locale-string.html key='FOLLOW_ME' -%}
{%- assign _locale_string_follow = __return -%}
{%- endif -%}

{%- include snippets/get-locale-string.html key='EMAIL_ME' -%}
{%- if _author.email -%}
<li title="{{ __return }}">
<li title="{{ _locale_string_email }}">
<a class="button button--circle mail-button" itemprop="email" href="mailto:{{ _author.email }}" target="_blank">
<i class="fas fa-envelope"></i>
</a>
{%- endif -%}

{%- include snippets/get-locale-string.html key='FOLLOW_ME' -%}

{%- if _author.facebook -%}
<li title="{{ __return | replace: '[NAME]', 'Facebook' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Facebook' }}">
<a class="button button--circle facebook-button" itemprop="sameAs" href="https://www.facebook.com/{{ _author.facebook }}" target="_blank">
<div class="icon">{%- include svg/icon/social/facebook.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.twitter -%}
<li title="{{ __return | replace: '[NAME]', 'Twitter' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Twitter' }}">
<a class="button button--circle twitter-button" itemprop="sameAs" href="https://twitter.com/{{ _author.twitter }}" target="_blank">
<div class="icon">{%- include svg/icon/social/twitter.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.weibo -%}
<li title="{{ __return | replace: '[NAME]', 'Weibo' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Weibo' }}">
<a class="button button--circle weibo-button" itemprop="sameAs" href="https://weibo.com/{{ _author.weibo }}" target="_blank">
<div class="icon">{%- include svg/icon/social/weibo.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.googleplus -%}
<li title="{{ __return | replace: '[NAME]', 'Google+' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Google+' }}">
<a class="button button--circle googlepluse-button" itemprop="sameAs" href="https://plus.google.com/u/0/{{ _author.googleplus }}" target="_blank">
<div class="icon">{%- include svg/icon/social/googleplus.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.telegram -%}
<li title="{{ __return | replace: '[NAME]', 'Telegram' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Telegram' }}">
<a class="button button--circle telegram-button" itemprop="sameAs" href="https://t.me/{{ _author.telegram }}" target="_blank">
<div class="icon">{%- include svg/icon/social/telegram.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.medium -%}
<li title="{{ __return | replace: '[NAME]', 'Medium' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Medium' }}">
<a class="button button--circle medium-button" itemprop="sameAs" href="https://medium.com/{{ _author.medium }}" target="_blank">
<div class="icon">{%- include svg/icon/social/medium.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.zhihu -%}
<li title="{{ __return | replace: '[NAME]', 'Zhihu' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Zhihu' }}">
<a class="button button--circle zhihu-button" itemprop="sameAs" href="https://www.zhihu.com/people/{{ _author.zhihu }}" target="_blank">
<div class="icon">{%- include svg/icon/social/zhihu.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.douban -%}
<li title="{{ __return | replace: '[NAME]', 'Douban' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Douban' }}">
<a class="button button--circle douban-button" itemprop="sameAs" href="https://www.douban.com/people/{{ _author.douban }}" target="_blank">
<div class="icon">{%- include svg/icon/social/douban.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.linkedin -%}
<li title="{{ __return | replace: '[NAME]', 'Linkedin' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Linkedin' }}">
<a class="button button--circle linkedin-button" itemprop="sameAs" href="https://www.linkedin.com/in/{{ _author.linkedin }}" target="_blank">
<div class="icon">{%- include svg/icon/social/linkedin.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.github -%}
<li title="{{ __return | replace: '[NAME]', 'Github' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'Github' }}">
<a class="button button--circle github-button" itemprop="sameAs" href="https://github.com/{{ _author.github }}" target="_blank">
<div class="icon">{%- include svg/icon/social/github.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.npm -%}
<li title="{{ __return | replace: '[NAME]', 'npm' }}">
<li title="{{ _locale_string_follow | replace: '[NAME]', 'npm' }}">
<a class="button button--circle npm-button" itemprop="sameAs" href="https://www.npmjs.com/~{{ _author.npm }}" target="_blank">
<div class="icon">{%- include svg/icon/social/npm.svg -%}</div>
</a>
Expand Down
8 changes: 8 additions & 0 deletions docs/_data/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ en: &EN
LICENSE_ANNOUNCE : "This work is licensed under a [LICENSE] license."
POST_ON_GITHUB : "Edit on Github"
FOLLOW_ME : "Follow me on [NAME]."
FOLLOW_US : "Follow us on [NAME]."
EMAIL_ME : "Send me Email."
EMAIL_US : "Send us Email."
COPYRIGHT_DATES : "2019"

en-GB:
Expand Down Expand Up @@ -44,7 +46,9 @@ zh-Hans: &ZH_HANS
LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 许可协议。"
POST_ON_GITHUB : "在 Github 上修改"
FOLLOW_ME : "在 [NAME] 上关注我。"
FOLLOW_US : "在 [NAME] 上关注我们。"
EMAIL_ME : "给我发邮件。"
EMAIL_US : "给我们发邮件。"
COPYRIGHT_DATES : "2019"

zh:
Expand All @@ -71,7 +75,9 @@ zh-Hant: &ZH_HANT
LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 許可協議。"
POST_ON_GITHUB : "在 Github 上修改"
FOLLOW_ME : "在 [NAME] 上關注我。"
FOLLOW_US : "在 [NAME] 上關注我們。"
EMAIL_ME : "給我發郵件。"
EMAIL_US : "給我們發郵件。"
COPYRIGHT_DATES : "2019"

zh-TW:
Expand All @@ -96,7 +102,9 @@ ko: &KO
LICENSE_ANNOUNCE : "이 글의 저작권은 [LICENSE] 라이센스를 따릅니다."
POST_ON_GITHUB : "Github에서 확인하기"
FOLLOW_ME : "[NAME]에서 팔로우하기"
FOLLOW_US : "[NAME]에서 팔로우하기"
EMAIL_ME : "이메일 보내기"
EMAIL_US : "이메일 보내기"
COPYRIGHT_DATES : "2019"

ko-KR:
Expand Down
8 changes: 8 additions & 0 deletions test/_data/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ en: &EN
LICENSE_ANNOUNCE : "This work is licensed under a [LICENSE] license."
POST_ON_GITHUB : "Edit on Github"
FOLLOW_ME : "Follow me on [NAME]."
FOLLOW_US : "Follow us on [NAME]."
EMAIL_ME : "Send me Email."
EMAIL_US : "Send us Email."
COPYRIGHT_DATES : "2019"

en-GB:
Expand Down Expand Up @@ -44,7 +46,9 @@ zh-Hans: &ZH_HANS
LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 许可协议。"
POST_ON_GITHUB : "在 Github 上修改"
FOLLOW_ME : "在 [NAME] 上关注我。"
FOLLOW_US : "在 [NAME] 上关注我们。"
EMAIL_ME : "给我发邮件。"
EMAIL_US : "给我们发邮件。"
COPYRIGHT_DATES : "2019"

zh:
Expand All @@ -71,7 +75,9 @@ zh-Hant: &ZH_HANT
LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 許可協議。"
POST_ON_GITHUB : "在 Github 上修改"
FOLLOW_ME : "在 [NAME] 上關注我。"
FOLLOW_US : "在 [NAME] 上關注我們。"
EMAIL_ME : "給我發郵件。"
EMAIL_US : "給我們發郵件。"
COPYRIGHT_DATES : "2019"

zh-TW:
Expand All @@ -96,7 +102,9 @@ ko: &KO
LICENSE_ANNOUNCE : "이 글의 저작권은 [LICENSE] 라이센스를 따릅니다."
POST_ON_GITHUB : "Github에서 확인하기"
FOLLOW_ME : "[NAME]에서 팔로우하기"
FOLLOW_US : "[NAME]에서 팔로우하기"
EMAIL_ME : "이메일 보내기"
EMAIL_US : "이메일 보내기"
COPYRIGHT_DATES : "2019"

ko-KR:
Expand Down

0 comments on commit ae015c2

Please sign in to comment.