2023-01-05 11:43:00 +00:00
|
|
|
{{- /*
|
2023-04-04 09:33:11 +00:00
|
|
|
// 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/>.
|
2023-01-05 11:43:00 +00:00
|
|
|
*/ -}}
|
|
|
|
|
2023-05-10 18:18:49 +00:00
|
|
|
<section class="author">
|
|
|
|
<a href="{{.Account.URL}}">
|
|
|
|
<img class="avatar" src="{{.Account.Avatar}}" alt="">
|
|
|
|
<span class="displayname">
|
|
|
|
{{if .Account.DisplayName}}
|
|
|
|
{{emojify .Account.Emojis (escape .Account.DisplayName)}}
|
|
|
|
{{else}}
|
|
|
|
{{.Account.Username}}
|
|
|
|
{{end}}
|
|
|
|
<span class="sr-only">.</span>
|
|
|
|
</span>
|
|
|
|
<span class="username">@{{.Account.Username}}<span class="sr-only">, </span>{{acctInstance .Account.Acct}}</span>
|
|
|
|
</a>
|
|
|
|
</section>
|
|
|
|
<section class="body">
|
2022-07-04 14:23:59 +00:00
|
|
|
<div class="text">
|
|
|
|
{{if .SpoilerText}}
|
2023-05-10 18:18:49 +00:00
|
|
|
<details class="spoiler-details">
|
|
|
|
<summary>
|
|
|
|
<span class="spoiler-text">{{emojify .Emojis (escape .SpoilerText)}}</span>
|
|
|
|
<span class="button" role="button" tabindex="0">Toggle visibility</span>
|
|
|
|
</summary>
|
|
|
|
<div class="content">
|
|
|
|
{{emojify .Emojis (noescape .Content)}}
|
|
|
|
</div>
|
|
|
|
</details>
|
|
|
|
{{else}}
|
2022-07-04 14:23:59 +00:00
|
|
|
<div class="content">
|
2022-09-02 09:54:32 +00:00
|
|
|
{{emojify .Emojis (noescape .Content)}}
|
2022-07-04 14:23:59 +00:00
|
|
|
</div>
|
2023-05-10 18:18:49 +00:00
|
|
|
{{end}}
|
2021-09-13 12:45:33 +00:00
|
|
|
</div>
|
2022-07-04 14:23:59 +00:00
|
|
|
{{with .MediaAttachments}}
|
2023-05-10 18:18:49 +00:00
|
|
|
<div
|
|
|
|
class="media photoswipe-gallery {{(len .) | oddOrEven }}{{if eq (len .) 1}} single{{end}}{{if eq (len .) 2}} double{{end}}">
|
2022-08-14 17:22:13 +00:00
|
|
|
{{range .}}
|
|
|
|
<div class="media-wrapper">
|
|
|
|
{{if not .Description}}
|
2023-05-10 18:18:49 +00:00
|
|
|
<div class="no-image-desc" aria-hidden="true"><i class="fa fa-info-circle"></i><span>Missing media
|
|
|
|
description</span></div>
|
|
|
|
{{end}}
|
|
|
|
<input type="checkbox" id="sensitiveMedia-{{.ID}}" class="sensitive-checkbox hidden"
|
|
|
|
{{if not $.Sensitive}}checked{{end}} />
|
2022-08-14 17:22:13 +00:00
|
|
|
<div class="sensitive">
|
|
|
|
<div class="open">
|
|
|
|
<label for="sensitiveMedia-{{.ID}}" class="button" role="button" tabindex="0">
|
|
|
|
<i class="fa fa-eye-slash" title="Hide sensitive media"></i>
|
|
|
|
</label>
|
|
|
|
</div>
|
2023-05-10 18:18:49 +00:00
|
|
|
<div class="closed" {{if .Description}}title="{{.Description}}" {{end}}>
|
2022-08-14 17:22:13 +00:00
|
|
|
<label for="sensitiveMedia-{{.ID}}" class="button" role="button" tabindex="0">Show sensitive media</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-17 04:38:56 +00:00
|
|
|
{{ if eq .Type "video" }}
|
|
|
|
<div class="video-play">
|
|
|
|
<span class="icon-span fa-stack" aria-hidden="true">
|
|
|
|
<i class="icon-bg fa fa-fw fa-circle fa-stack-1x"></i>
|
|
|
|
<i class="icon fa fa-fw fa-play-circle fa-stack-1x"></i>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2023-05-10 18:18:49 +00:00
|
|
|
<a href="{{.URL}}" target="_blank" {{if .Description}}title="{{.Description}}" {{end}}
|
|
|
|
data-pswp-width="{{.Meta.Original.Width}}px" data-pswp-height="{{.Meta.Original.Height}}px"
|
|
|
|
{{if eq .Type "video"}}data-pswp-type="video" {{end}} data-cropped="true">
|
|
|
|
<img src="{{.PreviewURL}}" {{if .Description}}alt="{{.Description}}" {{end}} data-blurhash="{{.Blurhash}}" />
|
2022-08-14 17:22:13 +00:00
|
|
|
</a>
|
2022-07-04 14:23:59 +00:00
|
|
|
</div>
|
2022-08-14 17:22:13 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
2021-09-13 12:45:33 +00:00
|
|
|
{{end}}
|
2023-05-10 18:18:49 +00:00
|
|
|
</section>
|
|
|
|
<aside class="info">
|
2023-05-10 18:18:50 +00:00
|
|
|
<time datetime="{{.CreatedAt}}">{{.CreatedAt | timestampPrecise}}</time>
|
2023-05-10 18:18:49 +00:00
|
|
|
<div class="stats" role="group">
|
2023-05-10 18:18:50 +00:00
|
|
|
<div>
|
2023-05-10 18:18:49 +00:00
|
|
|
<span aria-hidden="true">
|
|
|
|
<i class="fa fa-reply-all"></i> {{.RepliesCount}}
|
|
|
|
</span>
|
2023-05-10 18:18:50 +00:00
|
|
|
<span class="sr-only">{{.RepliesCount}} {{if .RepliesCount | eq 1}}reply{{else}}replies{{end}}</span>
|
2023-05-10 18:18:49 +00:00
|
|
|
</div>
|
2023-05-10 18:18:50 +00:00
|
|
|
<div>
|
2023-05-10 18:18:49 +00:00
|
|
|
<span aria-hidden="true">
|
|
|
|
<i class="fa fa-star"></i> {{.FavouritesCount}}
|
|
|
|
</span>
|
|
|
|
<span class="sr-only">{{.FavouritesCount}} favourite{{if .FavouritesCount | eq 1 | not}}s{{end}}</span>
|
|
|
|
</div>
|
2023-05-10 18:18:50 +00:00
|
|
|
<div>
|
2023-05-10 18:18:49 +00:00
|
|
|
<span aria-hidden="true">
|
2023-05-10 18:18:50 +00:00
|
|
|
<i class="fa fa-retweet"></i> {{.ReblogsCount}}
|
2023-05-10 18:18:49 +00:00
|
|
|
</span>
|
|
|
|
<span class="sr-only">{{.ReblogsCount}} boost{{if .ReblogsCount | eq 1 | not}}s{{end}}</span>
|
|
|
|
</div>
|
|
|
|
{{if .Pinned}}
|
|
|
|
<div>
|
|
|
|
<i class="fa fa-thumb-tack" aria-hidden="true"></i>
|
|
|
|
<span class="sr-only">pinned</span>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2021-09-13 12:45:33 +00:00
|
|
|
</div>
|
2023-05-10 18:18:49 +00:00
|
|
|
</aside>
|
|
|
|
<a data-nosnippet href="{{.URL}}" class="toot-link">Open
|
|
|
|
thread</a>
|