templates/themes/ansi/notification.tmpl
author Mikael Berthe <mikael@lilotux.net>
Sat, 21 Oct 2017 19:12:11 +0200
changeset 172 0d651f070319
parent 169 26a1f0e705c9
child 195 1c655ba64ecf
permissions -rw-r--r--
Update types to reflect Mastodon 2.0.0 API changes This patch requires madon v2.0.0(-dev). (Fixes issue #9)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
172
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
     1
- Notification ID: {{color "red"}}{{.id}}{{color "reset"}}
60
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     2
  Type: {{color ",,bold"}}{{.type}}{{color "reset"}}
120
54b6f2a4098b Add template command tolocal; update templates and documentation
Mikael Berthe <mikael@lilotux.net>
parents: 117
diff changeset
     3
  Timestamp: {{.created_at | tolocal}}
60
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     4
{{- with .url}}
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     5
      URL: {{.url}}{{end}}
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     6
{{- with .account}}
172
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
     7
  - Account: ({{.id}}) {{color "magenta"}}@{{.acct}}{{color "reset"}}{{if .display_name}} - {{color "white,,bold"}}{{.display_name}}{{color "reset"}}{{end}}{{end}}
60
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     8
{{- with .status}}
172
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
     9
  - Status ID: {{color "red"}}{{.id}}{{color "reset"}}  {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
60
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    10
    Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}}
169
26a1f0e705c9 ansi themes: display visibility
Mikael Berthe <mikael@lilotux.net>
parents: 163
diff changeset
    11
    Visibility: {{.visibility}}
120
54b6f2a4098b Add template command tolocal; update templates and documentation
Mikael Berthe <mikael@lilotux.net>
parents: 117
diff changeset
    12
    Date: {{.created_at | tolocal}}
60
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    13
    URL: {{.url}}
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    14
{{- if .reblog }}{{with .reblog}}
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    15
    {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}}
172
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
    16
      ID: {{.id}}
60
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    17
      Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}}
120
54b6f2a4098b Add template command tolocal; update templates and documentation
Mikael Berthe <mikael@lilotux.net>
parents: 117
diff changeset
    18
      Date: {{.created_at | tolocal}}
172
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
    19
{{- if .in_reply_to_id}}
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
    20
      Replying to: {{.in_reply_to_id}}{{end}}
78
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    21
{{- if .sensitive}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    22
      Sensitive: true{{end}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    23
{{- with .spoiler_text}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    24
      Spoiler: {{.}}{{end}}
124
20d514540f37 Improve text wrapping
Mikael Berthe <mikael@lilotux.net>
parents: 120
diff changeset
    25
      Message: {{color "blue"}}{{.content | fromhtml | wrap "        " 79 | trim}}{{color "reset"}}{{end}}{{else}}
172
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
    26
{{- if .in_reply_to_id}}
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
    27
    Replying to: {{.in_reply_to_id}}{{end}}
78
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    28
{{- if .sensitive}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    29
  Sensitive: true{{end}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    30
{{- with .spoiler_text}}
b40bc3a8b572 Update ANSI templates
Mikael Berthe <mikael@lilotux.net>
parents: 76
diff changeset
    31
    Spoiler: {{.}}{{end}}
124
20d514540f37 Improve text wrapping
Mikael Berthe <mikael@lilotux.net>
parents: 120
diff changeset
    32
    Message: {{color "blue"}}{{.content | fromhtml | wrap "      " 79 | trim}}{{color "reset"}}
60
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    33
{{- range .media_attachments}}
172
0d651f070319 Update types to reflect Mastodon 2.0.0 API changes
Mikael Berthe <mikael@lilotux.net>
parents: 169
diff changeset
    34
    - Attachment ID: {{.id}}
60
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    35
{{- if .text_url}}
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    36
      Text URL: {{.text_url}}{{else if .url}}
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    37
      URL: {{.url}}{{else if .remote_url}}
1ca78111de77 Add template for notifications
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    38
      Remote URL: {{.remote_url}}{{end}}{{end}}{{end}}{{end}}