forked from RasmusLindroth/tut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
toot.tmpl
73 lines (70 loc) · 2.51 KB
/
toot.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{{- if .Toot.Boosted -}}
{{ Color .Style.Subtle }}
{{- if ne .Toot.BoostedDisplayName "" -}}
{{- .Toot.BoostedDisplayName}} ({{.Toot.BoostedAcct}}) boosted
{{ else -}}
{{- .Toot.BoostedAcct}} boosted
{{ end -}}
{{ Color .Style.Text -}}
{{ end }}
{{- if .Toot.Bookmarked -}}
{{ Color .Style.TextSpecial2 }}You have bookmarked this toot
{{ end }}
{{- if ne .Toot.Visibility "public" -}}{{ Color .Style.TextSpecial1 }}({{ .Toot.Visibility}}) {{ end }}
{{- if ne .Toot.AccountDisplayName "" -}}
{{- Color .Style.TextSpecial2 }}{{ .Toot.AccountDisplayName }}
{{ Color .Style.TextSpecial1 }}{{ .Toot.Account }}
{{- else -}}
{{ Color .Style.TextSpecial2 }}{{- .Toot.Account }}
{{- end }}
{{ if .Toot.Spoiler -}}
{{ Color .Style.Text }}{{ .Toot.SpoilerText }}
{{ if not .Toot.ShowSpoiler }}
{{ Color .Style.Subtle }}Press [z[] to show hidden text{{ Color .Style.Text }}
{{ end }}
{{ end -}}
{{- if or (not .Toot.Spoiler) (.Toot.ShowSpoiler) -}}
{{ Color .Style.Text }}{{ .Toot.ContentText }}
{{ if ne .Toot.Poll.ID "" }}
{{ if .Toot.Poll.Voted -}}
{{- Color .Style.Subtle }}{{ Flags "b" }}Poll - you have voted{{ Flags "-" -}}
{{ else if not .Toot.Poll.Expired }}
{{- Color .Style.Subtle }}{{ Flags "b" }}Poll - press [p[] to vote{{ Flags "-" -}}
{{ else }}
{{- Color .Style.Subtle }}{{ Flags "b" }}Poll - expired {{ Flags "-" -}}
{{ end }}
{{ Color .Style.Text }}Number of votes: {{ .Toot.Poll.VotesCount }}
{{ range .Toot.Poll.Options }}
{{- if or ($.Toot.Poll.Voted) ($.Toot.Poll.Expired) -}}
{{- .Title }} - {{ .Percent }}% ({{ .VotesCount }})
{{- else -}}
{{- .Title -}}
{{ end }}
{{ end -}}
{{ end -}}
{{ range .Toot.Media }}
{{ Color $.Style.Subtle }}{{ Flags "b" }}Attached {{ .Type }}{{ Flags "-" }}
{{- if ne .Description "" }}
{{ Color $.Style.Text }}{{ .Description }}
{{ end }}
{{ Color $.Style.Text }}{{ Flags "i" }}{{ .URL }}{{ Flags "-" }}
{{ end -}}
{{ end }}
{{- if ne .Toot.Card.Type "" }}
{{ Color .Style.Subtle }}{{ Flags "b" }}Card: {{ .Toot.Card.Type }}{{ Flags "-" }}
{{- if ne .Toot.Card.Title "" }}
{{ Color .Style.TextSpecial2 }}{{ .Toot.Card.Title }}
{{ end }}
{{- if ne .Toot.Card.Description "" }}
{{ Color .Style.Text }}{{ .Toot.Card.Description }}
{{ end }}
{{- if ne .Toot.Card.URL "" }}
{{ Color .Style.Text }}{{ Flags "i" }}{{ .Toot.Card.URL }}{{ Flags "-" }}
{{ end }}
{{ end }}
{{ Color .Style.Subtle }}Replies
{{- Color .Style.TextSpecial1 }} {{ .Toot.Replies }}
{{- Color .Style.Subtle }} Boosts
{{- Color .Style.TextSpecial1 }} {{ .Toot.Boosts }}
{{- Color .Style.Subtle }} Favorites
{{- Color .Style.TextSpecial1 }} {{ .Toot.Favorites }}