Add timeline include template

This commit is contained in:
Alessio 2023-08-17 14:22:40 -03:00
parent c717153fa1
commit d13956fe83

View File

@ -0,0 +1,13 @@
{{define "timeline"}}
{{range .Items}}
{{template "tweet" .}}
{{end}}
{{if .CursorBottom.CursorPosition.IsEnd}}
<p>End of feed</p>
{{else}}
<button class="show-more"
hx-get="?cursor={{.CursorBottom.CursorValue}}"
hx-swap="outerHTML"
>Show more</button>
{{end}}
{{end}}