htmgo/htmgo-site/pages/snippets/snippets.go
2024-10-28 10:56:03 -05:00

37 lines
1.1 KiB
Go

package snippets
import (
"htmgo-site/partials/snippets"
)
var FormWithLoadingStateSnippet = Snippet{
name: "Form",
description: "A simple form submission example with a loading state",
sidebarName: "Form with loading state",
path: "/snippets/form",
partial: snippets.FormExample,
}
var UserAuthSnippet = Snippet{
name: "User Authentication",
description: "An example showing basic user registration and login with htmgo",
sidebarName: "User Authentication",
path: "/snippets/user-auth",
externalRoute: "https://auth-example.htmgo.dev",
sourceCodePath: "https://github.com/maddalax/htmgo/tree/master/examples/simple-auth",
}
var ChatSnippet = Snippet{
name: "Chat App",
description: "A simple chat application built with htmgo",
sidebarName: "Chat App",
path: "/snippets/chat",
externalRoute: "https://chat-example.htmgo.dev",
sourceCodePath: "https://github.com/maddalax/htmgo/tree/master/examples/chat",
}
var Snippets = []Snippet{
FormWithLoadingStateSnippet,
UserAuthSnippet,
ChatSnippet,
}