when omit images, include a link
This commit is contained in:
parent
9f60cb8058
commit
21baa9eaaa
|
@ -2,6 +2,8 @@ changelog
|
|||
|
||||
=== next
|
||||
|
||||
+ Much better omit images handling.
|
||||
|
||||
+ Fix update activity.
|
||||
|
||||
+ A few API refinements and additions.
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
{{ $bonkcsrf := .BonkCSRF }}
|
||||
{{ $IsPreview := .IsPreview }}
|
||||
{{ $maplink := .MapLink }}
|
||||
{{ $omitimages := .OmitImages }}
|
||||
{{ with .Honk }}
|
||||
<header>
|
||||
{{ if $bonkcsrf }}
|
||||
|
@ -70,8 +71,12 @@ in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
|
|||
{{ else if eq .Media "application/pdf" }}
|
||||
<p><a href="/d/{{ .XID }}">Attachment: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }}
|
||||
{{ else }}
|
||||
{{ if $omitimages }}
|
||||
<p><a href="/d/{{ .XID }}">Image: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }}
|
||||
{{ else }}
|
||||
<p><img src="/d/{{ .XID }}" title="{{ .Desc }}" alt="{{ .Desc }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ if .XID }}
|
||||
<p><a href="{{ .URL }}" rel=noreferrer>External Attachment: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }}
|
||||
|
|
|
@ -35,8 +35,9 @@ servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
|
|||
{{ $IsPreview := .IsPreview }}
|
||||
{{ $MapLink := .MapLink }}
|
||||
{{ $Badonk := .User.Options.Reaction }}
|
||||
{{ $OmitImages := .User.Options.OmitImages }}
|
||||
{{ range .Honks }}
|
||||
{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk }}
|
||||
{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue