feat(checkbox): change checkbox style

This commit is contained in:
Dillon 2020-02-03 22:56:49 +08:00
parent d605de7f06
commit 495f7e651f
4 changed files with 23 additions and 4 deletions

View file

@ -129,6 +129,7 @@
ul { ul {
padding-left: 2rem; padding-left: 2rem;
list-style-type: disc;
} }
ruby { ruby {

View file

@ -1,25 +1,43 @@
{{- /* Font Awesome */ -}}
{{- /* :(far fa-circle): -> <i class="far fa-circle fa-fw"></i> */ -}}
{{- $REin := `:\(([\w- ]+?)\):` -}} {{- $REin := `:\(([\w- ]+?)\):` -}}
{{- $REout := `<i class="$1 fa-fw"></i>` -}} {{- $REout := `<i class="$1 fa-fw"></i>` -}}
{{- $content := replaceRE $REin $REout . -}} {{- $content := replaceRE $REin $REout . -}}
{{- /* Ruby */ -}}
{{- /* [EN]^(English) -> <strong><ruby>EN<rt>English</rt></ruby></strong> */ -}}
{{- $REin = `\[(.+?)\]\^\((.+?)\)` -}} {{- $REin = `\[(.+?)\]\^\((.+?)\)` -}}
{{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}} {{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}}
{{- $content = replaceRE $REin $REout $content -}} {{- $content = replaceRE $REin $REout $content -}}
{{- /* Checkbox */ -}}
{{- $REin = `<input disabled="" type="checkbox">` -}}
{{- $REout = `<i class="far fa-check-square fa-fw"></i>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- /* Checkbox checked */ -}}
{{- $REin = `<input checked="" disabled="" type="checkbox">` -}}
{{- $REout = `<i class="far fa-square fa-fw"></i>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- /* Fix <sup>[return]</sup> */ -}}
{{- $REin = `<sup>\[return\]</sup>` -}} {{- $REin = `<sup>\[return\]</sup>` -}}
{{- $REout = `↩︎` -}} {{- $REout = `↩︎` -}}
{{- $content = replaceRE $REin $REout $content -}} {{- $content = replaceRE $REin $REout $content -}}
{{- /* Dummy target */ -}}
{{- $REin = `<(h[23456]) (id=".+?")>` -}} {{- $REin = `<(h[23456]) (id=".+?")>` -}}
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}} {{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
{{- $content = replaceRE $REin $REout $content -}} {{- $content = replaceRE $REin $REout $content -}}
{{- /* Dummy target */ -}}
{{- $REin = `<(.+) (id="fnref:.+?")>` -}} {{- $REin = `<(.+) (id="fnref:.+?")>` -}}
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}} {{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
{{- $content = replaceRE $REin $REout $content -}} {{- $content = replaceRE $REin $REout $content -}}
{{- /* Dummy target */ -}}
{{- $REin = `<li (id="fn:.+?")(.*?)>\s?<p>` -}} {{- $REin = `<li (id="fn:.+?")(.*?)>\s?<p>` -}}
{{- $REout = `<li $2><p><a class="post-dummy-target" $1></a>` -}} {{- $REout = `<li $2><p><a class="post-dummy-target" $1></a>` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- return replaceRE $REin $REout $content -}} {{- return $content -}}

File diff suppressed because one or more lines are too long