Skip to content

Commit

Permalink
feat: add Medium icon, close kitian616#138
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Jan 26, 2019
1 parent 6366e4f commit 5003287
Show file tree
Hide file tree
Showing 17 changed files with 95 additions and 72 deletions.
5 changes: 3 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ author:
email :
facebook : # "user_name" the last part of your profile url, e.g. https://www.facebook.com/user_name
twitter : # "user_name" the last part of your profile url, e.g. https://twitter.com/user_name
googleplus: # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
weibo : # "user_id" the last part of your profile url, e.g. https://www.weibo.com/user_id/profile?...
googleplus: # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name
medium : # "user_name" the last part of your profile url, e.g. https://medium.com/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name/
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name/
github : # "user_name" the last part of your profile url, e.g. https://github.com/user_name
npm : # "user_name" the last part of your profile url, e.g. https://www.npmjs.com/~user_name
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name


## => GitHub Repository (if the site is hosted by GitHub)
Expand Down
55 changes: 32 additions & 23 deletions _includes/author-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@

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

{%- if _author.weibo -%}
<li title="{{ __return | 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.facebook -%}
<li title="{{ __return | replace: '[NAME]', 'Facebook' }}">
<a class="button button--circle facebook-button" itemprop="sameAs" href="https://www.facebook.com/{{ _author.facebook }}" target="_blank">
Expand All @@ -41,6 +33,14 @@
</li>
{%- endif -%}

{%- if _author.weibo -%}
<li title="{{ __return | 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+' }}">
<a class="button button--circle googlepluse-button" itemprop="sameAs" href="https://plus.google.com/u/0/{{ _author.googleplus }}" target="_blank">
Expand All @@ -49,18 +49,18 @@
</li>
{%- endif -%}

{%- if _author.github -%}
<li title="{{ __return | 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>
{%- if _author.telegram -%}
<li title="{{ __return | 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.linkedin -%}
<li title="{{ __return | 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>
{%- if _author.medium -%}
<li title="{{ __return | 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 -%}
Expand All @@ -73,6 +73,22 @@
</li>
{%- endif -%}

{%- if _author.linkedin -%}
<li title="{{ __return | 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' }}">
<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' }}">
<a class="button button--circle npm-button" itemprop="sameAs" href="https://www.npmjs.com/~{{ _author.npm }}" target="_blank">
Expand All @@ -81,12 +97,5 @@
</li>
{%- endif -%}

