package web import "net/http" import "strings" import "time" import "github.com/invopop/ctxi18n/i18n" import "git.arav.su/Arav/dwelling-home/pkg/mindflow" import "git.arav.su/Arav/dwelling-home/pkg/util" templ Mindflow(posts []mindflow.Post, categories []mindflow.Category, r *http.Request) { @base(i18n.T(ctx, "base.section.mindflow"), i18n.T(ctx, "base.mindflow.description"), "updates, thoughts, opinions, blog, diary", "/mindflow", r, mindflowHead()) {

{ i18n.T(ctx, "mindflow.text") }

for _, post := range posts {

{ post.Category.Name }: { post.Title }

for _, line := range strings.Split(post.Body, "\n") {

0 && line[0] == '>' { class="quote" }>@templ.Raw(line)

}
if post.URL != "" { { post.PostURL(r.Host, false) } } else { } {{ ctz := util.ToClientTimezone(post.Date, r) }}
} if len(posts) == 0 {

{ i18n.T(ctx, "mindflow.no-posts") }

}
} } templ mindflowHead() { }