Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
feat(social): add bilibili social config
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Feb 17, 2020
1 parent 933e32c commit edc53d7
Show file tree
Hide file tree
Showing 11 changed files with 1,141 additions and 6 deletions.
633 changes: 633 additions & 0 deletions assets/css/lib/iconfont/iconfont.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ dateFormatToUse = "2006-01-02"
#Gitea = "xxxx"
#XMPP = "xxxx"
#Matrix ="xxxx"
#Bilibili = ""

# Page config
[params.page]
Expand Down
3 changes: 2 additions & 1 deletion exampleSite/zh/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ dateFormatToUse = "2006-01-02"
#Devto = "xxxx"
#Gitea = "xxxx"
#XMPP = "xxxx"
#Matrix ="xxxx"
#Matrix = "xxxx"
#Bilibili = ""

# 文章页面配置
[params.page]
Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/function/icon.html
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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 -}}
9 changes: 8 additions & 1 deletion layouts/partials/home/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" -}}
Expand Down
Binary file added static/css/lib/iconfont/iconfont.eot
Binary file not shown.
488 changes: 488 additions & 0 deletions static/css/lib/iconfont/iconfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/css/lib/iconfont/iconfont.ttf
Binary file not shown.
Binary file added static/css/lib/iconfont/iconfont.woff
Binary file not shown.
Binary file added static/css/lib/iconfont/iconfont.woff2
Binary file not shown.

0 comments on commit edc53d7

Please sign in to comment.