feature(doc): complete all Chinese and English documents and fix many bugs
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{{- /* Checkbox unchecked */ -}}
|
||||
{{- $REin := `<input disabled="" type="checkbox">` -}}
|
||||
{{- $REout := `<i class="far fa-square fa-fw"></i>` -}}
|
||||
{{- $content := replaceRE $REin $REout . -}}
|
||||
{{- $old := `<input disabled="" type="checkbox">` -}}
|
||||
{{- $new := `<i class="far fa-square fa-fw"></i>` -}}
|
||||
{{- $content := replace . $old $new -}}
|
||||
|
||||
{{- /* Checkbox checked */ -}}
|
||||
{{- $REin = `<input checked="" disabled="" type="checkbox">` -}}
|
||||
{{- $REout = `<i class="far fa-check-square fa-fw"></i>` -}}
|
||||
{{- return replaceRE $REin $REout $content -}}
|
||||
{{- $old = `<input checked="" disabled="" type="checkbox">` -}}
|
||||
{{- $new = `<i class="far fa-check-square fa-fw"></i>` -}}
|
||||
{{- return replace $content $old $new -}}
|
||||
|
||||
5
layouts/partials/function/escape.html
Normal file
5
layouts/partials/function/escape.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- /* Escape character */ -}}
|
||||
{{- /* {?X} -> X */ -}}
|
||||
{{- $REin := `\{\?(.)\}` -}}
|
||||
{{- $REout := `$1` -}}
|
||||
{{- return replaceRE $REin $REout . -}}
|
||||
@@ -2,5 +2,7 @@
|
||||
{{- /* Content -> unique ID */ -}}
|
||||
{{- /* shuffle md5 as id */ -}}
|
||||
{{- $id := delimit (split (md5 now.Unix) "" | shuffle | first 6) "" | printf "id-%s" -}}
|
||||
{{- .scratch.SetInMap "contentMap" $id .content -}}
|
||||
{{- with .scratch -}}
|
||||
{{- .SetInMap "contentMap" $id $.content -}}
|
||||
{{- end -}}
|
||||
{{- return $id -}}
|
||||
|
||||
Reference in New Issue
Block a user