Skip to content

Commit

Permalink
chore: update social_links settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Lhcfl committed Jun 16, 2024
1 parent 966d22f commit 5b78df2
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 22 deletions.
19 changes: 10 additions & 9 deletions .github/asserts/anatolo_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ footbar:

# Social Links
# If you want to add more, go to sidebar.pug
github: https://github.com/Lhcfl
mail: [email protected]
zhihu:
QQ:
twitter:
instagram:
rss:
facebook:
weibo:
social:
github: https://github.com/Lhcfl
mail: [email protected]
zhihu:
QQ:
twitter:
instagram:
rss:
facebook:
weibo:

# Nav menu
menu:
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Anatolo设计极致简约,但麻雀虽小,五脏理应俱全。因此,我

码云功能和一些中国特色功能来自 [Anatole-core](https://github.com/mrcore/hexo-theme-Anatole-Core)



## Todo List

- 使用基于json的Ajax
Expand Down
22 changes: 12 additions & 10 deletions _config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ footbar:


# Social Links
# If you want to add more, go to `social_links.pug`
github: https://github.com/Lhcfl
mail: [email protected]
zhihu:
QQ:
twitter:
instagram:
rss:
facebook:
weibo:
# The key is the icon name of font-awesome 6, and the value is a link
# except for mail.
social:
github: https://github.com/Lhcfl
mail: [email protected]
zhihu:
qq:
twitter:
instagram:
rss:
facebook:
weibo:

# Nav menu
menu:
Expand Down
19 changes: 18 additions & 1 deletion layout/partial/social_links.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
ul.social-links
- var socials = Object.fromEntries(Object.entries(theme.social).filter((x) => x[1]));
each link, icon in socials
case icon
when "mail"
li
a(href="mailto:" + link)
i.fa.fa-envelope
when "rss"
li
a(href=link)
i.fa.fa-rss
default
li
a(href=link)
i.fab(class="fa-" + icon)

//- deprecated
if theme.github
li
a(href=theme.github)
Expand All @@ -15,7 +32,7 @@ ul.social-links
if theme.zhihu
li
a(href=theme.zhihu)
i.fa.fa-mortar-board
i.fa.fa-zhihu
if theme.twitter
li
a(href=theme.twitter)
Expand Down

0 comments on commit 5b78df2

Please sign in to comment.