summaryrefslogtreecommitdiff
path: root/web/template
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-12-17 05:38:56 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-17 04:38:56 +0000
commit2bbc64be4317166d3abb7aa177d4913f166a53e8 (patch)
tree88c3d613eb986b18894f311afa4291987a0e26c4 /web/template
parent[chore] fix some little config whoopsies (#1272) (diff)
downloadgotosocial-2bbc64be4317166d3abb7aa177d4913f166a53e8.tar.xz
[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>
Diffstat (limited to 'web/template')
-rw-r--r--web/template/status.tmpl20
1 files changed, 17 insertions, 3 deletions
diff --git a/web/template/status.tmpl b/web/template/status.tmpl
index bff1fb692..2c81a2a54 100644
--- a/web/template/status.tmpl
+++ b/web/template/status.tmpl
@@ -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> \ No newline at end of file
+<a data-nosnippet href="{{.URL}}" class="toot-link">View toot</a>