Update templates
authorMikael Berthe <mikael@lilotux.net>
Mon, 01 May 2017 20:48:07 +0200
changeset 59 ff88978ceb55
parent 58 5a0cb1e65e65
child 60 1ca78111de77
Update templates - Force IDs to be displayed as integers - Add media attachment URLs in statuses
templates/ansi-account.tmpl
templates/ansi-status.tmpl
--- a/templates/ansi-account.tmpl	Mon May 01 20:46:14 2017 +0200
+++ b/templates/ansi-account.tmpl	Mon May 01 20:48:07 2017 +0200
@@ -1,4 +1,4 @@
-- Account ID: {{color "red"}}{{.id}}{{color "reset"}}  {{color "magenta"}}@{{.username}}{{color "reset"}}
+- Account ID: {{color "red"}}{{.id|printf "%.0f"}}{{color "reset"}}  {{color "magenta"}}@{{.username}}{{color "reset"}}
   UID: {{color "red"}}{{.acct}}{{color "reset"}}
   Display name: {{color "white,,bold"}}{{.display_name}}{{color "reset"}}
   Date: {{.created_at}}
--- a/templates/ansi-status.tmpl	Mon May 01 20:46:14 2017 +0200
+++ b/templates/ansi-status.tmpl	Mon May 01 20:48:07 2017 +0200
@@ -1,4 +1,4 @@
-- Status ID: {{color "red"}}{{.id}}{{color "reset"}}  {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
+- Status ID: {{color "red"}}{{.id|printf "%.0f"}}{{color "reset"}}  {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
   Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}}
   Date: {{.created_at}}
   URL: {{.url}}
@@ -8,10 +8,22 @@
   Spoiler: {{.}}{{end}}
 {{- if .reblog }}{{with .reblog}}
   {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
-    ID: {{.id}}
+    ID: {{.id|printf "%.0f"}}
     Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}}
     Date: {{.created_at}}
     Message: {{color "blue"}}{{.content | fromhtml}}{{color "reset"}}
+{{- range .media_attachments}}
+    - Attachment ID: {{.id|printf "%.0f"}}
+{{- if .text_url}}
+      Text URL: {{.text_url}}{{else if .url}}
+      URL: {{.url}}{{else if .remote_url}}
+      Remote URL: {{.remote_url}}{{end}}{{end}}
 {{end}}{{else}}
   Message: {{color "blue"}}{{.content | fromhtml}}{{color "reset"}}
+{{- range .media_attachments}}
+  - Attachment ID: {{.id|printf "%.0f"}}
+{{- if .text_url}}
+    Text URL: {{.text_url}}{{else if .url}}
+    URL: {{.url}}{{else if .remote_url}}
+    Remote URL: {{.remote_url}}{{end}}{{end}}
 {{end -}}