aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2021-01-16 18:03:47 +0000
committerr <r@freesoftwareextremist.com>2021-01-16 18:03:47 +0000
commit3f776ee8c88b7af93f54f9f0869ca13ffa14aeea (patch)
tree92de3f57484540c582d8ed6e4f80ec83c61806d6 /templates
parent17f02deff72cd79a61731923a5459fd289f811c6 (diff)
downloadbloat-3f776ee8c88b7af93f54f9f0869ca13ffa14aeea.tar.gz
bloat-3f776ee8c88b7af93f54f9f0869ca13ffa14aeea.zip
Show attachment file name instead of the type
Diffstat (limited to 'templates')
-rw-r--r--templates/status.tmpl16
1 files changed, 12 insertions, 4 deletions
diff --git a/templates/status.tmpl b/templates/status.tmpl
index e842a96..a46129f 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -91,7 +91,9 @@
{{if eq .Type "image"}}
{{if $.Ctx.HideAttachments}}
- <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [image] </a>
+ <a href="{{.URL}}" target="_blank">
+ {{if .Description}}[{{.Description}}]{{else}}[image]{{end}}
+ </a>
{{else}}
<a class="img-link" href="{{.URL}}" target="_blank" title="{{.Description}}">
<img class="status-image" src="{{.URL}}" alt="status-image" height="240" />
@@ -103,7 +105,9 @@
{{else if eq .Type "audio"}}
{{if $.Ctx.HideAttachments}}
- <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [audio] </a>
+ <a href="{{.URL}}" target="_blank">
+ {{if .Description}}[{{.Description}}]{{else}}[audio]{{end}}
+ </a>
{{else}}
<audio class="status-audio" controls title="{{.Description}}">
<source src="{{.URL}}">
@@ -113,7 +117,9 @@
{{else if eq .Type "video"}}
{{if $.Ctx.HideAttachments}}
- <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [video] </a>
+ <a href="{{.URL}}" target="_blank">
+ {{if .Description}}[{{.Description}}]{{else}}[video]{{end}}
+ </a>
{{else}}
<div class="status-video-container" title="{{.Description}}">
<video class="status-video" controls height="240">
@@ -127,7 +133,9 @@
{{end}}
{{else}}
- <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [attachment] </a>
+ <a href="{{.URL}}" target="_blank">
+ {{if .Description}}[{{.Description}}]{{else}}[attachment]{{end}}
+ </a>
{{end}}
{{end}}
</div>