aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-13 20:03:26 +0000
committerr <r@freesoftwareextremist.com>2019-12-13 20:03:26 +0000
commit55d559552c23ed8772092f7383e7700609089f62 (patch)
treedf5be309898da65793cfbc4c87c783628bd6b820
parent5e4da01c3ae3ae2e870faba9085d9d9213c01c29 (diff)
downloadbloat-55d559552c23ed8772092f7383e7700609089f62.tar.gz
bloat-55d559552c23ed8772092f7383e7700609089f62.zip
Add attachment media support
-rw-r--r--templates/status.tmpl21
1 files changed, 21 insertions, 0 deletions
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 47ff6e4..fde2309 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -8,6 +8,27 @@
<span class="status-uname"> {{.Account.Acct}} </span>
</div>
<div class="status-content"> {{WithEmojis .Content .Emojis}} </div>
+ <div class="status-media-container">
+ {{range .MediaAttachments}}
+ {{if eq .Type "image"}}
+ <a href="{{.URL}}" target="_blank">
+ <img class="status-image" src="{{.URL}}" alt="status-image" />
+ </a>
+ {{else if eq .Type "audio"}}
+ <audio class="status-audio" controls preload="none">
+ <source src="{{.URL}}">
+ <p> Your browser doesn't support HTML5 audio </p>
+ </audio>
+ {{else if eq .Type "video"}}
+ <video class="status-video" controls preload="none">
+ <source src="{{.URL}}">
+ <p> Your browser doesn't support HTML5 video </p>
+ </video>
+ {{else}}
+ <a href="{{.URL}}" target="_blank"> attachment </a>
+ {{end}}
+ {{end}}
+ </div>
<div class="status-action">
<a class="status-you" href="/thread/{{.ID}}?reply=true" title="reply">
<span class="icon dripicons-reply"></span>