From 34f9aa54e2d67a54496606591c8ca5fcfef597f6 Mon Sep 17 00:00:00 2001 From: Samuel W Date: Tue, 30 Jan 2024 21:38:24 +0100 Subject: init commit --- index.templ | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 index.templ (limited to 'index.templ') diff --git a/index.templ b/index.templ new file mode 100644 index 0000000..5da5272 --- /dev/null +++ b/index.templ @@ -0,0 +1,50 @@ +package main + +import "fmt" +import "time" +import "net/url" + +templ index(ps []Post) { + + + + + + + + + + + +
+ +
+ @posts(ps) +
+
+ + +} + +templ posts(posts []Post) { + for _, post := range posts { +
+ { +
+

{ post.Description }

+

{ post.CreatedAt.Format("2006-01-02 - 15:04") }

+
+
+ } + if len(posts) > 0 { +
+ } +} -- cgit v1.2.3