GoBlog/templates/mentions.gohtml

19 lines
652 B
Plaintext

{{ define "mentions" }}
{{ $rd := . }}
<ul>
{{ range $i, $mention := .Data }}
<li>
<a href="{{ $mention.Url }}" target="_blank" rel="nofollow noopener noreferrer ugc">
{{ if $mention.Author }}
{{ $mention.Author }}
{{ else }}
{{ $mention.Url }}
{{ end }}
</a>
{{ with $mention.Title }} <b>{{.}}</b>{{ end }}
{{ with $mention.Content }} <i>{{.}}</i>{{ end }}
{{ with $mention.Submentions }}{{ include "mentions" $rd . }}{{ end }}
</li>
{{ end }}
</ul>
{{ end }}