Skip to content

Commit

Permalink
feat: social contact links add X
Browse files Browse the repository at this point in the history
  • Loading branch information
XPoet committed Mar 7, 2024
1 parent fc9a1de commit 39df4b7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ social_contact:
weibo: # WeiBo
zhihu: # ZhiHu
twitter: # Twitter
x: # X
facebook: # Facebook
email: # Email

Expand Down
1 change: 1 addition & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ alipay: Alipay
weibo: Weibo
zhihu: Zhihu
twitter: Twitter
x: X
facebook: Facebook
email: Email
code_block:
Expand Down
1 change: 1 addition & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ alipay: 支付宝
weibo: 微博
zhihu: 知乎
twitter: 推特
x: X
facebook: Facebook
email: Email
code_block:
Expand Down
1 change: 1 addition & 0 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ alipay: 支付寶
weibo: 微博
zhihu: 知乎
twitter: Twitter
x: X
facebook: Facebook
email: Email
code_block:
Expand Down
5 changes: 3 additions & 2 deletions layout/_partial/first-screen.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ const { enable: sc_enable, links: sc_links } = theme?.social_contact || {}
<i class="fas fa-envelope"></i>
</a>
<% } else { %>
<% const sc_icon = key === 'x' ? 'x-twitter' : key %>
<% if(isImg) { %>
<i class="fab fa-<%= key %>"></i>
<i class="fab fa-<%= sc_icon %>"></i>
<% } else { %>
<a target="_blank" href="<%- link %>">
<i class="fab fa-<%= key %>"></i>
<i class="fab fa-<%= sc_icon %>"></i>
</a>
<% } %>
<% } %>
Expand Down

0 comments on commit 39df4b7

Please sign in to comment.