Use attachment description as title

This commit is contained in:
r 2020-05-24 06:44:22 +00:00
parent f3367d920d
commit 0eaf8e8c87
1 changed files with 7 additions and 7 deletions

View File

@ -78,9 +78,9 @@
{{if eq .Type "image"}} {{if eq .Type "image"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank"> [image] </a> <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [image] </a>
{{else}} {{else}}
<a class="img-link" href="{{.URL}}" target="_blank"> <a class="img-link" href="{{.URL}}" target="_blank" title="{{.Description}}">
<img class="status-image" src="{{.URL}}" alt="status-image" /> <img class="status-image" src="{{.URL}}" alt="status-image" />
{{if (and $.Ctx.MaskNSFW $s.Sensitive)}} {{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
<div class="status-nsfw-overlay"></div> <div class="status-nsfw-overlay"></div>
@ -90,9 +90,9 @@
{{else if eq .Type "audio"}} {{else if eq .Type "audio"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank"> [audio] </a> <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [audio] </a>
{{else}} {{else}}
<audio class="status-audio" controls> <audio class="status-audio" controls title="{{.Description}}">
<source src="{{.URL}}"> <source src="{{.URL}}">
<a href="{{.URL}}" target="_blank"> [audio] </a> <a href="{{.URL}}" target="_blank"> [audio] </a>
</audio> </audio>
@ -100,9 +100,9 @@
{{else if eq .Type "video"}} {{else if eq .Type "video"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank"> [video] </a> <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [video] </a>
{{else}} {{else}}
<div class="status-video-container"> <div class="status-video-container" title="{{.Description}}">
<video class="status-video" controls> <video class="status-video" controls>
<source src="{{.URL}}"> <source src="{{.URL}}">
<a href="{{.URL}}" target="_blank"> [video] </a> <a href="{{.URL}}" target="_blank"> [video] </a>
@ -114,7 +114,7 @@
{{end}} {{end}}
{{else}} {{else}}
<a href="{{.URL}}" target="_blank"> [attachment] </a> <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [attachment] </a>
{{end}} {{end}}
{{end}} {{end}}