From 7c7f3bd131326101d237ec00559ae943c40f50c5 Mon Sep 17 00:00:00 2001 From: Caleb Gardner Date: Thu, 14 Nov 2024 11:25:44 -0600 Subject: [PATCH] Finished?? Editor --- editor.go | 183 ++++++++++++++++++++++++++++++++++-------- internal/blog/blog.go | 28 +++++++ main.go | 6 ++ 3 files changed, 183 insertions(+), 34 deletions(-) diff --git a/editor.go b/editor.go index 8c49bc6..171866b 100644 --- a/editor.go +++ b/editor.go @@ -10,11 +10,10 @@ import ( "github.com/CalebQ42/darkstorm-server/internal/backend" "github.com/CalebQ42/darkstorm-server/internal/blog" + "github.com/google/uuid" + "go.mongodb.org/mongo-driver/bson" ) -// //go:embed embed -// var editorFS embed.FS - const ( loginPage = `
@@ -32,29 +31,30 @@ const ( name='blog' hx-get='/editor/edit' hx-target='#editor'> - + - {{ range $blog := . }} - + {{ range $blog := .Blogs }} + {{end}}

-

Select a blog!

+
{{.Editor}}
` editorForm = ` - - + +

- + - +

- - + + +
{{.Result}}

- - +