summaryrefslogtreecommitdiff
path: root/web/template/status.tmpl
blob: eb6c6a6c6967312b58931c8ed117506f7c4415a7 (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{{- /*
// GoToSocial
// Copyright (C) GoToSocial Authors admin@gotosocial.org
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/ -}}

<a data-nosnippet href="{{- .URL -}}" class="toot-link">Open thread</a>
<section class="author">
	<a href="{{- .Account.URL -}}">
		<img class="avatar" src="{{- .Account.Avatar -}}" alt="">
		<span aria-hidden="true" class="displayname">
			{{- if .Account.DisplayName -}}
			{{- emojify .Account.Emojis (escape .Account.DisplayName) -}}
			{{- else -}}
			{{- .Account.Username -}}
			{{- end -}}
		</span>
		<span aria-hidden="true" class="username">@{{- .Account.Username -}}</span>
		<span class="sr-only">
			{{- if .Account.DisplayName -}}
			{{- emojify .Account.Emojis (escape .Account.DisplayName) -}}. Username: @{{ .Account.Acct -}}.
			{{- else -}}
			@{{- .Account.Acct -}}.
			{{- end -}}
		</span>
	</a>
</section>
<section class="body">
	{{- if .SpoilerText }}
	<details class="text-spoiler">
		<summary>
			<span class="spoiler-text" lang="{{- .LanguageTag.TagStr -}}">{{- emojify .Emojis (escape .SpoilerText) -}}</span>
			<span class="button" role="button" tabindex="0">Toggle visibility</span>
		</summary>
		<div class="text">
			<div class="content" lang="{{- .LanguageTag.TagStr -}}">
				{{ emojify .Emojis (noescape .Content) }}
			</div>
			{{- if .Poll }}
			{{ template "status_poll.tmpl" . }}
			{{- end }}
		</div>
	</details>
	{{- else }}
	<div class="text">
		<div class="content" lang="{{- .LanguageTag.TagStr -}}">
			{{ emojify .Emojis (noescape .Content) }}
		</div>
		{{- if .Poll }}
		{{ template "status_poll.tmpl" . }}
		{{- end }}
	</div>
	{{- end }}
	{{- if .MediaAttachments }}
	{{ template "status_attachments.tmpl" . }}
	{{- end }}
</section>
<aside class="info">
	<dl class="sr-only">
		<dt>Published<dt>
		<dd>{{- .CreatedAt | timestampPrecise -}}</dd>
		{{- if .LanguageTag.DisplayStr }}
		<dt>Language</dt>
		<dd>{{ .LanguageTag.DisplayStr }}</dd>
		{{- end }}
	</dl>
	<time aria-hidden="true" datetime="{{- .CreatedAt -}}">{{- .CreatedAt | timestampPrecise -}}</time>
	<div class="stats" role="group">
		<div class="stats-item">
			<span aria-hidden="true"><i class="fa fa-reply-all"></i> {{ .RepliesCount -}}</span>
			<span class="sr-only">{{- .RepliesCount }} {{ if .RepliesCount | eq 1 }}reply{{ else }}replies{{ end -}}</span>
		</div>
		<div class="stats-item">
			<span aria-hidden="true"><i class="fa fa-star"></i> {{ .FavouritesCount -}}</span>
			<span class="sr-only">{{- .FavouritesCount }} {{ if .FavouritesCount | eq 1 }}favourite{{ else }}favourites{{ end -}}</span>
		</div>
		<div class="stats-item">
			<span aria-hidden="true"><i class="fa fa-retweet"></i> {{ .ReblogsCount -}}</span>
			<span class="sr-only">{{- .ReblogsCount }} {{ if .ReblogsCount | eq 1 }}boost{{ else }}boosts{{ end -}}</span>
		</div>
		{{- if .Pinned }}
		<div class="stats-item">
			<i class="fa fa-thumb-tack" aria-hidden="true"></i>
			<span class="sr-only">pinned</span>
		</div>
		{{- end }}
		{{- if .LanguageTag.DisplayStr }}
		<div aria-hidden="true" class="stats-item language" title="Language: {{ .LanguageTag.DisplayStr }}">{{ .LanguageTag.TagStr }}</div>
		{{- end }}
	</div>
</aside>