diff --git a/layouts/shortcodes/displayToot.html b/layouts/shortcodes/displayToot.html new file mode 100644 index 0000000..47b05c4 --- /dev/null +++ b/layouts/shortcodes/displayToot.html @@ -0,0 +1,30 @@ +{{ $toot_reference := .Get 0 }} +{{ $url := printf "static/data/toots/%s.json" $toot_reference }} +{{ $dataJ := getJSON $url }} + +{{ with $dataJ }} +{{ if ne .content "" }} +
+
+ +

Tooted on

+ {{ .content | safeHTML }} + {{ if gt (len .media_attachments) 0 }} +
+ {{ range .media_attachments}} + {{ if eq .type "image" }} + {{ .description }} + {{ end }} + {{ end }} +
+ {{ end }} +
+
+ {{ .replies_count }} + {{ .reblogs_count }} + {{ .favourites_count }} + | Source: {{ .url }} +
+
+{{ end }} +{{ end }}