commit 7e6f0bc7cecd63eb77b01a3517df9833ede904e9 parent 2143cc393c70eb5babb0f20cd626b5fd9ebb98f6 Author: Peter Kosyh <p.kosyh@gmail.com> Date: Sat, 30 Jan 2021 21:45:07 +0000 Merge branch 'master' of https://github.com/gl00my/ii-go Diffstat:
| A | ii-node/tpl/blog.tpl | | | 29 | +++++++++++++++++++++++++++++ |
1 file changed, 29 insertions(+), 0 deletions(-)
diff --git a/ii-node/tpl/blog.tpl b/ii-node/tpl/blog.tpl @@ -0,0 +1,29 @@ +{{template "header.tpl" $}} +{{template "pager.tpl" $}} +<a class="rss" href="{{.PfxPath}}/echo+topics/{{.Echo}}/rss">RSS</a> +<div id="topic"> +{{range $k, $v := .Topics }} +{{ with .Head }} +<a name="{{.MsgId}}"></a> + +<div class="msg"> +{{ if has_avatar .From }} +<img class="avatar" src="/avatar/{{.From}}"> +{{ end }} +<a class="msgid" href="/blog/{{.MsgId}}#{{.MsgId}}">#</a><span class="subj"> <a href="/blog/{{. | repto}}#{{. | repto}}">{{with .Subj}}{{.}}{{else}}No subject{{end}}</a></span><br> +<span class="info"><a href="{{$.PfxPath}}/from/{{.From}}">{{.From}}</a>({{.Addr}}) — {{.To}}<br>{{.Date | fdate}}</span><br> + +<div class="text"> +<br> +{{$more := (print "... <a class='more' href='" $.PfxPath "/" .MsgId "#" .MsgId "'>[ Read it >> ]</a>")}} +{{msg_trunc . 280 $more}} +<br> +{{ end }} +<span class="reply"><a href="/blog/{{.Tail.MsgId}}#{{.Tail.MsgId}}">{{.Count}} Replies</a></span> +</div> +</div> +{{ end }} +</div> + +{{template "pager.tpl" $}} +{{template "footer.tpl"}}