transition from javascript to typescript

This commit is contained in:
Spedon
2023-03-14 01:01:23 +08:00
parent b05c475841
commit 211e2fd4fb
9 changed files with 343 additions and 236 deletions

View File

@@ -24,7 +24,7 @@
{{ $.Scratch.Add "img" slice }}
{{ range . }}
{{ $index = sub $index 1}}
{{ $.Scratch.Add "img" (dict "index" (string $index) "url" (string .RelPermalink) "height" (string .Height) "width" (string .Width)) }}
{{ $.Scratch.Add "img" (dict "index" (string $index) "url" (string .RelPermalink) "imgH" (string .Height) "imgW" (string .Width)) }}
{{ end }}
<script id="images_array" type="application/json">{{ $.Scratch.Get "img" | jsonify | safeJS }}</script>
{{ end }}