components

package
v0.226.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MapMarkersFragment = "MapMarkers"

Variables

This section is empty.

Functions

func AppMetadataJSONLD added in v0.218.0

func AppMetadataJSONLD() templ.Component

func BrowserWindow

func BrowserWindow(address string) templ.Component

BrowserWindow renders a mock browser window. Insert an image with `class="w-full block"` as a child.

func LeafletAssets added in v0.226.0

func LeafletAssets() templ.Component

Leaflet assets will load the required assets (scripts/stylesheets) for using leaflet maps. This can be called many times, but will only load the assets once.

func LeafletMap added in v0.226.0

func LeafletMap(options ...element.PropertiesOption) templ.Component

LeafletMap renders a leaflet map element using leaflet-html. Any optional attributes and classes may be passed and this template may wrap any optional children elements.

func MapMarker added in v0.226.0

func MapMarker(lat, long float64, options ...element.PropertiesOption) templ.Component

MapMarker renders a marker at the given lat/long coordinates, with any optional attributes/classes and child elements.

func MasonryGridBehavior added in v0.218.0

func MasonryGridBehavior() templ.Component

MasonryGridBehaviour loads a hyperscript behaviour that can be used for adding masonry grid functionality to a grid layout.

Usage:
    - Add install MasonryGrid on <div class="grid"></div>.
    - Add "masonry-grid", "relative" classes to <div class="grid"></div>.
    - Add "masonry-item" class to each element in grid.

func Mobile

func Mobile() templ.Component

Mobile renders a mock mobile. Insert an image with `class="w-full block aspect-9/19.5 object-cover"` as a child.

func MuxPlayer

func MuxPlayer(video MuxVideo) templ.Component

func PullToRefreshBehavior added in v0.218.0

func PullToRefreshBehavior() templ.Component

PullToRefresh loads a hyperscript behaviour and sentinel element for controlling pull-to-refresh behavior on an element. Usage:

@PullToRefreshSentinel()
<div class="ptr-scroll" _="install PullToRefresh(threshold: 70)">
    <!-- Element that can be pulled -->
    <div class="ptr-content">
        <!-- Content that will be refreshed. -->
    </div>
</div>

func PullToRefreshSentinel added in v0.218.0

func PullToRefreshSentinel() templ.Component

func ScrollRestoreBehavior added in v0.218.0

func ScrollRestoreBehavior() templ.Component

Types

type MuxVideo

type MuxVideo struct {
	ID            string
	Title         string
	UserID        *string
	ThumbnailTime *int
}

Jump to

Keyboard shortcuts

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