lessmore/templates/components/post.html

38 lines
1002 B
HTML

{{ define "post" }}
<!--
Post component.
How to use:
{ template "post" .Posts[0] }
-->
<div
id="{{ .MsgID }}"
class="card container dynamic-post p-3 mb-3 rounded">
<div class="card-body p-3">
<h3 class="card-title">
<a class="dynamic-post-title" href="/thread/{{ .TopicID }}#{{ .MsgID }}">{{ .Subg }}</a>
</h3>
<div class="card-subtitle text-white-50">
<p>
[<a href="/echo/{{ .Echo }}/page/1"
title="Go to {{ .Echo }} echo">{{ .Echo }}</a>]
{{ .Date }}
@<a
title="{{ .Author }} posts"
href="/find?query=author:{{ .Author }}">{{ .Author }}</a> ->
{{ if .Repto }}<a href="/msg/{{.Repto}}">{{ .To }}</a>
{{ else }}{{ .To }}{{ end }}
</p>
</div>
<div class="card-text dynamic-post-text">
{{ .Message }}
</div>
</div>
<div class="card-footer text-white-50">
[<a href="/msg/{{ .MsgID }}">#</a>] [<a href="#{{ .MsgID }}">reply</a>]
</div>
</div>
{{ end }}