aboutsummaryrefslogtreecommitdiff
path: root/templates/status.tmpl
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-04-25 09:35:18 +0000
committerr <r@freesoftwareextremist.com>2020-04-25 09:35:18 +0000
commitf380371654dd81b258e5f37e50ffcf3764f117c1 (patch)
treeedfa323e84ea3264a7a0cf7ba4a3ee58895cbcf0 /templates/status.tmpl
parent1e750f89b156c601fa5cfbda21e8c4b46be85b18 (diff)
downloadbloat-f380371654dd81b258e5f37e50ffcf3764f117c1.tar.gz
bloat-f380371654dd81b258e5f37e50ffcf3764f117c1.zip
Add option to hide attachments
Diffstat (limited to 'templates/status.tmpl')
-rw-r--r--templates/status.tmpl23
1 files changed, 20 insertions, 3 deletions
diff --git a/templates/status.tmpl b/templates/status.tmpl
index ade9d25..6433b9c 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -75,31 +75,48 @@
{{end}}
<div class="status-media-container">
{{range .MediaAttachments}}
+
{{if eq .Type "image"}}
+ {{if $.Ctx.HideAttachments}}
+ <a href="{{.URL}}" target="_blank"> [image] </a>
+ {{else}}
<a class="img-link" href="{{.URL}}" target="_blank">
<img class="status-image" src="{{.URL}}" alt="status-image" />
{{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
<div class="status-nsfw-overlay"></div>
{{end}}
</a>
+ {{end}}
+
{{else if eq .Type "audio"}}
+ {{if $.Ctx.HideAttachments}}
+ <a href="{{.URL}}" target="_blank"> [audio] </a>
+ {{else}}
<audio class="status-audio" controls preload="none">
<source src="{{.URL}}">
- <p> Your browser doesn't support HTML5 audio </p>
+ <a href="{{.URL}}" target="_blank"> [audio] </a>
</audio>
+ {{end}}
+
{{else if eq .Type "video"}}
+ {{if $.Ctx.HideAttachments}}
+ <a href="{{.URL}}" target="_blank"> [video] </a>
+ {{else}}
<div class="status-video-container">
<video class="status-video" controls preload="none">
<source src="{{.URL}}">
- <p> Your browser doesn't support HTML5 video </p>
+ <a href="{{.URL}}" target="_blank"> [video] </a>
</video>
{{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
<div class="status-nsfw-overlay"></div>
{{end}}
</div>
+ {{end}}
+
{{else}}
- <a href="{{.URL}}" target="_blank"> attachment </a>
+ <a href="{{.URL}}" target="_blank"> [attachment] </a>
{{end}}
+
{{end}}
</div>
{{if .Poll}}