openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 438965bffbf70bac037c0a2538170fd200900257
parent c140b4bf17e24fd730aa2c17f55e0f16988f9ea5
Author: Peter Kosyh <p.kosyh@gmail.com>
Date:   Sun, 31 Jan 2021 00:44:44 +0300

blog template

Diffstat:
Aii-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}}) &mdash; {{.To}}<br>{{.Date | fdate}}</span><br> + +<div class="text"> +<br> +{{$more := (print "... <a class='more' href='" $.PfxPath "/" .MsgId "#" .MsgId "'>[ Read it &gt;&gt; ]</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"}}