1
mirror of https://github.com/jlelse/GoBlog synced 2024-06-02 04:54:28 +00:00
GoBlog/templates/mentions.gohtml
2021-11-19 22:17:15 +01:00

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 }}