From a01e52b4d4e600e1d88cb254557a2c49ee6996c2 Mon Sep 17 00:00:00 2001 From: Chris Sexton <3216719+chrissexton@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:09:25 -0500 Subject: [PATCH] meme: use foundation --- plugins/meme/index.html | 213 ------------------------------------ plugins/meme/meme.templ | 50 +++++---- plugins/meme/meme_templ.go | 54 ++++----- plugins/meme/webHandlers.go | 4 - 4 files changed, 55 insertions(+), 266 deletions(-) delete mode 100644 plugins/meme/index.html diff --git a/plugins/meme/index.html b/plugins/meme/index.html deleted file mode 100644 index b1af9a2..0000000 --- a/plugins/meme/index.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - Memes - - - -
- - Memes - - {{ item.name }} - - - - {{ err }} - - - - - - Name: - - - {{ editConfig.name }} - - - - - Image: - - - - - - - - URL: - - - - - - - - Config: - - - - - - - - Save -   - Delete -   - Cancel - - - - - - - - - - - - - - - - - Add Meme - - - - - - - - - - - - -
- - - - diff --git a/plugins/meme/meme.templ b/plugins/meme/meme.templ index 3d6c4dc..f8a4d59 100644 --- a/plugins/meme/meme.templ +++ b/plugins/meme/meme.templ @@ -1,21 +1,22 @@ package meme templ (p *MemePlugin) index(all webResps) { -
+
+

Meme

-
-
+
+
-
+
-
+
-
- @@ -31,23 +32,25 @@ templ (p *MemePlugin) index(all webResps) { } templ (p *MemePlugin) Show(meme webResp) { -
-
- { meme.Name } +
+
{ +

{ meme.Name }

-
+
                 { meme.Config }
             
-
-
@@ -55,27 +58,30 @@ templ (p *MemePlugin) Show(meme webResp) { templ (p *MemePlugin) Edit(meme webResp) { -
-
+
+
{
-
-
-
- -
diff --git a/plugins/meme/meme_templ.go b/plugins/meme/meme_templ.go index 1b2aa45..842dd8f 100644 --- a/plugins/meme/meme_templ.go +++ b/plugins/meme/meme_templ.go @@ -23,7 +23,7 @@ func (p *MemePlugin) index(all webResps) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Meme

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -57,7 +57,7 @@ func (p *MemePlugin) Show(meme webResp) templ.Component { templ_7745c5c3_Var2 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var3 string - templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(meme.Name) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `plugins/meme/meme.templ`, Line: 35, Col: 23} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" \"")
\"")
")
+		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(meme.Name) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `plugins/meme/meme.templ`, Line: 41, Col: 26} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

")
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
 		var templ_7745c5c3_Var4 string
 		templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(meme.Config)
 		if templ_7745c5c3_Err != nil {
-			return templ.Error{Err: templ_7745c5c3_Err, FileName: `plugins/meme/meme.templ`, Line: 43, Col: 29}
+			return templ.Error{Err: templ_7745c5c3_Err, FileName: `plugins/meme/meme.templ`, Line: 45, Col: 29}
 		}
 		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
-		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-swap=\"outerHTML\">Edit
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -147,7 +147,7 @@ func (p *MemePlugin) Edit(meme webResp) templ.Component { templ_7745c5c3_Var5 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"")
\"")