page

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	AppName string
	Domain  string
	Title   string

	Context echo.Context
	ToURL   func(name string, params ...any) string

	Path string
	URL  string

	Component templ.Component
	Data      any
	Form      any

	IsHome  bool
	IsAuth  bool
	IsAdmin bool

	StatusCode int
	CSRF       string
	Headers    map[string]string
	RequestID  string

	HTMX struct {
		Request  htmx.Request
		Response *htmx.Response
	}

	Cache struct {
		Enabled    bool
		Expiration time.Duration
		Tags       []string
	}

	IsIosDevice bool
}

Base captures reusable web-page fields and behavior that are app-agnostic.

func NewBase

func NewBase(ctx echo.Context) Base

func (Base) GetMessages

func (p Base) GetMessages(typ uxflashmessages.Type) []template.HTML

GetMessages gets all flash messages for a given type.

Jump to

Keyboard shortcuts

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