Use attachment description as title
authorr <r@freesoftwareextremist.com>
Sun, 24 May 2020 06:44:22 +0000 (06:44 +0000)
committerr <r@freesoftwareextremist.com>
Sun, 24 May 2020 06:44:22 +0000 (06:44 +0000)
templates/status.tmpl

index c817da2b8aca0402ea04037e51d9c7ffa83ed624..18e6d9a12a07d91c7bf389986056bb6a4caffe55 100644 (file)
@@ -78,9 +78,9 @@
 
                                {{if eq .Type "image"}}
                                {{if $.Ctx.HideAttachments}}
-                               <a href="{{.URL}}" target="_blank"> [image] </a>
+                               <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [image] </a>
                                {{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" />
                                        {{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
                                        <div class="status-nsfw-overlay"></div>
@@ -90,9 +90,9 @@
 
                                {{else if eq .Type "audio"}}
                                {{if $.Ctx.HideAttachments}}
-                               <a href="{{.URL}}" target="_blank"> [audio] </a>
+                               <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [audio] </a>
                                {{else}}
-                               <audio class="status-audio" controls>
+                               <audio class="status-audio" controls title="{{.Description}}">
                                        <source src="{{.URL}}">
                                        <a href="{{.URL}}" target="_blank"> [audio] </a>
                                </audio>
 
                                {{else if eq .Type "video"}}
                                {{if $.Ctx.HideAttachments}}
-                               <a href="{{.URL}}" target="_blank"> [video] </a>
+                               <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [video] </a>
                                {{else}}
-                               <div class="status-video-container">
+                               <div class="status-video-container" title="{{.Description}}">
                                        <video class="status-video" controls>
                                                <source src="{{.URL}}">
                                                <a href="{{.URL}}" target="_blank"> [video] </a>
                                {{end}}
 
                                {{else}}
-                               <a href="{{.URL}}" target="_blank"> [attachment] </a>
+                               <a href="{{.URL}}" target="_blank" title="{{.Description}}"> [attachment] </a>
                                {{end}}
 
                                {{end}}