{%- if _author.telegram -%}
<li title="{{ __return | 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 -%}
</ul>
</div>
4 changes: 2 additions & 2 deletions _includes/scripts/components/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
modalVisible = visible;
if (visible) {
search.onShow && search.onShow();
useDefaultSearchBox && $searchInput[0].focus();
useDefaultSearchBox && $searchInput[0] && $searchInput[0].focus();
} else {
search.onShow && search.onHide();
useDefaultSearchBox && $searchInput[0].blur();
useDefaultSearchBox && $searchInput[0] && $searchInput[0].blur();
setTimeout(function() {
useDefaultSearchBox && ($searchInput.val(''), $searchBox.removeClass('not-empty'));
search.clear && search.clear();
Expand Down
3 changes: 3 additions & 0 deletions _includes/svg/icon/social/medium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 13 additions & 10 deletions _sass/components/_author-links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,36 @@
.mail-button {
@include clickable($text-color-1, $mail-color);
}
.weibo-button {
@include clickable($text-color-1, $weibo-color);
}
.facebook-button {
@include clickable($text-color-1, $facebook-color);
}
.twitter-button {
@include clickable($text-color-1, $twitter-color);
}
.weibo-button {
@include clickable($text-color-1, $weibo-color);
}
.googlepluse-button {
@include clickable($text-color-1, $google-plus-color);
}
.github-button {
@include clickable($text-color-1, $github-color);
.telegram-button {
@include clickable($text-color-1, $telegram-color);
}
.linkedin-button {
@include clickable($text-color-1, $linkedin-color);
.medium-button {
@include clickable($text-color-1, $medium-color);
}
.douban-button {
@include clickable($text-color-1, $douban-color);
}
.linkedin-button {
@include clickable($text-color-1, $linkedin-color);
}
.github-button {
@include clickable($text-color-1, $github-color);
}
.npm-button {
@include clickable($text-color-1, $npm-color);
}
.telegram-button {
@include clickable($text-color-1, $telegram-color);
}
}
}
}
4 changes: 1 addition & 3 deletions _sass/components/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
.footer {
@include flexbox();
@include align-items(center);
color: $footer-text-color;
background: $footer-background;
p {
color: $footer-text-color;
}
a {
@include link-colors ($footer-text-color, $main-color-1);
}
Expand Down
9 changes: 5 additions & 4 deletions _sass/skins/_chocolate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ $text-color-function: rgba(#fff, .85);

// logo colors
$mail-color: #0072c5;
$weibo-color: #e6162d;
$facebook-color: #4267b2;
$google-plus-color:#ea4335;
$twitter-color: #1da1f2;
$weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$douban-color: #42bd56;
$github-color: #000;
$linkedin-color: #1074af;
$github-color: #000;
$npm-color: #fff;
$telegram-color: #32afed;

// highlight colors
@import "skins/highlight/tomorrow-night-eighties";
9 changes: 5 additions & 4 deletions _sass/skins/_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ $text-color-function: rgba(#fff, .8);

// logo colors
$mail-color: #0072c5;
$weibo-color: #e6162d;
$facebook-color: #4267b2;
$google-plus-color:#ea4335;
$twitter-color: #1da1f2;
$weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$douban-color: #42bd56;
$github-color: #000;
$linkedin-color: #1074af;
$github-color: #000;
$npm-color: #fff;
$telegram-color: #32afed;

// highlight colors
@import "skins/highlight/tomorrow-night";
9 changes: 5 additions & 4 deletions _sass/skins/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ $text-color-function: #fff;

// logo colors
$mail-color: #0072c5;
$weibo-color: #e6162d;
$facebook-color: #4267b2;
$google-plus-color:#ea4335;
$twitter-color: #1da1f2;
$weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$douban-color: #42bd56;
$github-color: #000;
$linkedin-color: #1074af;
$github-color: #000;
$npm-color: #fff;
$telegram-color: #32afed;

// highlight colors
@import "skins/highlight/tomorrow";
9 changes: 5 additions & 4 deletions _sass/skins/_forest.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ $text-color-function: #fff;

// logo colors
$mail-color: #0072c5;
$weibo-color: #e6162d;
$facebook-color: #4267b2;
$google-plus-color:#ea4335;
$twitter-color: #1da1f2;
$weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$douban-color: #42bd56;
$github-color: #000;
$linkedin-color: #1074af;
$github-color: #000;
$npm-color: #fff;
$telegram-color: #32afed;

// highlight colors
@import "skins/highlight/tomorrow";
9 changes: 5 additions & 4 deletions _sass/skins/_ocean.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ $text-color-function: #fff;

// logo colors
$mail-color: #0072c5;
$weibo-color: #e6162d;
$facebook-color: #4267b2;
$google-plus-color:#ea4335;
$twitter-color: #1da1f2;
$weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$douban-color: #42bd56;
$github-color: #000;
$linkedin-color: #1074af;
$github-color: #000;
$npm-color: #fff;
$telegram-color: #32afed;

// highlight colors
@import "skins/highlight/tomorrow-night-blue";
9 changes: 5 additions & 4 deletions _sass/skins/_orange.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ $text-color-function: #fff;

// logo colors
$mail-color: #0072c5;
$weibo-color: #e6162d;
$facebook-color: #4267b2;
$google-plus-color:#ea4335;
$twitter-color: #1da1f2;
$weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$douban-color: #42bd56;
$github-color: #000;
$linkedin-color: #1074af;
$github-color: #000;
$npm-color: #fff;
$telegram-color: #32afed;

// highlight colors
@import "skins/highlight/tomorrow-night-eighties";
5 changes: 3 additions & 2 deletions docs/_config.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ author:
email : 1
facebook : 1
twitter : 1
googleplus: 1
weibo : 1
googleplus: 1
telegram : 1
medium : 1
douban : 1
linkedin : 1
github : 1
npm : 1
telegram : 1


## => GitHub Repository (if the site is hosted by GitHub)
Expand Down
5 changes: 3 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ author:
email : [email protected]
facebook :
twitter : kitian616
googleplus: 101827554735084402671
weibo : 234695683
googleplus: 101827554735084402671
telegram :
medium :
douban :
linkedin :
github : kitian616/jekyll-TeXt-theme
npm :
telegram :


## => GitHub Repository (if the site is hosted by GitHub)
Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/en/2.1-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Short introduction for site author

Username or id of site author’s social networks.

Now we supports Email, Facebook, Twitter, Google Plus, Github, Linkedin, Weibo(微博) and Douban(豆瓣), more to be added.
TeXt supports Email, Facebook, Twitter, Weibo, Google Plus, Telegram, Medium, Douban, Linkedin, Github and Npm, more to be added.

Depending on your settings, the social network buttons would show on every pages' footer.

Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/zh/2.1-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ timezone: Asia/Shanghai

社交网站的用户名或用户 ID。

目前支持邮件、微博、豆瓣、Facebook、Twitter、Google Plus、Github 和 Linkedin,持续添加中。
目前支持邮件、微博、Facebook、Twitter、微博、Google Plus、Telegram、Medium、豆瓣、Linkedin、Github 和 Npm,持续添加中。

当你设置了相应项的值后,对应的社交按钮就会出现在页面下方。

Expand Down
5 changes: 3 additions & 2 deletions test/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ author:
email :
facebook : # "user_name" the last part of your profile url, e.g. https://www.facebook.com/user_name
twitter : # "user_name" the last part of your profile url, e.g. https://twitter.com/user_name
googleplus: # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
weibo : # "user_id" the last part of your profile url, e.g. https://www.weibo.com/user_id/profile?...
googleplus: # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name
medium : # "user_name" the last part of your profile url, e.g. https://medium.com/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name/
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name/
github : # "user_name" the last part of your profile url, e.g. https://github.com/user_name
npm : # "user_name" the last part of your profile url, e.g. https://www.npmjs.com/~user_name
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name


## => GitHub Repository (if the site is hosted by GitHub)
Expand Down

0 comments on commit 5003287

Please sign in to comment.