show a little more info for attachments
Ted Unangst tedu@tedunangst.com
Tue, 26 Nov 2019 02:37:12 -0500
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
views/honk.html
→
views/honk.html
@@ -66,15 +66,15 @@ {{ end }}
{{ range .Donks }} {{ if .Local }} {{ if eq .Media "text/plain" }} -<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a> {{ .Desc }} +<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} {{ else if eq .Media "application/pdf" }} -<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a> {{ .Desc }} +<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} {{ else }} <p><img src="/d/{{ .XID }}" title="{{ .Desc }}" alt="{{ .Desc }}"> {{ end }} {{ else }} {{ if .XID }} -<p><a href="{{ .URL }}" rel=noreferrer>External Attachment: {{ .Name }}</a> +<p><a href="{{ .URL }}" rel=noreferrer>External Attachment: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} {{ else }} {{ if eq .Media "video/mp4" }} <p><video controls src="{{ .URL }}">{{ .Name }}</video>