templates/ansi-account.tmpl
author Mikael Berthe <mikael@lilotux.net>
Sat, 06 May 2017 19:52:39 +0200
changeset 76 f155f9d86832
parent 59 ff88978ceb55
child 99 a179dc99a044
permissions -rw-r--r--
Fix in_reply_to ID format in templates The default format for numbers in templates is double, so we have to explicitly set the format string. BTW, replace ".var | printf FMT" with "printf FMT .var"... It is slightly more readable.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
76
f155f9d86832 Fix in_reply_to ID format in templates
Mikael Berthe <mikael@lilotux.net>
parents: 59
diff changeset
     1
- Account ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}}  {{color "magenta"}}@{{.username}}{{color "reset"}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
     2
  UID: {{color "red"}}{{.acct}}{{color "reset"}}
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
     3
  Display name: {{color "white,,bold"}}{{.display_name}}{{color "reset"}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     4
  Date: {{.created_at}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
     5
  URL: {{color "cyan"}}{{.url}}{{color "reset"}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     6
  Statuses: {{.statuses_count}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     7
  Followers: {{.followers_count}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     8
  Following: {{.following_count}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
     9
{{- with .note}}{{if ne . "<p></p>"}}
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
    10
  Note: {{. | fromhtml}}{{end}}{{end}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    11
{{- if eq .locked true}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    12
  Locked: true{{end}}