Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kdevo/osprey-delight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/shortcodes/term.html18
1 files changed, 16 insertions, 2 deletions
diff --git a/layouts/shortcodes/term.html b/layouts/shortcodes/term.html
index cb24367..818611c 100644
--- a/layouts/shortcodes/term.html
+++ b/layouts/shortcodes/term.html
@@ -1,3 +1,17 @@
-<div id="termynal" data-termynal>
-{{ with .Inner -}}{{ . | safeHTML }}{{- end }}
+<div id="termynal-{{ urlize .Page.File.BaseFileName }}" data-termynal>
+ <div class="term-content">
+ {{ if eq (.Get 0) "html" }}
+ {{ .Inner | safeHTML }}
+ {{ else }}
+ {{ with .Inner }}
+ {{ range (transform.Unmarshal .).lines }}
+ {{ if eq .type "progress" }}
+ <span data-ty="{{ .type }}" data-ty-delay="{{ .wait }}" data-ty-progressPercent="{{ .data }}"></span>
+ {{ else }}
+ <span data-ty="{{ .type }}" data-ty-delay="{{ .wait }}">{{ .data }}</span>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ </div>
</div> \ No newline at end of file