templates/ansi-status.tmpl
author Mikael Berthe <mikael@lilotux.net>
Mon, 01 May 2017 13:06:31 +0200
changeset 52 2ffe0d622db9
parent 23 2ba1ea451669
child 59 ff88978ceb55
permissions -rw-r--r--
Use the color function in the ANSI templates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
     1
- Status ID: {{color "red"}}{{.id}}{{color "reset"}}  {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
     2
  Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     3
  Date: {{.created_at}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     4
  URL: {{.url}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     5
{{- if gt .in_reply_to_id 0.0}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     6
  Replying to: {{.in_reply_to_id}}{{end}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     7
{{- with .spoiler_text}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     8
  Spoiler: {{.}}{{end}}
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     9
{{- if .reblog }}{{with .reblog}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
    10
  {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    11
    ID: {{.id}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
    12
    Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    13
    Date: {{.created_at}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
    14
    Message: {{color "blue"}}{{.content | fromhtml}}{{color "reset"}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    15
{{end}}{{else}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
    16
  Message: {{color "blue"}}{{.content | fromhtml}}{{color "reset"}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    17
{{end -}}