Documentation
¶
Overview ¶
templ: version: v0.3.1020
Index ¶
- Variables
- func GroupCard(g Group, meta map[string]ToolMetaEntry, loggedIn bool, viewMode string) templ.Component
- func IndexPage(items []tool.Tool, groups []Group, ungrouped []tool.Tool, ...) templ.Component
- func ToolCardCompact(t tool.Tool, m ToolMetaEntry, loggedIn bool) templ.Component
- func ToolCardDetailed(t tool.Tool, m ToolMetaEntry, loggedIn bool) templ.Component
- func ViewModeToggle(current string) templ.Component
- type Group
- type Handler
- func (h *Handler) APITools(w http.ResponseWriter, r *http.Request)
- func (h *Handler) BuildGroups(ctx context.Context, user *entity.User, visible []tool.Tool) ([]Group, []tool.Tool)
- func (h *Handler) Index(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ItemMeta(ctx context.Context, user *entity.User, visible []tool.Tool) map[string]ToolMetaEntry
- func (h *Handler) VisibleItems(r *http.Request, user *entity.User) []tool.Tool
- type ToolMetaEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var StaticFS embed.FS
Functions ¶
func ToolCardCompact ¶
func ToolCardDetailed ¶
func ViewModeToggle ¶
Types ¶
type Group ¶
type Group struct {
Kind string // "bookmarks" | "tag" | "category"
Name string
Description string
Tools []tool.Tool
}
Group represents one section on the home page.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) APITools ¶
func (h *Handler) APITools(w http.ResponseWriter, r *http.Request)
APITools returns the items the current user can access as JSON.
func (*Handler) BuildGroups ¶
func (h *Handler) BuildGroups(ctx context.Context, user *entity.User, visible []tool.Tool) ([]Group, []tool.Tool)
BuildGroups arranges the visible items into display groups.
type ToolMetaEntry ¶
ToolMetaEntry holds per-item display metadata.
Click to show internal directories.
Click to hide internal directories.