From 1d247493e05cdc659e46cd3d8a01d5da1e893867 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 18 Jun 2024 16:46:22 +0200 Subject: switch to templ for rendering HTML templates --- internal/builder/list.templ | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 internal/builder/list.templ (limited to 'internal/builder/list.templ') diff --git a/internal/builder/list.templ b/internal/builder/list.templ new file mode 100644 index 0000000..48563ed --- /dev/null +++ b/internal/builder/list.templ @@ -0,0 +1,48 @@ +package builder + +import "website/internal/config" + +templ tagPage(config config.Config, tag string, posts []Post, path string) { + @page(config, PageSettings{ + Title: tag, + Path: path, + TitleAttrs: templ.Attributes{ + "class": "p-author h-card", + "rel": "author", + }, + }) { +
+

#{ tag }

+ + Remove filter + +
+ @list(posts) + } +} + +templ listPage(config config.Config, posts []Post, path string) { + @page(config, PageSettings{ + Title: config.Title, + TitleAttrs: templ.Attributes{ + "class": "p-author h-card", + "rel": "author", + }, + Path: path, + }) { + @list(posts) + } +} + +templ list(posts []Post) { + +} -- cgit 1.4.1