pagerouter

package
v0.0.0-...-f0fecd2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlePage

func HandlePage[T any](mux chi.Router, logf slogf.Logf, routes []Route, page Page[T], params T)
func Header() gomplements.Element

func MainPage

func MainPage[T any](routes []Route, page Page[T], params T) gomponents.Node

func SettingsPage

func SettingsPage(settings map[string]string) gomplements.Element

func Tabbar

func Tabbar[T any](routes []Route, page Page[T]) gomplements.Element

Types

type Page

type Page[T any] struct {
	Component func(params T) gomplements.Element
	Addr      string
	Info      string
}

func MakePage

func MakePage[T any](addr string, info string, comp func(params T) gomplements.Element) Page[T]

func (Page[T]) Tab

func (p Page[T]) Tab() gomplements.Element

type Route

type Route struct {
	// contains filtered or unexported fields
}

func MakeRoute

func MakeRoute[T any](p Page[T]) Route

Jump to

Keyboard shortcuts

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