Merge pull request #1241 from JamesY-Jey/add-social-style

新增给social配置添加样式参数
This commit is contained in:
Jerry Wong 2023-04-08 15:11:17 +08:00 committed by GitHub
commit 7e8d666bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -38,10 +38,10 @@ copy:
# social settings (社交圖標設置)
# formal:
# icon: link || the description
# icon: link || the description || color
social:
# fab fa-github: https://github.com/xxxxx || Github
# fas fa-envelope: mailto:xxxxxx@gmail.com || Email
# fab fa-github: https://github.com/xxxxx || Github || '#24292e'
# fas fa-envelope: mailto:xxxxxx@gmail.com || Email || '#4a7dbe'
# search (搜索)
# see https://butterfly.js.org/posts/ceeb73f/#搜索系統

View File

@ -1,4 +1,4 @@
each url, icon in theme.social
a.social-icon(href=url_for(trim(url.split('||')[0])) target="_blank"
title=url.split('||')[1] === undefined ? '' : trim(url.split('||')[1]))
i(class=icon)
i(class=icon style=url.split('||')[2] === undefined ? '' : `color: ${trim(url.split('||')[2]).replace(/[\'\"]/g, '')};`)