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 --- internal/builder/post.templ | 51 --------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 internal/builder/post.templ (limited to 'internal/builder/post.templ') diff --git a/internal/builder/post.templ b/internal/builder/post.templ deleted file mode 100644 index 6f12e5c..0000000 --- a/internal/builder/post.templ +++ /dev/null @@ -1,51 +0,0 @@ -package builder - -import ( - "time" - "website/internal/config" - "website/internal/content" -) - -func Unsafe(html string) templ.Component { - return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) { - _, err = io.WriteString(w, html) - return - }) -} - -templ postDate(d time.Time) { - -} - -templ postPage(config config.Config, post content.Post) { - @page(config, PageSettings{ - Title: post.Title, - TitleAttrs: templ.Attributes{ - "class": "p-author h-card", - "rel": "author", - }, - Path: post.URL, - }) { -
-

{ post.Title }

-

- @postDate(post.Date) -

-
- @Unsafe(post.Content) -
-
- Tags: - -
-
- } -} -- cgit 1.4.1