mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Enable basic video support (mp4 only) (#1274)
* [feature] basic video support * fix missing semicolon * replace text shadow with stacked icons Co-authored-by: f0x <f0x@cthu.lu>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
{{range .}}
|
||||
<div class="media-wrapper">
|
||||
{{if not .Description}}
|
||||
<div class="no-image-desc" aria-hidden="true" ><i class="fa fa-info-circle"></i><span>Missing image description</span></div>
|
||||
<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}}/>
|
||||
<div class="sensitive">
|
||||
@@ -35,7 +35,21 @@
|
||||
<label for="sensitiveMedia-{{.ID}}" class="button" role="button" tabindex="0">Show sensitive media</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{.URL}}" target="_blank" {{if .Description}}title="{{.Description}}"{{end}} data-pswp-width="{{.Meta.Original.Width}}px" data-pswp-height="{{.Meta.Original.Height}}px" data-cropped="true">
|
||||
{{ 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 }}
|
||||
<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}}"/>
|
||||
</a>
|
||||
</div>
|
||||
@@ -51,4 +65,4 @@
|
||||
<div id="favorites"><i aria-label="Favorites" class="fa fa-star"></i> {{.FavouritesCount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a data-nosnippet href="{{.URL}}" class="toot-link">View toot</a>
|
||||
<a data-nosnippet href="{{.URL}}" class="toot-link">View toot</a>
|
||||
|
Reference in New Issue
Block a user