htmgo/htmgo-site/pages/examples/examples.go

82 lines
2.6 KiB
Go
Raw Normal View History

2024-10-28 16:39:46 +00:00
package examples
2024-10-28 15:32:50 +00:00
2024-10-28 16:39:46 +00:00
import "htmgo-site/partials/snippets"
2024-10-28 15:32:50 +00:00
2024-10-28 15:56:03 +00:00
var FormWithLoadingStateSnippet = Snippet{
category: "Forms",
2024-10-28 15:32:50 +00:00
name: "Form",
description: "A simple form submission example with a loading state",
2024-10-28 23:47:00 +00:00
sidebarName: "Form With Loading State",
2024-10-28 16:39:46 +00:00
path: "/examples/form",
2024-10-28 15:32:50 +00:00
partial: snippets.FormExample,
}
2024-10-28 15:56:03 +00:00
var UserAuthSnippet = Snippet{
category: "Projects",
2024-10-28 15:56:03 +00:00
name: "User Authentication",
description: "An example showing basic user registration and login with htmgo",
sidebarName: "User Authentication",
2024-10-28 16:39:46 +00:00
path: "/examples/user-auth",
2024-10-28 15:56:03 +00:00
externalRoute: "https://auth-example.htmgo.dev",
sourceCodePath: "https://github.com/maddalax/htmgo/tree/master/examples/simple-auth",
}
var ChatSnippet = Snippet{
category: "Projects",
2024-10-28 15:56:03 +00:00
name: "Chat App",
2024-10-28 16:39:46 +00:00
description: "A simple chat application built with htmgo using SSE for real-time updates",
2024-10-28 23:47:00 +00:00
sidebarName: "Chat App Using SSE",
2024-10-28 16:39:46 +00:00
path: "/examples/chat",
2024-10-28 15:56:03 +00:00
externalRoute: "https://chat-example.htmgo.dev",
sourceCodePath: "https://github.com/maddalax/htmgo/tree/master/examples/chat",
}
var HackerNewsSnippet = Snippet{
category: "Projects",
2024-10-28 23:47:00 +00:00
name: "HackerNews Clone",
description: "A hacker news reader clone built with htmgo",
2024-10-28 23:47:00 +00:00
sidebarName: "HackerNews Clone",
2024-10-28 16:39:46 +00:00
path: "/examples/hackernews",
externalRoute: "https://hn.htmgo.dev",
sourceCodePath: "https://github.com/maddalax/htmgo/tree/master/examples/hackernews",
}
2024-10-28 16:39:46 +00:00
var HtmgoSiteSnippet = Snippet{
category: "Projects",
2024-10-28 16:39:46 +00:00
name: "Htmgo Doc Site",
description: "The htmgo site built with htmgo, recursion am I right?",
sidebarName: "Htmgo Doc Site",
path: "/examples/htmgo-site",
externalRoute: "https://htmgo.dev",
sourceCodePath: "https://github.com/maddalax/htmgo/tree/master/htmgo-site",
}
var TodoListSnippet = Snippet{
category: "Projects",
2024-10-28 16:39:46 +00:00
name: "Todo List",
description: "A todo list built with htmgo",
sidebarName: "Todo List",
path: "/examples/todolist",
externalRoute: "https://todo-example.htmgo.dev",
sourceCodePath: "https://github.com/maddalax/htmgo/tree/master/examples/todo-list",
}
2024-10-28 23:47:00 +00:00
var ClickToEditSnippet = Snippet{
category: "Forms",
2024-10-28 23:47:00 +00:00
name: "Inline Click To Edit",
description: "List view of items with a click to edit button and persistence",
2024-10-28 23:50:31 +00:00
sidebarName: "Inline Click To Edit",
2024-10-28 23:47:00 +00:00
path: "/examples/click-to-edit",
partial: snippets.ClickToEdit,
}
2024-10-28 16:39:46 +00:00
var examples = []Snippet{
2024-10-28 15:56:03 +00:00
FormWithLoadingStateSnippet,
2024-10-28 23:47:00 +00:00
ClickToEditSnippet,
2024-10-28 15:56:03 +00:00
UserAuthSnippet,
ChatSnippet,
HackerNewsSnippet,
2024-10-28 16:39:46 +00:00
TodoListSnippet,
HtmgoSiteSnippet,
2024-10-28 15:32:50 +00:00
}