From a2feb8c63c80a1f52830f562af2deb2c6065eaae Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 24 Jun 2024 21:48:36 +0200 Subject: move templ templates into separate package --- templates/list.templ | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 templates/list.templ (limited to 'templates/list.templ') diff --git a/templates/list.templ b/templates/list.templ new file mode 100644 index 0000000..602c15c --- /dev/null +++ b/templates/list.templ @@ -0,0 +1,51 @@ +package templates + +import ( + "website/internal/config" + "website/internal/content" +) + +templ TagPage(config config.Config, tag string, posts []content.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 []content.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 []content.Post) { + +} -- cgit 1.4.1