display reply id where present

This commit is contained in:
Ted Unangst 2019-04-16 17:11:04 -04:00
parent 5b5830e28b
commit 7d8bea7be8
2 changed files with 13 additions and 1 deletions

3
fun.go
View File

@ -38,6 +38,9 @@ func reverbolate(honks []*Honk) {
} else {
h.URL = h.XID
}
if h.RID != "" && strings.IndexByte(h.RID, '/') == -1 {
h.RID = h.Honker + "/h/" + h.RID
}
} else {
idx := strings.LastIndexByte(h.Honker, '/')
if idx != -1 {

View File

@ -1,6 +1,15 @@
<div class="honk {{ .Honk.What }}">
{{ with .Honk }}
<div class="title"><img alt="avatar" src="/a?a={{ .Honker}}"><p><a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a> <span class="clip">{{ .What }} {{ .Date.Format "02 Jan 2006 15:04" }} <a href="{{ .URL }}" rel=noreferrer>{{ .URL }}</a></span></div>
<div class="title">
<img alt="avatar" src="/a?a={{ .Honker}}">
<p><a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a> <span class="clip">{{ .What }} {{ .Date.Format "02 Jan 2006 15:04" }} <a href="{{ .URL }}" rel=noreferrer>{{ .URL }}</a></span>
{{ if .RID }}
<br>
<span style="margin-left: 4em;" class="clip">
in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
</span>
{{ end }}
</div>
<div class="noise">
<p>{{ .HTML }}
{{ range .Donks }}