Documentation
¶
Overview ¶
templ: version: v0.3.833
templ: version: v0.3.833
Package components provides shared components for templ templates.
templ: version: v0.3.833
templ: version: v0.3.833
templ: version: v0.3.833
templ: version: v0.3.833
templ: version: v0.3.833
templ: version: v0.3.833
templ: version: v0.3.833
Index ¶
- func AssetPath(ctx context.Context, path string) (string, error)
- func Authenticated(ctx context.Context) bool
- func BareLayout(props BareLayoutProps) templ.Component
- func BlockLink(path templ.SafeURL) string
- func ContentList[T any](items []T, comp func(T) templ.Component) templ.Component
- func Cookie(ctx context.Context, name string) string
- func CopyableContent() templ.Component
- func CurrentPath(ctx context.Context) string
- func CurrentURL(ctx context.Context) string
- func CurrentURLWithoutQuery(ctx context.Context) string
- func CurrentUsername(ctx context.Context) (string, error)
- func DeleteButton() templ.Component
- func Flashes() templ.Component
- func Identifier(id resource.ID) templ.Component
- func IsOwner(ctx context.Context, organization string) bool
- func IsSiteAdmin(ctx context.Context) bool
- func Layout(props LayoutProps) templ.Component
- func PaginatedContentList[T any](page *resource.Page[T], comp func(T) templ.Component) templ.Component
- func SearchDropdown(props SearchDropdownProps) templ.Component
- func Strikethrough(cond bool) templ.Component
- func TokenFlashMessage(w gohttp.ResponseWriter, token []byte) error
- type BareLayoutProps
- type Breadcrumb
- type DropDownUIWidth
- type LayoutProps
- type SearchDropdownProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticated ¶
func BareLayout ¶
func BareLayout(props BareLayoutProps) templ.Component
func CopyableContent ¶
func CurrentPath ¶
func CurrentURL ¶
func CurrentURLWithoutQuery ¶
func DeleteButton ¶
func IsSiteAdmin ¶
func Layout ¶
func Layout(props LayoutProps) templ.Component
func PaginatedContentList ¶
func SearchDropdown ¶
func SearchDropdown(props SearchDropdownProps) templ.Component
func Strikethrough ¶
func TokenFlashMessage ¶
func TokenFlashMessage(w gohttp.ResponseWriter, token []byte) error
TokenFlashMessage is a helper for rendering a flash message with an authentication token.
Types ¶
type BareLayoutProps ¶
type Breadcrumb ¶
type DropDownUIWidth ¶
type DropDownUIWidth string
const ( NarrowDropDown DropDownUIWidth = "narrow" WideDropDown DropDownUIWidth = "wide" )
type LayoutProps ¶
type SearchDropdownProps ¶
type SearchDropdownProps struct {
// Name to send along with value in the POST form
Name string
// Existing values to NOT show in the dropdown
Existing []string
// Available values to show in the dropdown
Available []string
// Action is the form action URL
Action templ.SafeURL
// Placeholder to show in the input element.
Placeholder string
// Width: "narrow" or "wide"
Width DropDownUIWidth
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.