提交 edc53d7c 编写于 作者: D Dillon

feat(social): add bilibili social config

上级 933e32c4
此差异已折叠。
......@@ -219,6 +219,7 @@ dateFormatToUse = "2006-01-02"
#Gitea = "xxxx"
#XMPP = "xxxx"
#Matrix ="xxxx"
#Bilibili = ""
# Page config
[params.page]
......
......@@ -218,7 +218,8 @@ dateFormatToUse = "2006-01-02"
#Devto = "xxxx"
#Gitea = "xxxx"
#XMPP = "xxxx"
#Matrix ="xxxx"
#Matrix = "xxxx"
#Bilibili = ""
# 文章页面配置
[params.page]
......
{{- $type := index . "type" | default "fa" }}
{{- $classList := split (index . "class") " " }}
{{- $scratch := index . "scratch" }}
{{- $type := index . "type" | default "fa" -}}
{{- $classList := split (index . "class") " " -}}
{{- $scratch := index . "scratch" -}}
{{- /* Font Awesome */ -}}
{{- if eq $type "fa" -}}
<i class="{{ delimit $classList ` ` }}"></i>
......@@ -18,6 +18,6 @@
{{- $scratch.Set "forkawesome" true -}}
{{- /* Others */ -}}
{{- else -}}
<span class="{{ delimit $classList ` ` }}"></span>
<i class="{{ delimit $classList ` ` }}"></i>
{{- $scratch.Set "iconfont" true -}}
{{- end -}}
......@@ -412,7 +412,14 @@
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- /* 058: Email */ -}}
{{- /* 058: bilibili */ -}}
{{- with .Site.Params.Social.Bilibili -}}
{{- $options := dict "href" (printf "https://space.bilibili.com/%s" .) "title" "bilibili" -}}
{{- $options = dict "class" "loveit it-bilibili-fill" "type" "other" "scratch" $.Scratch | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- /* 059: Email */ -}}
{{- with .Site.Params.Social.Email -}}
{{- $options := dict "href" (printf "mailto:%s" .) "title" "Email" -}}
{{- $options = dict "class" "far fa-envelope fa-fw" | merge $options -}}
......
......@@ -5,6 +5,11 @@
{{- slice "css/lib/forkawesome/fork-awesome.scss" | .Scratch.Add "linkLocal" -}}
{{- end -}}
{{- /* iconfont https://www.iconfont.cn/ */ -}}
{{- if .Scratch.Get "iconfont" -}}
{{- slice "css/lib/iconfont/iconfont.css" | .Scratch.Add "linkLocal" -}}
{{- end -}}
{{- /* lazysizes https://github.com/aFarkas/lazysizes */ -}}
{{- with $CDN.lazysizesJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册