# HG changeset patch # User Mikael Berthe # Date 1493664553 -7200 # Node ID 1ca78111de774ab7edb34d0fcdda6c9513ce6845 # Parent ff88978ceb55af211bf58284c85b635bba0955d8 Add template for notifications diff -r ff88978ceb55 -r 1ca78111de77 templates/ansi-notification.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/ansi-notification.tmpl Mon May 01 20:49:13 2017 +0200 @@ -0,0 +1,29 @@ +- Notification ID: {{color "red"}}{{.id|printf "%.0f"}}{{color "reset"}} + Type: {{color ",,bold"}}{{.type}}{{color "reset"}} + Timestamp: {{.created_at}} +{{- with .url}} + URL: {{.url}}{{end}} +{{- with .account}} + - Account: ({{.id|printf "%.0f"}}) @{{.acct}} - {{.display_name}}{{end}} +{{- with .status}} + - 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}} +{{- if gt .in_reply_to_id 0.0}} + Replying to: {{.in_reply_to_id}}{{end}} +{{- with .spoiler_text}} + Spoiler: {{.}}{{end}} +{{- if .reblog }}{{with .reblog}} + {{color ",,bold"}}Reblogged from: {{color "magenta"}}@{{.account.acct}}{{color "reset"}} + ID: {{.id|printf "%.0f"}} + Name: {{color ",,bold"}}{{.account.display_name}}{{color "reset"}} + Date: {{.created_at}} + Message: {{color "blue"}}{{.content | fromhtml}}{{color "reset"}}{{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}}{{end}}