admin

package
v1.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultWebpage added in v1.21.0

func DefaultWebpage(title, content string) *hb.HtmlWebpage

DefaultWebpage provides a built-in default webpage layout with Bootstrap, Vue, jQuery, and SweetAlert2 This can be used as a fallback or for simple use cases without requiring custom Layout implementation

SECURITY WARNING: The content parameter is rendered as raw HTML without sanitization. Ensure content is trusted or properly sanitized before passing to this function to avoid XSS vulnerabilities.

func UI

func UI(options UIOptions) (hb.TagInterface, error)

Types

type Breadcrumb struct {
	Name string
	URL  string
}

type Layout

type Layout interface {
	SetTitle(title string)
	SetScriptURLs(scripts []string)
	SetScripts(scripts []string)
	SetStyleURLs(styles []string)
	SetStyles(styles []string)
	SetBody(string)
	Render(w http.ResponseWriter, r *http.Request) string
}

type UIOptions

type UIOptions struct {
	ResponseWriter http.ResponseWriter
	Request        *http.Request
	Logger         *slog.Logger
	Store          taskstore.StoreInterface
	Layout         Layout
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL