Merge pull request #84 from dillonzq/fix/duplicated_typeit

fix(typeit): fix duplicated typeit bug (#82)
This commit is contained in:
Dillon 2020-02-19 19:31:28 +08:00 committed by GitHub
commit 6430e78c16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -6,7 +6,7 @@
list-style: none; list-style: none;
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
padding-top: 1rem; padding: 1rem 0 0;
a { a {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;

View file

@ -1,4 +1,5 @@
{{- $CDN := .Scratch.Get "CDN" -}} {{- $CDN := .Scratch.Get "CDN" -}}
{{- $localScratch := newScratch -}}
{{- /* Fork Awesome https://forkaweso.me/ */ -}} {{- /* Fork Awesome https://forkaweso.me/ */ -}}
{{- if .Scratch.Get "forkawesome" -}} {{- if .Scratch.Get "forkawesome" -}}
@ -41,10 +42,10 @@
{{- slice "js/lib/typeit/typeit.min.js" | $.Scratch.Add "scriptLocal" -}} {{- slice "js/lib/typeit/typeit.min.js" | $.Scratch.Add "scriptLocal" -}}
{{- end -}} {{- end -}}
{{- range $key, $val := . -}} {{- range $key, $val := . -}}
{{- slice $val | $.Scratch.Add "typeitArr" -}} {{- slice $val | $localScratch.Add "typeitArr" -}}
{{- end -}} {{- end -}}
<script> <script>
window.typeitArr = {{ $.Scratch.Get "typeitArr" | jsonify | safeJS }}; window.typeitArr = {{ $localScratch.Get "typeitArr" | jsonify | safeJS }};
</script> </script>
{{- end -}} {{- end -}}