This repository was archived by the owner on Mar 9, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(toc): support fontawesome and ruby in TOC
- Loading branch information
Showing
8 changed files
with
58 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- /* Checkbox unchecked */ -}} | ||
{{- $REin := `<input disabled="" type="checkbox">` -}} | ||
{{- $REout := `<i class="far fa-check-square fa-fw"></i>` -}} | ||
{{- $content := replaceRE $REin $REout . -}} | ||
|
||
{{- /* Checkbox checked */ -}} | ||
{{- $REin = `<input checked="" disabled="" type="checkbox">` -}} | ||
{{- $REout = `<i class="far fa-square fa-fw"></i>` -}} | ||
{{- return replaceRE $REin $REout $content -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{- /* Font Awesome */ -}} | ||
{{- /* :(far fa-circle): -> <i class="far fa-circle fa-fw"></i> */ -}} | ||
{{- $REin := `:\(([\w- ]+?)\):` -}} | ||
{{- $REout := `<i class="$1 fa-fw"></i>` -}} | ||
{{- return replaceRE $REin $REout . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{- /* Ruby */ -}} | ||
{{- /* [EN]^(English) -> <strong><ruby>EN<rt>English</rt></ruby></strong> */ -}} | ||
{{- $REin := `\[(.+?)\]\^\((.+?)\)` -}} | ||
{{- $REout := `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}} | ||
{{- return replaceRE $REin $REout . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,9 @@ | ||
{{- /* Font Awesome */ -}} | ||
{{- /* :(far fa-circle): -> <i class="far fa-circle fa-fw"></i> */ -}} | ||
{{- $REin := `:\(([\w- ]+?)\):` -}} | ||
{{- $REout := `<i class="$1 fa-fw"></i>` -}} | ||
{{- $content := replaceRE $REin $REout . -}} | ||
{{- $content := . -}} | ||
|
||
{{- /* Ruby */ -}} | ||
{{- /* [EN]^(English) -> <strong><ruby>EN<rt>English</rt></ruby></strong> */ -}} | ||
{{- $REin = `\[(.+?)\]\^\((.+?)\)` -}} | ||
{{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}} | ||
{{- $content = replaceRE $REin $REout $content -}} | ||
{{- $content = partial "function/fontawesome.html" $content -}} | ||
|
||
{{- /* Checkbox */ -}} | ||
{{- $REin = `<input disabled="" type="checkbox">` -}} | ||
{{- $REout = `<i class="far fa-check-square fa-fw"></i>` -}} | ||
{{- $content = replaceRE $REin $REout $content -}} | ||
{{- $content = partial "function/ruby.html" $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>` -}} | ||
{{- $REout = `↩︎` -}} | ||
{{- $content = replaceRE $REin $REout $content -}} | ||
{{- $content = partial "function/checkbox.html" $content -}} | ||
|
||
{{- $content | safeHTML -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content
Large diffs are not rendered by default.
Oops, something went wrong.