templates/ansi-status.tmpl
author Mikael Berthe <mikael@lilotux.net>
Sun, 07 May 2017 21:54:50 +0200
changeset 95 4b80a5396961
parent 78 b40bc3a8b572
child 120 54b6f2a4098b
permissions -rw-r--r--
Update templates / ANSI theme
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
- Status ID: {{color "red"}}{{printf "%.0f" .id}}{{color "reset"}}  {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
52
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 .reblog }}{{with .reblog}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
     6
  {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
76
f155f9d86832 Fix in_reply_to ID format in templates
Mikael Berthe <mikael@lilotux.net>
parents: 59
diff changeset
     7
    ID: {{printf "%.0f" .id}}
52
2ffe0d622db9 Use the color function in the ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 23
diff changeset
     8
    Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     9
    Date: {{.created_at}}
78
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    10
{{- if gt .in_reply_to_id 0.0}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    11
    Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    12
{{- if .sensitive}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    13
  Sensitive: true{{end}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    14
{{- with .spoiler_text}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    15
    Spoiler: {{.}}{{end}}
95
4b80a5396961 Update templates / ANSI theme
Mikael Berthe <mikael@lilotux.net>
parents: 78
diff changeset
    16
    Message: {{color "blue"}}{{.content | fromhtml | wrap "     " 80 | trim}}{{color "reset"}}
59
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    17
{{- range .media_attachments}}
76
f155f9d86832 Fix in_reply_to ID format in templates
Mikael Berthe <mikael@lilotux.net>
parents: 59
diff changeset
    18
    - Attachment ID: {{printf "%.0f" .id}}
59
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    19
{{- if .text_url}}
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    20
      Text URL: {{.text_url}}{{else if .url}}
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    21
      URL: {{.url}}{{else if .remote_url}}
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    22
      Remote URL: {{.remote_url}}{{end}}{{end}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    23
{{end}}{{else}}
78
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    24
{{- if gt .in_reply_to_id 0.0}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    25
  Replying to: {{printf "%.0f" .in_reply_to_id}}{{end}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    26
{{- if .sensitive}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    27
  Sensitive: true{{end}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    28
{{- with .spoiler_text}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    29
  Spoiler: {{.}}{{end}}
95
4b80a5396961 Update templates / ANSI theme
Mikael Berthe <mikael@lilotux.net>
parents: 78
diff changeset
    30
  Message: {{color "blue"}}{{.content | fromhtml | wrap "     " 80 | trim}}{{color "reset"}}
59
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    31
{{- range .media_attachments}}
76
f155f9d86832 Fix in_reply_to ID format in templates
Mikael Berthe <mikael@lilotux.net>
parents: 59
diff changeset
    32
  - Attachment ID: {{printf "%.0f" .id}}
59
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    33
{{- if .text_url}}
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    34
    Text URL: {{.text_url}}{{else if .url}}
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    35
    URL: {{.url}}{{else if .remote_url}}
ff88978ceb55 Update templates
Mikael Berthe <mikael@lilotux.net>
parents: 52
diff changeset
    36
    Remote URL: {{.remote_url}}{{end}}{{end}}
23
2ba1ea451669 Add template samples
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    37
{{end -}}