Documentation
¶
Index ¶
- Constants
- func AppMetadataJSONLD() templ.Component
- func BrowserWindow(address string) templ.Component
- func LeafletAssets() templ.Component
- func LeafletMap(options ...element.PropertiesOption) templ.Component
- func MapMarker(lat, long float64, options ...element.PropertiesOption) templ.Component
- func MasonryGridBehavior() templ.Component
- func Mobile() templ.Component
- func MuxPlayer(video MuxVideo) templ.Component
- func PullToRefreshBehavior() templ.Component
- func PullToRefreshSentinel() templ.Component
- func ScrollRestoreBehavior() templ.Component
- type MuxVideo
Constants ¶
const MapMarkersFragment = "MapMarkers"
Variables ¶
This section is empty.
Functions ¶
func AppMetadataJSONLD ¶ added in v0.218.0
func BrowserWindow ¶
BrowserWindow renders a mock browser window. Insert an image with `class="w-full block"` as a child.
func LeafletAssets ¶ added in v0.226.0
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
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 ¶
Mobile renders a mock mobile. Insert an image with `class="w-full block aspect-9/19.5 object-cover"` as a child.
func PullToRefreshBehavior ¶ added in v0.218.0
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>