+
+
+
{{ .account.display_name }}
+
+ Tooted on {{ dateFormat "January 2, 2006 15:04" (time .created_at) }}
+
+ {{ .content | safeHTML }}
+ {{ if gt (len .media_attachments) 0 }}
+
+ {{ range .media_attachments}}
+ {{ if eq .type "image" }}
+
+ {{ end }}
+ {{ end }}
+
+ {{ end }}
+
+ {{ .Permalink }}
+ {{ range .tags }}
+ {{ .name }}
+ {{ end }}
+
+ {{ $post_url := urls.Parse .url }}
+ {{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
+ {{ $social_url := printf "%s://%s/interact/%s" $post_url.Scheme $post_url.Host $status_id }}
+ {{ $reply_url := printf "%s?type=reply" $social_url }}
+ {{ $favorite_url := printf "%s?type=favourite" $social_url }}
+ {{ $boost_url := printf "%s?type=reblog" $social_url }}
+
+
+ {{ .replies_count }}
+
+
+
+ {{ .reblogs_count }}
+
+
+
+ {{ .favourites_count }}
+
+
| Source: {{ .url }}
+
+
+ {{ end }}
+ {{ end }}
+
\ No newline at end of file
diff --git a/layouts/shortcodes/displayOnlineToot.html b/layouts/shortcodes/displayOnlineToot.html
index 5a9520c..7e1a426 100644
--- a/layouts/shortcodes/displayOnlineToot.html
+++ b/layouts/shortcodes/displayOnlineToot.html
@@ -3,51 +3,5 @@
{{ $api_url := printf "%s://%s/api/v1/statuses/%s" $url.Scheme $url.Host $status_id }}
{{ $dataJ := getJSON $api_url }}
-{{ with $dataJ }}
-{{ if ne .content "" }}
-
-
-
-
{{ .account.display_name }}
-
- Tooted on {{ dateFormat "January 2, 2006 15:04" (time .created_at) }}
-
- {{ .content | safeHTML }}
- {{ if gt (len .media_attachments) 0 }}
-
- {{ range .media_attachments}}
- {{ if eq .type "image" }}
-
- {{ end }}
- {{ end }}
-
- {{ end }}
-
- {{ .Permalink }}
- {{ range .tags }}
- {{ .name }}
- {{ end }}
-
- {{ $post_url := urls.Parse .url }}
- {{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
- {{ $social_url := printf "%s://%s/interact/%s" $post_url.Scheme $post_url.Host $status_id }}
- {{ $reply_url := printf "%s?type=reply" $social_url }}
- {{ $favorite_url := printf "%s?type=favourite" $social_url }}
- {{ $boost_url := printf "%s?type=reblog" $social_url }}
-
-
- {{ .replies_count }}
-
-
-
- {{ .reblogs_count }}
-
-
-
- {{ .favourites_count }}
-
-
| Source: {{ .url }}
-
-
-{{ end }}
-{{ end }}
+{{ .Scratch.Set "toot" $dataJ }}
+{{ partial "toot.html" . }}
diff --git a/layouts/shortcodes/displayToot.html b/layouts/shortcodes/displayToot.html
index 29e4e30..2acd29b 100644
--- a/layouts/shortcodes/displayToot.html
+++ b/layouts/shortcodes/displayToot.html
@@ -2,51 +2,5 @@
{{ $url := printf "static/data/toots/%s.json" $toot_reference }}
{{ $dataJ := getJSON $url }}
-{{ with $dataJ }}
-{{ if ne .content "" }}
-
-
-
-
{{ .account.display_name }}
-
- Tooted on {{ dateFormat "January 2, 2006 15:04" (time .created_at) }}
-
- {{ .content | safeHTML }}
- {{ if gt (len .media_attachments) 0 }}
-
- {{ range .media_attachments}}
- {{ if eq .type "image" }}
-
- {{ end }}
- {{ end }}
-
- {{ end }}
-
- {{ .Permalink }}
- {{ range .tags }}
- {{ .name }}
- {{ end }}
-
- {{ $post_url := urls.Parse .url }}
- {{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
- {{ $social_url := printf "%s://%s/interact/%s" $post_url.Scheme $post_url.Host $status_id }}
- {{ $reply_url := printf "%s?type=reply" $social_url }}
- {{ $favorite_url := printf "%s?type=favourite" $social_url }}
- {{ $boost_url := printf "%s?type=reblog" $social_url }}
-
-
- {{ .Params.replies_count }}
-
-
-
- {{ .Params.reblogs_count }}
-
-
-
- {{ .Params.favourites_count }}
-
-
| Source: {{ .url }}
-
-
-{{ end }}
-{{ end }}
+{{ .Scratch.Set "toot" $dataJ }}
+{{ partial "toot.html" . }}
diff --git a/layouts/shortcodes/displayToots.html b/layouts/shortcodes/displayToots.html
index 7fd6378..2853d7d 100644
--- a/layouts/shortcodes/displayToots.html
+++ b/layouts/shortcodes/displayToots.html
@@ -3,50 +3,6 @@
{{ range sort $dataJ "created_at" "desc" }}
-{{ if ne .content "" }}
-
-
-
-
{{ .account.display_name }}
-
- Tooted on {{ dateFormat "January 2, 2006 15:04" (time .created_at) }}
-
- {{ .content | safeHTML }}
- {{ if gt (len .media_attachments) 0 }}
-
- {{ range .media_attachments}}
- {{ if eq .type "image" }}
-
- {{ end }}
- {{ end }}
-
- {{ end }}
-
- {{ .Permalink }}
- {{ range .tags }}
- {{ .name }}
- {{ end }}
-
- {{ $post_url := urls.Parse .url }}
- {{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
- {{ $social_url := printf "%s://%s/interact/%s" $post_url.Scheme $post_url.Host $status_id }}
- {{ $reply_url := printf "%s?type=reply" $social_url }}
- {{ $favorite_url := printf "%s?type=favourite" $social_url }}
- {{ $boost_url := printf "%s?type=reblog" $social_url }}
-
-
- {{ .Params.replies_count }}
-
-
-
- {{ .Params.reblogs_count }}
-
-
-
- {{ .Params.favourites_count }}
-
-
| Source: {{ .url }}
-
-
-{{ end }}
+ {{ .Scratch.Set "toot" $dataJ }}
+ {{ partial "toot.html" . }}
{{ end }}
diff --git a/layouts/toots/list.html b/layouts/toots/list.html
index 71104f5..07d6424 100644
--- a/layouts/toots/list.html
+++ b/layouts/toots/list.html
@@ -3,59 +3,25 @@