feat(image): add image lightgallery

This commit is contained in:
Dillon
2020-02-24 17:00:39 +08:00
parent fbfcbaebca
commit 72a2e9bdcf
50 changed files with 478 additions and 353 deletions

View File

@@ -1,6 +1,6 @@
{{- $type := index . "type" | default "fa" -}}
{{- $classList := split (index . "class") " " -}}
{{- $scratch := index . "scratch" -}}
{{- $context := index . "context" -}}
{{- /* Fork Awesome */ -}}
{{- if eq $type "fo" -}}
{{- $newClassList := slice -}}
@@ -12,11 +12,13 @@
{{- end -}}
{{- end -}}
{{- $classList = $newClassList -}}
{{- $scratch := $context.Scratch.Get "scratch" -}}
{{- $scratch.Set "forkawesome" true -}}
{{- /* default is Font Awesome */ -}}
{{- /* Others */ -}}
{{- else if ne $type "fa" -}}
{{- $scratch := $context.Scratch.Get "scratch" -}}
{{- $scratch.Set "iconfont" true -}}
{{- end -}}
<i class="{{ delimit $classList ` ` }}"></i>