gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

status.tmpl (4465B)


      1 {{- /*
      2 // GoToSocial
      3 // Copyright (C) GoToSocial Authors admin@gotosocial.org
      4 // SPDX-License-Identifier: AGPL-3.0-or-later
      5 //
      6 // This program is free software: you can redistribute it and/or modify
      7 // it under the terms of the GNU Affero General Public License as published by
      8 // the Free Software Foundation, either version 3 of the License, or
      9 // (at your option) any later version.
     10 //
     11 // This program is distributed in the hope that it will be useful,
     12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
     13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14 // GNU Affero General Public License for more details.
     15 //
     16 // You should have received a copy of the GNU Affero General Public License
     17 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
     18 */ -}}
     19 
     20 <section class="author">
     21 	<a href="{{.Account.URL}}">
     22 		<img class="avatar" src="{{.Account.Avatar}}" alt="">
     23 		<span class="displayname">
     24 			{{if .Account.DisplayName}}
     25 			{{emojify .Account.Emojis (escape .Account.DisplayName)}}
     26 			{{else}}
     27 			{{.Account.Username}}
     28 			{{end}}
     29 			<span class="sr-only">.</span>
     30 		</span>
     31 		<span class="username">@{{.Account.Username}}<span class="sr-only">, </span>{{acctInstance .Account.Acct}}</span>
     32 	</a>
     33 </section>
     34 <section class="body">
     35 	<div class="text">
     36 		{{if .SpoilerText}}
     37 		<details class="text-spoiler">
     38 			<summary>
     39 				<span class="spoiler-text">{{emojify .Emojis (escape .SpoilerText)}}</span>
     40 				<span class="button" role="button" tabindex="0">Toggle visibility</span>
     41 			</summary>
     42 			<div class="content">
     43 				{{emojify .Emojis (noescape .Content)}}
     44 			</div>
     45 		</details>
     46 		{{else}}
     47 		<div class="content">
     48 			{{emojify .Emojis (noescape .Content)}}
     49 		</div>
     50 		{{end}}
     51 	</div>
     52 	{{with .MediaAttachments}}
     53 	<div
     54 		class="media photoswipe-gallery {{(len .) | oddOrEven }}{{if eq (len .) 1}} single{{end}}{{if eq (len .) 2}} double{{end}}">
     55 		{{range $index, $media := .}}
     56 		{{with $media}}
     57 		<div class="media-wrapper">
     58 			<details class="{{.Type}}-spoiler media-spoiler" {{if not $.Sensitive}}open{{end}}>
     59 				<summary>
     60 					<div class="show sensitive button" aria-hidden="true">
     61 						Show sensitive media
     62 					</div>
     63 					<span class="eye button" role="button" tabindex="0" aria-label="Toggle media">
     64 						<i class="hide fa fa-fw fa-eye-slash" aria-hidden="true"></i>
     65 						<i class="show fa fa-fw fa-eye" aria-hidden="true"></i>
     66 					</span>
     67 
     68 					{{if eq .Type "video"}}
     69 					<video {{if .Description}} title="{{.Description}}" {{end}}>
     70 						<source type="video/mp4" src="{{.URL}}" />
     71 					</video>
     72 					{{else}}
     73 					<img {{if .Description}} title="{{.Description}}" {{end}} src="{{.PreviewURL}}" />
     74 					{{end}}
     75 				</summary>
     76 				{{if eq .Type "video"}}
     77 				<video class="plyr-video photoswipe-slide" controls {{if .Description}}alt="{{.Description}}"
     78 					title="{{.Description}}" {{end}} data-pswp-index="{{$index}}" data-pswp-width="{{.Meta.Original.Width}}px"
     79 					data-pswp-height="{{.Meta.Original.Height}}px">
     80 					<source type="video/mp4" src="{{.URL}}" />
     81 				</video>
     82 				{{else}}
     83 				<a class="photoswipe-slide" href="{{.URL}}" target="_blank" {{if .Description}}title="{{.Description}}" {{end}}
     84 					data-pswp-width="{{.Meta.Original.Width}}px" data-pswp-height="{{.Meta.Original.Height}}px"
     85 					data-cropped="true">
     86 					<img src="{{.PreviewURL}}" {{if .Description}}alt="{{.Description}}" {{end}} />
     87 				</a>
     88 				{{end}}
     89 			</details>
     90 		</div>
     91 		{{end}}
     92 		{{end}}
     93 	</div>
     94 	{{end}}
     95 </section>
     96 <aside class="info">
     97 	<time datetime="{{.CreatedAt}}">{{.CreatedAt | timestampPrecise}}</time>
     98 	<div class="stats" role="group">
     99 		<div>
    100 			<span aria-hidden="true">
    101 				<i class="fa fa-reply-all"></i> {{.RepliesCount}}
    102 			</span>
    103 			<span class="sr-only">{{.RepliesCount}} {{if .RepliesCount | eq 1}}reply{{else}}replies{{end}}</span>
    104 		</div>
    105 		<div>
    106 			<span aria-hidden="true">
    107 				<i class="fa fa-star"></i> {{.FavouritesCount}}
    108 			</span>
    109 			<span class="sr-only">{{.FavouritesCount}} favourite{{if .FavouritesCount | eq 1 | not}}s{{end}}</span>
    110 		</div>
    111 		<div>
    112 			<span aria-hidden="true">
    113 				<i class="fa fa-retweet"></i> {{.ReblogsCount}}
    114 			</span>
    115 			<span class="sr-only">{{.ReblogsCount}} boost{{if .ReblogsCount | eq 1 | not}}s{{end}}</span>
    116 		</div>
    117 		{{if .Pinned}}
    118 		<div>
    119 			<i class="fa fa-thumb-tack" aria-hidden="true"></i>
    120 			<span class="sr-only">pinned</span>
    121 		</div>
    122 		{{end}}
    123 	</div>
    124 </aside>
    125 <a data-nosnippet href="{{.URL}}" class="toot-link">Open
    126 	thread</a>