From 656595e47ea0ee52efe9d30f9967fd3ba81c7320 Mon Sep 17 00:00:00 2001 From: Dominic Ferrando Date: Sat, 19 Apr 2025 14:50:28 -0400 Subject: [PATCH] Organize threads into board --- web/views/board.templ | 24 ++++++++++++++++++++++++ web/views/threads.templ | 27 --------------------------- 2 files changed, 24 insertions(+), 27 deletions(-) delete mode 100644 web/views/threads.templ diff --git a/web/views/board.templ b/web/views/board.templ index 5c7c2ea..317a83a 100644 --- a/web/views/board.templ +++ b/web/views/board.templ @@ -3,6 +3,7 @@ package views import ( "fmt" "github.com/dominicf2001/comfychan/internal/database" + "github.com/dominicf2001/comfychan/internal/util" "github.com/dominicf2001/comfychan/web/views/shared" ) @@ -60,3 +61,26 @@ templ Board(board database.Board) {
} } + +type CatalogThreadPreview struct { + Subject string + Body string + ThreadURL string + MediaPath string +} + +templ ThreadsCatalog(previews []CatalogThreadPreview) { +
+ for _, preview := range previews { +
+ + + +

{ preview.Subject }

+

+ @templ.Raw(util.EnrichPost(preview.Body)) +

+
+ } +
+} diff --git a/web/views/threads.templ b/web/views/threads.templ deleted file mode 100644 index 2245f2c..0000000 --- a/web/views/threads.templ +++ /dev/null @@ -1,27 +0,0 @@ -package views - -import "fmt" -import "github.com/dominicf2001/comfychan/internal/util" - -type CatalogThreadPreview struct { - Subject string - Body string - ThreadURL string - MediaPath string -} - -templ ThreadsCatalog(previews []CatalogThreadPreview) { -
- for _, preview := range previews { -
- - - -

{ preview.Subject }

-

- @templ.Raw(util.EnrichPost(preview.Body)) -

-
- } -
-}