package views import "fmt" import "git.32bit.cafe/32bitcafe/guestbook/internal/models" import "git.32bit.cafe/32bitcafe/guestbook/internal/forms" func wUrl(w models.Website) string { return fmt.Sprintf("/websites/%s", shortIdToSlug(w.ShortId)) } templ wSidebar(website models.Website) { {{ dashUrl := wUrl(website) + "/dashboard" }} {{ gbUrl := wUrl(website) + "/guestbook" }} } templ displayWebsites(websites []models.Website) { if len(websites) == 0 {
No Websites yet. Register a website.
} else {
Upload this JavaScript WebComponent to your site and include it in your { `` }
tag.
{
`
` }
Then add the custom elements where you want your form and comments to show up
{{ gbUrl := fmt.Sprintf("https://%s/websites/%s/guestbook", data.RootUrl, shortIdToSlug(website.ShortId)) }} //
{ fmt.Sprintf(`
`, gbUrl, gbUrl) }
If your web host does not allow CORS requests, use an iframe instead
{ fmt.Sprintf(``, gbUrl) }
Coming Soon
{ fmt.Sprintf(formStr, postUrl) }
}
templ embedJavaScriptSnippet(root string, website models.Website) {
}