feat(social): add bilibili social config

This commit is contained in:
Dillon
2020-02-17 21:31:53 +08:00
parent 933e32c4e4
commit edc53d7cd1
11 changed files with 1141 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{{- $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 -}}

View File

@@ -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 -}}

View File

@@ -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" -}}