{ post.Title }
++ @postDate(post.Date) +
+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/404.templ | 13 ++ internal/builder/builder.go | 62 ++++------ internal/builder/homepage.templ | 54 ++++++++ internal/builder/list.templ | 48 ++++++++ internal/builder/page.templ | 84 +++++++++++++ internal/builder/post.templ | 50 ++++++++ internal/builder/tags.templ | 23 ++++ internal/builder/template.go | 265 ++-------------------------------------- 8 files changed, 310 insertions(+), 289 deletions(-) create mode 100644 internal/builder/404.templ create mode 100644 internal/builder/homepage.templ create mode 100644 internal/builder/list.templ create mode 100644 internal/builder/page.templ create mode 100644 internal/builder/post.templ create mode 100644 internal/builder/tags.templ (limited to 'internal') diff --git a/internal/builder/404.templ b/internal/builder/404.templ new file mode 100644 index 0000000..049e67d --- /dev/null +++ b/internal/builder/404.templ @@ -0,0 +1,13 @@ +package builder + +import "website/internal/config" + +templ notFound(config config.Config, path string) { + @page(config, PageSettings{ + Title: "Not Found", + Path: path, + }) { +
+ @postDate(post.Date) +
+