cleanup unused code and add not implemented handler so links don't 404
This commit is contained in:
		
							parent
							
								
									672dca5bb9
								
							
						
					
					
						commit
						365e727284
					
				@ -13,3 +13,7 @@ func (app *application) home(w http.ResponseWriter, r *http.Request) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	views.Home("Home", app.newCommonData(r)).Render(r.Context(), w)
 | 
						views.Home("Home", app.newCommonData(r)).Render(r.Context(), w)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (app *application) notImplemented(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
 | 
						views.ComingSoon("Coming Soon", app.newCommonData(r)).Render(r.Context(), w)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -11,17 +11,6 @@ import (
 | 
				
			|||||||
	"git.32bit.cafe/32bitcafe/guestbook/ui/views"
 | 
						"git.32bit.cafe/32bitcafe/guestbook/ui/views"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (app *application) getGuestbookList(w http.ResponseWriter, r *http.Request) {
 | 
					 | 
				
			||||||
	userId := app.sessionManager.GetInt64(r.Context(), "authenticatedUserId")
 | 
					 | 
				
			||||||
	guestbooks, err := app.guestbooks.GetAll(userId)
 | 
					 | 
				
			||||||
	if err != nil {
 | 
					 | 
				
			||||||
		app.serverError(w, r, err)
 | 
					 | 
				
			||||||
		return
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	data := app.newCommonData(r)
 | 
					 | 
				
			||||||
	views.GuestbookList("Guestbooks", data, guestbooks).Render(r.Context(), w)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (app *application) getGuestbook(w http.ResponseWriter, r *http.Request) {
 | 
					func (app *application) getGuestbook(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
	slug := r.PathValue("id")
 | 
						slug := r.PathValue("id")
 | 
				
			||||||
	website, err := app.websites.Get(slugToShortId(slug))
 | 
						website, err := app.websites.Get(slugToShortId(slug))
 | 
				
			||||||
@ -128,15 +117,6 @@ func (app *application) postGuestbookCommentCreate(w http.ResponseWriter, r *htt
 | 
				
			|||||||
	http.Redirect(w, r, fmt.Sprintf("/websites/%s/guestbook", slug), http.StatusSeeOther)
 | 
						http.Redirect(w, r, fmt.Sprintf("/websites/%s/guestbook", slug), http.StatusSeeOther)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (app *application) updateGuestbookComment(w http.ResponseWriter, r *http.Request) {
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (app *application) deleteGuestbookComment(w http.ResponseWriter, r *http.Request) {
 | 
					 | 
				
			||||||
	// slug := r.PathValue("id")
 | 
					 | 
				
			||||||
	// shortId := slugToShortId(slug)
 | 
					 | 
				
			||||||
	// app.guestbookComments.Delete(shortId)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (app *application) getCommentQueue(w http.ResponseWriter, r *http.Request) {
 | 
					func (app *application) getCommentQueue(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
	slug := r.PathValue("id")
 | 
						slug := r.PathValue("id")
 | 
				
			||||||
	website, err := app.websites.Get(slugToShortId(slug))
 | 
						website, err := app.websites.Get(slugToShortId(slug))
 | 
				
			||||||
 | 
				
			|||||||
@ -90,3 +90,21 @@ func (app *application) getWebsiteList(w http.ResponseWriter, r *http.Request) {
 | 
				
			|||||||
	data := app.newCommonData(r)
 | 
						data := app.newCommonData(r)
 | 
				
			||||||
	views.WebsiteList("My Websites", data, websites).Render(r.Context(), w)
 | 
						views.WebsiteList("My Websites", data, websites).Render(r.Context(), w)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (app *application) getComingSoon(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
 | 
						slug := r.PathValue("id")
 | 
				
			||||||
 | 
						user := app.getCurrentUser(r)
 | 
				
			||||||
 | 
						website, err := app.websites.Get(slugToShortId(slug))
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							if errors.Is(err, models.ErrNoRecord) {
 | 
				
			||||||
 | 
								http.NotFound(w, r)
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								app.serverError(w, r, err)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if website.UserId != user.ID {
 | 
				
			||||||
 | 
							app.clientError(w, http.StatusForbidden)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						views.WebsiteDashboardComingSoon("Coming Soon", app.newCommonData(r), website).Render(r.Context(), w)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -21,18 +21,26 @@ func (app *application) routes() http.Handler {
 | 
				
			|||||||
	mux.Handle("POST /users/register", dynamic.ThenFunc(app.postUserRegister))
 | 
						mux.Handle("POST /users/register", dynamic.ThenFunc(app.postUserRegister))
 | 
				
			||||||
	mux.Handle("GET /users/login", dynamic.ThenFunc(app.getUserLogin))
 | 
						mux.Handle("GET /users/login", dynamic.ThenFunc(app.getUserLogin))
 | 
				
			||||||
	mux.Handle("POST /users/login", dynamic.ThenFunc(app.postUserLogin))
 | 
						mux.Handle("POST /users/login", dynamic.ThenFunc(app.postUserLogin))
 | 
				
			||||||
 | 
						mux.Handle("GET /help", dynamic.ThenFunc(app.notImplemented))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	protected := dynamic.Append(app.requireAuthentication)
 | 
						protected := dynamic.Append(app.requireAuthentication)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// mux.Handle("GET /users", protected.ThenFunc(app.getUsersList))
 | 
						// mux.Handle("GET /users", protected.ThenFunc(app.getUsersList))
 | 
				
			||||||
	mux.Handle("GET /users/{id}", protected.ThenFunc(app.getUser))
 | 
						mux.Handle("GET /users/{id}", protected.ThenFunc(app.getUser))
 | 
				
			||||||
	mux.Handle("POST /users/logout", protected.ThenFunc(app.postUserLogout))
 | 
						mux.Handle("POST /users/logout", protected.ThenFunc(app.postUserLogout))
 | 
				
			||||||
 | 
						mux.Handle("GET /users/settings", protected.ThenFunc(app.notImplemented))
 | 
				
			||||||
 | 
						mux.Handle("GET /users/privacy", protected.ThenFunc(app.notImplemented))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mux.Handle("GET /websites", protected.ThenFunc(app.getWebsiteList))
 | 
						mux.Handle("GET /websites", protected.ThenFunc(app.getWebsiteList))
 | 
				
			||||||
	mux.Handle("GET /websites/create", protected.ThenFunc(app.getWebsiteCreate))
 | 
						mux.Handle("GET /websites/create", protected.ThenFunc(app.getWebsiteCreate))
 | 
				
			||||||
	mux.Handle("POST /websites/create", protected.ThenFunc(app.postWebsiteCreate))
 | 
						mux.Handle("POST /websites/create", protected.ThenFunc(app.postWebsiteCreate))
 | 
				
			||||||
	mux.Handle("GET /websites/{id}/dashboard", protected.ThenFunc(app.getWebsiteDashboard))
 | 
						mux.Handle("GET /websites/{id}/dashboard", protected.ThenFunc(app.getWebsiteDashboard))
 | 
				
			||||||
	mux.Handle("GET /websites/{id}/dashboard/guestbook/comments", protected.ThenFunc(app.getGuestbookComments))
 | 
						mux.Handle("GET /websites/{id}/dashboard/guestbook/comments", protected.ThenFunc(app.getGuestbookComments))
 | 
				
			||||||
	mux.Handle("GET /websites/{id}/dashboard/guestbook/comments/queue", protected.ThenFunc(app.getCommentQueue))
 | 
						mux.Handle("GET /websites/{id}/dashboard/guestbook/comments/queue", protected.ThenFunc(app.getCommentQueue))
 | 
				
			||||||
 | 
						mux.Handle("GET /websites/{id}/dashboard/guestbook/blocklist", protected.ThenFunc(app.getComingSoon))
 | 
				
			||||||
 | 
						mux.Handle("GET /websites/{id}/dashboard/guestbook/comments/trash", protected.ThenFunc(app.getComingSoon))
 | 
				
			||||||
 | 
						mux.Handle("GET /websites/{id}/dashboard/guestbook/themes", protected.ThenFunc(app.getComingSoon))
 | 
				
			||||||
 | 
						mux.Handle("GET /websites/{id}/dashboard/guestbook/customize", protected.ThenFunc(app.getComingSoon))
 | 
				
			||||||
	mux.Handle("GET /websites/{id}/guestbook/comments/create", protected.ThenFunc(app.getGuestbookCommentCreate))
 | 
						mux.Handle("GET /websites/{id}/guestbook/comments/create", protected.ThenFunc(app.getGuestbookCommentCreate))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return standard.Then(mux)
 | 
						return standard.Then(mux)
 | 
				
			||||||
 | 
				
			|||||||
@ -15,48 +15,6 @@ templ gbCreateForm(csrf_token string) {
 | 
				
			|||||||
    <button type="submit">Submit</button>
 | 
					    <button type="submit">Submit</button>
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
templ gbList(guestbooks []models.Guestbook) {
 | 
					 | 
				
			||||||
    if len(guestbooks) == 0 {
 | 
					 | 
				
			||||||
        <p>No Guestbooks yet</p>
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
        <ul id="guestbooks" hx-get="/guestbooks" hx-trigger="newGuestbook from:body" hx-swap="outerHTML">
 | 
					 | 
				
			||||||
            for _, gb := range guestbooks {
 | 
					 | 
				
			||||||
                <li><a href={ templ.URL(gbUrl(gb) + "/dashboard") }>
 | 
					 | 
				
			||||||
                </a></li>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        </ul>
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
templ GuestbookList(title string, data CommonData, guestbooks []models.Guestbook) {
 | 
					 | 
				
			||||||
    if data.IsHtmx {
 | 
					 | 
				
			||||||
        @gbList(guestbooks)
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
        @base(title, data) {
 | 
					 | 
				
			||||||
            <h1>My Guestbooks</h1>
 | 
					 | 
				
			||||||
            <div>
 | 
					 | 
				
			||||||
                <button hx-get="/guestbooks/create" hx-target="closest div">New Guestbook</button>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
            @gbList(guestbooks)
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
templ GuestbookCreate(title string, data CommonData) {
 | 
					 | 
				
			||||||
    if data.IsHtmx {
 | 
					 | 
				
			||||||
        <form hx-post="/guestbooks/create" hx-target="closest div">
 | 
					 | 
				
			||||||
            @gbCreateForm(data.CSRFToken)
 | 
					 | 
				
			||||||
        </form>
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
        @base(title, data) {
 | 
					 | 
				
			||||||
            <form action="/guestbooks/create" method="post">
 | 
					 | 
				
			||||||
                @gbCreateForm(data.CSRFToken)
 | 
					 | 
				
			||||||
            </form>
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
templ GuestbookDashboardCommentsView(title string, data CommonData, website models.Website, guestbook models.Guestbook, comments []models.GuestbookComment) {
 | 
					templ GuestbookDashboardCommentsView(title string, data CommonData, website models.Website, guestbook models.Guestbook, comments []models.GuestbookComment) {
 | 
				
			||||||
    @base(title, data) {
 | 
					    @base(title, data) {
 | 
				
			||||||
        <div id="dashboard">
 | 
					        <div id="dashboard">
 | 
				
			||||||
 | 
				
			|||||||
@ -58,7 +58,7 @@ func gbCreateForm(csrf_token string) templ.Component {
 | 
				
			|||||||
	})
 | 
						})
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func gbList(guestbooks []models.Guestbook) templ.Component {
 | 
					func GuestbookDashboardCommentsView(title string, data CommonData, website models.Website, guestbook models.Guestbook, comments []models.GuestbookComment) templ.Component {
 | 
				
			||||||
	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
						return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
				
			||||||
		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
							templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
				
			||||||
		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
							if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
				
			||||||
@ -79,68 +79,7 @@ func gbList(guestbooks []models.Guestbook) templ.Component {
 | 
				
			|||||||
			templ_7745c5c3_Var3 = templ.NopComponent
 | 
								templ_7745c5c3_Var3 = templ.NopComponent
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
							ctx = templ.ClearChildren(ctx)
 | 
				
			||||||
		if len(guestbooks) == 0 {
 | 
							templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<p>No Guestbooks yet</p>")
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<ul id=\"guestbooks\" hx-get=\"/guestbooks\" hx-trigger=\"newGuestbook from:body\" hx-swap=\"outerHTML\">")
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			for _, gb := range guestbooks {
 | 
					 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<li><a href=\"")
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				var templ_7745c5c3_Var4 templ.SafeURL = templ.URL(gbUrl(gb) + "/dashboard")
 | 
					 | 
				
			||||||
				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var4)))
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\"></a></li>")
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</ul>")
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		return nil
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func GuestbookList(title string, data CommonData, guestbooks []models.Guestbook) templ.Component {
 | 
					 | 
				
			||||||
	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
					 | 
				
			||||||
		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
					 | 
				
			||||||
		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
					 | 
				
			||||||
			return templ_7745c5c3_CtxErr
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
					 | 
				
			||||||
		if !templ_7745c5c3_IsBuffer {
 | 
					 | 
				
			||||||
			defer func() {
 | 
					 | 
				
			||||||
				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err == nil {
 | 
					 | 
				
			||||||
					templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}()
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		ctx = templ.InitializeContext(ctx)
 | 
					 | 
				
			||||||
		templ_7745c5c3_Var5 := templ.GetChildren(ctx)
 | 
					 | 
				
			||||||
		if templ_7745c5c3_Var5 == nil {
 | 
					 | 
				
			||||||
			templ_7745c5c3_Var5 = templ.NopComponent
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
					 | 
				
			||||||
		if data.IsHtmx {
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = gbList(guestbooks).Render(ctx, templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			templ_7745c5c3_Var6 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
					 | 
				
			||||||
			templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
								templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
				
			||||||
			templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
								templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
				
			||||||
			if !templ_7745c5c3_IsBuffer {
 | 
								if !templ_7745c5c3_IsBuffer {
 | 
				
			||||||
@ -152,129 +91,7 @@ func GuestbookList(title string, data CommonData, guestbooks []models.Guestbook)
 | 
				
			|||||||
				}()
 | 
									}()
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			ctx = templ.InitializeContext(ctx)
 | 
								ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<h1>My Guestbooks</h1><div><button hx-get=\"/guestbooks/create\" hx-target=\"closest div\">New Guestbook</button></div>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<div id=\"dashboard\">")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				templ_7745c5c3_Err = gbList(guestbooks).Render(ctx, templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				return nil
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = base(title, data).Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		return nil
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func GuestbookCreate(title string, data CommonData) templ.Component {
 | 
					 | 
				
			||||||
	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
					 | 
				
			||||||
		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
					 | 
				
			||||||
		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
					 | 
				
			||||||
			return templ_7745c5c3_CtxErr
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
					 | 
				
			||||||
		if !templ_7745c5c3_IsBuffer {
 | 
					 | 
				
			||||||
			defer func() {
 | 
					 | 
				
			||||||
				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err == nil {
 | 
					 | 
				
			||||||
					templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}()
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		ctx = templ.InitializeContext(ctx)
 | 
					 | 
				
			||||||
		templ_7745c5c3_Var7 := templ.GetChildren(ctx)
 | 
					 | 
				
			||||||
		if templ_7745c5c3_Var7 == nil {
 | 
					 | 
				
			||||||
			templ_7745c5c3_Var7 = templ.NopComponent
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
					 | 
				
			||||||
		if data.IsHtmx {
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<form hx-post=\"/guestbooks/create\" hx-target=\"closest div\">")
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = gbCreateForm(data.CSRFToken).Render(ctx, templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</form>")
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			templ_7745c5c3_Var8 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
					 | 
				
			||||||
				templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
					 | 
				
			||||||
				templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
					 | 
				
			||||||
				if !templ_7745c5c3_IsBuffer {
 | 
					 | 
				
			||||||
					defer func() {
 | 
					 | 
				
			||||||
						templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
						if templ_7745c5c3_Err == nil {
 | 
					 | 
				
			||||||
							templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
					}()
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				ctx = templ.InitializeContext(ctx)
 | 
					 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<form action=\"/guestbooks/create\" method=\"post\">")
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				templ_7745c5c3_Err = gbCreateForm(data.CSRFToken).Render(ctx, templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</form>")
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				return nil
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = base(title, data).Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
					 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		return nil
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func GuestbookDashboardCommentsView(title string, data CommonData, website models.Website, guestbook models.Guestbook, comments []models.GuestbookComment) templ.Component {
 | 
					 | 
				
			||||||
	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
					 | 
				
			||||||
		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
					 | 
				
			||||||
		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
					 | 
				
			||||||
			return templ_7745c5c3_CtxErr
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
					 | 
				
			||||||
		if !templ_7745c5c3_IsBuffer {
 | 
					 | 
				
			||||||
			defer func() {
 | 
					 | 
				
			||||||
				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
				if templ_7745c5c3_Err == nil {
 | 
					 | 
				
			||||||
					templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}()
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		ctx = templ.InitializeContext(ctx)
 | 
					 | 
				
			||||||
		templ_7745c5c3_Var9 := templ.GetChildren(ctx)
 | 
					 | 
				
			||||||
		if templ_7745c5c3_Var9 == nil {
 | 
					 | 
				
			||||||
			templ_7745c5c3_Var9 = templ.NopComponent
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
					 | 
				
			||||||
		templ_7745c5c3_Var10 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
					 | 
				
			||||||
			templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
					 | 
				
			||||||
			templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
					 | 
				
			||||||
			if !templ_7745c5c3_IsBuffer {
 | 
					 | 
				
			||||||
				defer func() {
 | 
					 | 
				
			||||||
					templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
					 | 
				
			||||||
					if templ_7745c5c3_Err == nil {
 | 
					 | 
				
			||||||
						templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
				}()
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			ctx = templ.InitializeContext(ctx)
 | 
					 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<div id=\"dashboard\">")
 | 
					 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -282,81 +99,81 @@ func GuestbookDashboardCommentsView(title string, data CommonData, website model
 | 
				
			|||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<div><h1>Comments on ")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<div><h1>Comments on ")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var11 string
 | 
								var templ_7745c5c3_Var5 string
 | 
				
			||||||
			templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(website.SiteUrl)
 | 
								templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(website.SiteUrl)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 65, Col: 49}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 23, Col: 49}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</h1>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</h1>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if len(comments) == 0 {
 | 
								if len(comments) == 0 {
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<p>No comments yet!</p>")
 | 
									templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<p>No comments yet!</p>")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			for _, c := range comments {
 | 
								for _, c := range comments {
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<div><strong>")
 | 
									templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<div><strong>")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				var templ_7745c5c3_Var12 string
 | 
									var templ_7745c5c3_Var6 string
 | 
				
			||||||
				templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(c.AuthorName)
 | 
									templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(c.AuthorName)
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 71, Col: 46}
 | 
										return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 29, Col: 46}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
 | 
									_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</strong> ")
 | 
									templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</strong> ")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				var templ_7745c5c3_Var13 string
 | 
									var templ_7745c5c3_Var7 string
 | 
				
			||||||
				templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(c.Created.Format("01-02-2006 03:04PM"))
 | 
									templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(c.Created.Format("01-02-2006 03:04PM"))
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 72, Col: 64}
 | 
										return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 30, Col: 64}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
 | 
									_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<p>")
 | 
									templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<p>")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				var templ_7745c5c3_Var14 string
 | 
									var templ_7745c5c3_Var8 string
 | 
				
			||||||
				templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(c.CommentText)
 | 
									templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(c.CommentText)
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 74, Col: 43}
 | 
										return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 32, Col: 43}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
 | 
									_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</p></div>")
 | 
									templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</p></div>")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</div></div>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</div></div>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			return nil
 | 
								return nil
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		templ_7745c5c3_Err = base(title, data).Render(templ.WithChildren(ctx, templ_7745c5c3_Var10), templ_7745c5c3_Buffer)
 | 
							templ_7745c5c3_Err = base(title, data).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
 | 
				
			||||||
		if templ_7745c5c3_Err != nil {
 | 
							if templ_7745c5c3_Err != nil {
 | 
				
			||||||
			return templ_7745c5c3_Err
 | 
								return templ_7745c5c3_Err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@ -380,108 +197,108 @@ func commentForm(form forms.CommentCreateForm) templ.Component {
 | 
				
			|||||||
			}()
 | 
								}()
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.InitializeContext(ctx)
 | 
							ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
		templ_7745c5c3_Var15 := templ.GetChildren(ctx)
 | 
							templ_7745c5c3_Var9 := templ.GetChildren(ctx)
 | 
				
			||||||
		if templ_7745c5c3_Var15 == nil {
 | 
							if templ_7745c5c3_Var9 == nil {
 | 
				
			||||||
			templ_7745c5c3_Var15 = templ.NopComponent
 | 
								templ_7745c5c3_Var9 = templ.NopComponent
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
							ctx = templ.ClearChildren(ctx)
 | 
				
			||||||
		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<div><label for=\"authorname\">Name: </label>")
 | 
							templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "<div><label for=\"authorname\">Name: </label>")
 | 
				
			||||||
		if templ_7745c5c3_Err != nil {
 | 
							if templ_7745c5c3_Err != nil {
 | 
				
			||||||
			return templ_7745c5c3_Err
 | 
								return templ_7745c5c3_Err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		error, exists := form.FieldErrors["authorName"]
 | 
							error, exists := form.FieldErrors["authorName"]
 | 
				
			||||||
		if exists {
 | 
							if exists {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<label class=\"error\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<label class=\"error\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var16 string
 | 
								var templ_7745c5c3_Var10 string
 | 
				
			||||||
			templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(error)
 | 
								templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(error)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 88, Col: 36}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 46, Col: 36}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</label> ")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</label> ")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<input type=\"text\" name=\"authorname\" id=\"authorname\"></div><div><label for=\"authoremail\">Email: </label>")
 | 
							templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<input type=\"text\" name=\"authorname\" id=\"authorname\"></div><div><label for=\"authoremail\">Email: </label>")
 | 
				
			||||||
		if templ_7745c5c3_Err != nil {
 | 
							if templ_7745c5c3_Err != nil {
 | 
				
			||||||
			return templ_7745c5c3_Err
 | 
								return templ_7745c5c3_Err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		error, exists = form.FieldErrors["authorEmail"]
 | 
							error, exists = form.FieldErrors["authorEmail"]
 | 
				
			||||||
		if exists {
 | 
							if exists {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<label class=\"error\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<label class=\"error\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var17 string
 | 
								var templ_7745c5c3_Var11 string
 | 
				
			||||||
			templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(error)
 | 
								templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(error)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 96, Col: 36}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 54, Col: 36}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</label> ")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</label> ")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<input type=\"text\" name=\"authoremail\" id=\"authoremail\"></div><div><label for=\"authorsite\">Site Url: </label>")
 | 
							templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<input type=\"text\" name=\"authoremail\" id=\"authoremail\"></div><div><label for=\"authorsite\">Site Url: </label>")
 | 
				
			||||||
		if templ_7745c5c3_Err != nil {
 | 
							if templ_7745c5c3_Err != nil {
 | 
				
			||||||
			return templ_7745c5c3_Err
 | 
								return templ_7745c5c3_Err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		error, exists = form.FieldErrors["authorSite"]
 | 
							error, exists = form.FieldErrors["authorSite"]
 | 
				
			||||||
		if exists {
 | 
							if exists {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<label class=\"error\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<label class=\"error\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var18 string
 | 
								var templ_7745c5c3_Var12 string
 | 
				
			||||||
			templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(error)
 | 
								templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(error)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 104, Col: 36}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 62, Col: 36}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</label> ")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</label> ")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<input type=\"text\" name=\"authorsite\" id=\"authorsite\"></div><div><label for=\"content\">Comment: </label>")
 | 
							templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<input type=\"text\" name=\"authorsite\" id=\"authorsite\"></div><div><label for=\"content\">Comment: </label>")
 | 
				
			||||||
		if templ_7745c5c3_Err != nil {
 | 
							if templ_7745c5c3_Err != nil {
 | 
				
			||||||
			return templ_7745c5c3_Err
 | 
								return templ_7745c5c3_Err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		error, exists = form.FieldErrors["content"]
 | 
							error, exists = form.FieldErrors["content"]
 | 
				
			||||||
		if exists {
 | 
							if exists {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "<label class=\"error\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<label class=\"error\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var19 string
 | 
								var templ_7745c5c3_Var13 string
 | 
				
			||||||
			templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(error)
 | 
								templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(error)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 112, Col: 36}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 70, Col: 36}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</label> ")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</label> ")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<textarea name=\"content\" id=\"content\"></textarea></div><div><input type=\"submit\" value=\"Submit\"></div>")
 | 
							templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<textarea name=\"content\" id=\"content\"></textarea></div><div><input type=\"submit\" value=\"Submit\"></div>")
 | 
				
			||||||
		if templ_7745c5c3_Err != nil {
 | 
							if templ_7745c5c3_Err != nil {
 | 
				
			||||||
			return templ_7745c5c3_Err
 | 
								return templ_7745c5c3_Err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@ -505,58 +322,58 @@ func GuestbookCommentList(comments []models.GuestbookComment) templ.Component {
 | 
				
			|||||||
			}()
 | 
								}()
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.InitializeContext(ctx)
 | 
							ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
		templ_7745c5c3_Var20 := templ.GetChildren(ctx)
 | 
							templ_7745c5c3_Var14 := templ.GetChildren(ctx)
 | 
				
			||||||
		if templ_7745c5c3_Var20 == nil {
 | 
							if templ_7745c5c3_Var14 == nil {
 | 
				
			||||||
			templ_7745c5c3_Var20 = templ.NopComponent
 | 
								templ_7745c5c3_Var14 = templ.NopComponent
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
							ctx = templ.ClearChildren(ctx)
 | 
				
			||||||
		if len(comments) == 0 {
 | 
							if len(comments) == 0 {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<p>No comments yet!</p>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<p>No comments yet!</p>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		for _, c := range comments {
 | 
							for _, c := range comments {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<div><strong>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<div><strong>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var21 string
 | 
								var templ_7745c5c3_Var15 string
 | 
				
			||||||
			templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(c.AuthorName)
 | 
								templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(c.AuthorName)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 127, Col: 34}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 85, Col: 34}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</strong> ")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</strong> ")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var22 string
 | 
								var templ_7745c5c3_Var16 string
 | 
				
			||||||
			templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(c.Created.Format("01-02-2006 03:04PM"))
 | 
								templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(c.Created.Format("01-02-2006 03:04PM"))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 128, Col: 52}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 86, Col: 52}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<p>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<p>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var23 string
 | 
								var templ_7745c5c3_Var17 string
 | 
				
			||||||
			templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(c.CommentText)
 | 
								templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(c.CommentText)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 130, Col: 31}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 88, Col: 31}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</p></div>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</p></div>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -581,9 +398,9 @@ func GuestbookView(title string, data CommonData, website models.Website, guestb
 | 
				
			|||||||
			}()
 | 
								}()
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.InitializeContext(ctx)
 | 
							ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
		templ_7745c5c3_Var24 := templ.GetChildren(ctx)
 | 
							templ_7745c5c3_Var18 := templ.GetChildren(ctx)
 | 
				
			||||||
		if templ_7745c5c3_Var24 == nil {
 | 
							if templ_7745c5c3_Var18 == nil {
 | 
				
			||||||
			templ_7745c5c3_Var24 = templ.NopComponent
 | 
								templ_7745c5c3_Var18 = templ.NopComponent
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
							ctx = templ.ClearChildren(ctx)
 | 
				
			||||||
		postUrl := fmt.Sprintf("/websites/%s/guestbook/comments/create", shortIdToSlug(website.ShortId))
 | 
							postUrl := fmt.Sprintf("/websites/%s/guestbook/comments/create", shortIdToSlug(website.ShortId))
 | 
				
			||||||
@ -593,42 +410,42 @@ func GuestbookView(title string, data CommonData, website models.Website, guestb
 | 
				
			|||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<div id=\"main\"><div><h1>Guestbook for ")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "<div id=\"main\"><div><h1>Guestbook for ")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var25 string
 | 
								var templ_7745c5c3_Var19 string
 | 
				
			||||||
			templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(website.SiteUrl)
 | 
								templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(website.SiteUrl)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 143, Col: 51}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 101, Col: 51}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</h1><form action=\"")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</h1><form action=\"")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var26 templ.SafeURL = templ.URL(postUrl)
 | 
								var templ_7745c5c3_Var20 templ.SafeURL = templ.URL(postUrl)
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var26)))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var20)))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\" method=\"post\"><input type=\"hidden\" name=\"csrf_token\" value=\"")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\" method=\"post\"><input type=\"hidden\" name=\"csrf_token\" value=\"")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var27 string
 | 
								var templ_7745c5c3_Var21 string
 | 
				
			||||||
			templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(data.CSRFToken)
 | 
								templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(data.CSRFToken)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 145, Col: 80}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 103, Col: 80}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -636,7 +453,7 @@ func GuestbookView(title string, data CommonData, website models.Website, guestb
 | 
				
			|||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</form></div><div id=\"comments\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</form></div><div id=\"comments\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -644,7 +461,7 @@ func GuestbookView(title string, data CommonData, website models.Website, guestb
 | 
				
			|||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</div></div>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</div></div>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -669,27 +486,27 @@ func CreateGuestbookComment(title string, data CommonData, website models.Websit
 | 
				
			|||||||
			}()
 | 
								}()
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.InitializeContext(ctx)
 | 
							ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
		templ_7745c5c3_Var28 := templ.GetChildren(ctx)
 | 
							templ_7745c5c3_Var22 := templ.GetChildren(ctx)
 | 
				
			||||||
		if templ_7745c5c3_Var28 == nil {
 | 
							if templ_7745c5c3_Var22 == nil {
 | 
				
			||||||
			templ_7745c5c3_Var28 = templ.NopComponent
 | 
								templ_7745c5c3_Var22 = templ.NopComponent
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
							ctx = templ.ClearChildren(ctx)
 | 
				
			||||||
		postUrl := fmt.Sprintf("/websites/%s/guestbook/comments/create", shortIdToSlug(website.ShortId))
 | 
							postUrl := fmt.Sprintf("/websites/%s/guestbook/comments/create", shortIdToSlug(website.ShortId))
 | 
				
			||||||
		if data.IsHtmx {
 | 
							if data.IsHtmx {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<form hx-post=\"")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<form hx-post=\"")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			var templ_7745c5c3_Var29 string
 | 
								var templ_7745c5c3_Var23 string
 | 
				
			||||||
			templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(postUrl)
 | 
								templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(postUrl)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 159, Col: 31}
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/guestbooks.templ`, Line: 117, Col: 31}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\" hx-target=\"closest div\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "\" hx-target=\"closest div\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -697,12 +514,12 @@ func CreateGuestbookComment(title string, data CommonData, website models.Websit
 | 
				
			|||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</form>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "</form>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			templ_7745c5c3_Var30 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
								templ_7745c5c3_Var24 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
				
			||||||
				templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
									templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
				
			||||||
				templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
									templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
				
			||||||
				if !templ_7745c5c3_IsBuffer {
 | 
									if !templ_7745c5c3_IsBuffer {
 | 
				
			||||||
@ -714,16 +531,16 @@ func CreateGuestbookComment(title string, data CommonData, website models.Websit
 | 
				
			|||||||
					}()
 | 
										}()
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				ctx = templ.InitializeContext(ctx)
 | 
									ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<form action=\"")
 | 
									templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<form action=\"")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				var templ_7745c5c3_Var31 templ.SafeURL = templ.URL(postUrl)
 | 
									var templ_7745c5c3_Var25 templ.SafeURL = templ.URL(postUrl)
 | 
				
			||||||
				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var31)))
 | 
									_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var25)))
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "\" method=\"post\">")
 | 
									templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "\" method=\"post\">")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
@ -731,13 +548,13 @@ func CreateGuestbookComment(title string, data CommonData, website models.Websit
 | 
				
			|||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</form>")
 | 
									templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</form>")
 | 
				
			||||||
				if templ_7745c5c3_Err != nil {
 | 
									if templ_7745c5c3_Err != nil {
 | 
				
			||||||
					return templ_7745c5c3_Err
 | 
										return templ_7745c5c3_Err
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				return nil
 | 
									return nil
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
			templ_7745c5c3_Err = base(title, data).Render(templ.WithChildren(ctx, templ_7745c5c3_Var30), templ_7745c5c3_Buffer)
 | 
								templ_7745c5c3_Err = base(title, data).Render(templ.WithChildren(ctx, templ_7745c5c3_Var24), templ_7745c5c3_Buffer)
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +1,5 @@
 | 
				
			|||||||
<input type=\"hidden\" name=\"csrf_token\" value=\"
 | 
					<input type=\"hidden\" name=\"csrf_token\" value=\"
 | 
				
			||||||
\"> <label for=\"siteurl\">Site URL: </label> <input type=\"text\" name=\"siteurl\" id=\"siteurl\" required> <button type=\"submit\">Submit</button>
 | 
					\"> <label for=\"siteurl\">Site URL: </label> <input type=\"text\" name=\"siteurl\" id=\"siteurl\" required> <button type=\"submit\">Submit</button>
 | 
				
			||||||
<p>No Guestbooks yet</p>
 | 
					 | 
				
			||||||
<ul id=\"guestbooks\" hx-get=\"/guestbooks\" hx-trigger=\"newGuestbook from:body\" hx-swap=\"outerHTML\">
 | 
					 | 
				
			||||||
<li><a href=\"
 | 
					 | 
				
			||||||
\"></a></li>
 | 
					 | 
				
			||||||
</ul>
 | 
					 | 
				
			||||||
<h1>My Guestbooks</h1><div><button hx-get=\"/guestbooks/create\" hx-target=\"closest div\">New Guestbook</button></div>
 | 
					 | 
				
			||||||
<form hx-post=\"/guestbooks/create\" hx-target=\"closest div\">
 | 
					 | 
				
			||||||
</form>
 | 
					 | 
				
			||||||
<form action=\"/guestbooks/create\" method=\"post\">
 | 
					 | 
				
			||||||
</form>
 | 
					 | 
				
			||||||
<div id=\"dashboard\">
 | 
					<div id=\"dashboard\">
 | 
				
			||||||
<div><h1>Comments on 
 | 
					<div><h1>Comments on 
 | 
				
			||||||
</h1>
 | 
					</h1>
 | 
				
			||||||
 | 
				
			|||||||
@ -8,3 +8,9 @@ templ Home(title string, data CommonData) {
 | 
				
			|||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					templ ComingSoon(title string, data CommonData) {
 | 
				
			||||||
 | 
					    @base(title, data) {
 | 
				
			||||||
 | 
					        <h2>Coming Soon</h2>
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -55,4 +55,51 @@ func Home(title string, data CommonData) templ.Component {
 | 
				
			|||||||
	})
 | 
						})
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func ComingSoon(title string, data CommonData) templ.Component {
 | 
				
			||||||
 | 
						return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
				
			||||||
 | 
							templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
				
			||||||
 | 
							if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
				
			||||||
 | 
								return templ_7745c5c3_CtxErr
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
				
			||||||
 | 
							if !templ_7745c5c3_IsBuffer {
 | 
				
			||||||
 | 
								defer func() {
 | 
				
			||||||
 | 
									templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
				
			||||||
 | 
									if templ_7745c5c3_Err == nil {
 | 
				
			||||||
 | 
										templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}()
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
 | 
							templ_7745c5c3_Var3 := templ.GetChildren(ctx)
 | 
				
			||||||
 | 
							if templ_7745c5c3_Var3 == nil {
 | 
				
			||||||
 | 
								templ_7745c5c3_Var3 = templ.NopComponent
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							ctx = templ.ClearChildren(ctx)
 | 
				
			||||||
 | 
							templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
				
			||||||
 | 
								templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
				
			||||||
 | 
								templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
				
			||||||
 | 
								if !templ_7745c5c3_IsBuffer {
 | 
				
			||||||
 | 
									defer func() {
 | 
				
			||||||
 | 
										templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
				
			||||||
 | 
										if templ_7745c5c3_Err == nil {
 | 
				
			||||||
 | 
											templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}()
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<h2>Coming Soon</h2>")
 | 
				
			||||||
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
							templ_7745c5c3_Err = base(title, data).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
 | 
				
			||||||
 | 
							if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
								return templ_7745c5c3_Err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var _ = templruntime.GeneratedTemplate
 | 
					var _ = templruntime.GeneratedTemplate
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1,2 @@
 | 
				
			|||||||
<h2>Welcome</h2><p>Welcome to webweav.ing, a collection of webmastery tools created by the <a href=\"https://32bit.cafe\">32-Bit Cafe</a>.</p>
 | 
					<h2>Welcome</h2><p>Welcome to webweav.ing, a collection of webmastery tools created by the <a href=\"https://32bit.cafe\">32-Bit Cafe</a>.</p>
 | 
				
			||||||
 | 
					<h2>Coming Soon</h2>
 | 
				
			||||||
@ -126,6 +126,20 @@ templ WebsiteDashboard(title string, data CommonData, website models.Website) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					templ WebsiteDashboardComingSoon(title string, data CommonData, website models.Website) {
 | 
				
			||||||
 | 
					    @base(title, data) {
 | 
				
			||||||
 | 
					        <div id="dashboard">
 | 
				
			||||||
 | 
					            @wSidebar(website) 
 | 
				
			||||||
 | 
					            <div>
 | 
				
			||||||
 | 
					                <h1>{ website.Name }</h1>
 | 
				
			||||||
 | 
					                <p>
 | 
				
			||||||
 | 
					                    Coming Soon
 | 
				
			||||||
 | 
					                </p>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
templ WebsiteCreate(title string, data CommonData, form forms.WebsiteCreateForm) {
 | 
					templ WebsiteCreate(title string, data CommonData, form forms.WebsiteCreateForm) {
 | 
				
			||||||
    if data.IsHtmx {
 | 
					    if data.IsHtmx {
 | 
				
			||||||
        <form hx-post="/websites/create" hx-target="closest div">
 | 
					        <form hx-post="/websites/create" hx-target="closest div">
 | 
				
			||||||
 | 
				
			|||||||
@ -489,7 +489,7 @@ func WebsiteDashboard(title string, data CommonData, website models.Website) tem
 | 
				
			|||||||
	})
 | 
						})
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func WebsiteCreate(title string, data CommonData, form forms.WebsiteCreateForm) templ.Component {
 | 
					func WebsiteDashboardComingSoon(title string, data CommonData, website models.Website) templ.Component {
 | 
				
			||||||
	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
						return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
				
			||||||
		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
							templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
				
			||||||
		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
							if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
				
			||||||
@ -510,8 +510,76 @@ func WebsiteCreate(title string, data CommonData, form forms.WebsiteCreateForm)
 | 
				
			|||||||
			templ_7745c5c3_Var25 = templ.NopComponent
 | 
								templ_7745c5c3_Var25 = templ.NopComponent
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx = templ.ClearChildren(ctx)
 | 
							ctx = templ.ClearChildren(ctx)
 | 
				
			||||||
 | 
							templ_7745c5c3_Var26 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
				
			||||||
 | 
								templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
				
			||||||
 | 
								templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
				
			||||||
 | 
								if !templ_7745c5c3_IsBuffer {
 | 
				
			||||||
 | 
									defer func() {
 | 
				
			||||||
 | 
										templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
				
			||||||
 | 
										if templ_7745c5c3_Err == nil {
 | 
				
			||||||
 | 
											templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}()
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<div id=\"dashboard\">")
 | 
				
			||||||
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								templ_7745c5c3_Err = wSidebar(website).Render(ctx, templ_7745c5c3_Buffer)
 | 
				
			||||||
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<div><h1>")
 | 
				
			||||||
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								var templ_7745c5c3_Var27 string
 | 
				
			||||||
 | 
								templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(website.Name)
 | 
				
			||||||
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
									return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/views/websites.templ`, Line: 134, Col: 34}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
 | 
				
			||||||
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "</h1><p>Coming Soon</p></div></div>")
 | 
				
			||||||
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
							templ_7745c5c3_Err = base(title, data).Render(templ.WithChildren(ctx, templ_7745c5c3_Var26), templ_7745c5c3_Buffer)
 | 
				
			||||||
 | 
							if templ_7745c5c3_Err != nil {
 | 
				
			||||||
 | 
								return templ_7745c5c3_Err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func WebsiteCreate(title string, data CommonData, form forms.WebsiteCreateForm) templ.Component {
 | 
				
			||||||
 | 
						return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
 | 
				
			||||||
 | 
							templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
 | 
				
			||||||
 | 
							if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
 | 
				
			||||||
 | 
								return templ_7745c5c3_CtxErr
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
 | 
				
			||||||
 | 
							if !templ_7745c5c3_IsBuffer {
 | 
				
			||||||
 | 
								defer func() {
 | 
				
			||||||
 | 
									templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
 | 
				
			||||||
 | 
									if templ_7745c5c3_Err == nil {
 | 
				
			||||||
 | 
										templ_7745c5c3_Err = templ_7745c5c3_BufErr
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}()
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							ctx = templ.InitializeContext(ctx)
 | 
				
			||||||
 | 
							templ_7745c5c3_Var28 := templ.GetChildren(ctx)
 | 
				
			||||||
 | 
							if templ_7745c5c3_Var28 == nil {
 | 
				
			||||||
 | 
								templ_7745c5c3_Var28 = templ.NopComponent
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							ctx = templ.ClearChildren(ctx)
 | 
				
			||||||
		if data.IsHtmx {
 | 
							if data.IsHtmx {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<form hx-post=\"/websites/create\" hx-target=\"closest div\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<form hx-post=\"/websites/create\" hx-target=\"closest div\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -519,12 +587,12 @@ func WebsiteCreate(title string, data CommonData, form forms.WebsiteCreateForm)
 | 
				
			|||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</form>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</form>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<form action=\"/websites/create\" method=\"post\">")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<form action=\"/websites/create\" method=\"post\">")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -532,7 +600,7 @@ func WebsiteCreate(title string, data CommonData, form forms.WebsiteCreateForm)
 | 
				
			|||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</form>")
 | 
								templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</form>")
 | 
				
			||||||
			if templ_7745c5c3_Err != nil {
 | 
								if templ_7745c5c3_Err != nil {
 | 
				
			||||||
				return templ_7745c5c3_Err
 | 
									return templ_7745c5c3_Err
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
				
			|||||||
@ -35,6 +35,9 @@
 | 
				
			|||||||
<div id=\"dashboard\">
 | 
					<div id=\"dashboard\">
 | 
				
			||||||
<div><h1>
 | 
					<div><h1>
 | 
				
			||||||
</h1><p>Stats and stuff will go here.</p></div></div>
 | 
					</h1><p>Stats and stuff will go here.</p></div></div>
 | 
				
			||||||
 | 
					<div id=\"dashboard\">
 | 
				
			||||||
 | 
					<div><h1>
 | 
				
			||||||
 | 
					</h1><p>Coming Soon</p></div></div>
 | 
				
			||||||
<form hx-post=\"/websites/create\" hx-target=\"closest div\">
 | 
					<form hx-post=\"/websites/create\" hx-target=\"closest div\">
 | 
				
			||||||
</form>
 | 
					</form>
 | 
				
			||||||
<form action=\"/websites/create\" method=\"post\">
 | 
					<form action=\"/websites/create\" method=\"post\">
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user