all repos — honk @ 410797dbf0813be6c919e4c9a887136ae5f0fc6f

my fork of honk

show a little more info for attachments
Ted Unangst tedu@tedunangst.com
Tue, 26 Nov 2019 02:37:12 -0500
commit

410797dbf0813be6c919e4c9a887136ae5f0fc6f

parent

1e9e2903ee1a7400e4a54586afc12a9e593ba215

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M views/honk.htmlviews/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>