Documentation ¶
Overview ¶
Package views provides HTML templates and view-related functionality for rendering web pages in the Immich Kiosk application.
It includes structures and utilities for managing page data, handling URL queries, and preparing content for browser display.
templ: version: v0.2.793
templ: version: v0.2.793
templ: version: v0.2.793
templ: version: v0.2.793
templ: version: v0.2.793
templ: version: v0.2.793
templ: version: v0.2.793
templ: version: v0.2.793
Index ¶
- func Clock(requestConfig config.Config) templ.Component
- func Error(data ErrorData) templ.Component
- func Home(viewData ViewData) templ.Component
- func Image(viewData ViewData) templ.Component
- func ImageDateTime(viewData ViewData, imageIndex int) string
- func ImageExif(info immich.ExifInfo) string
- func ImageLocation(info immich.ExifInfo, hideCountries []string) string
- func RenderImageWithContainFit(ImageData, imageFit string) templ.Component
- func RenderImageWithCoverFit(ImageData, imageFit string) templ.Component
- func RenderImageWithoutFit(ImageData, imageFit string) templ.Component
- func Weather(weatherData weather.WeatherLocation) templ.Component
- type ErrorData
- type ImageData
- type ViewData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Image ¶
Image is the main entry point for rendering images. It determines whether to use a single or split view layout based on the number of images, and renders the history form.
Parameters:
- viewData: ViewData containing all necessary information for rendering the images.
func ImageDateTime ¶ added in v0.8.0
ImageDateTime generates a formatted date and time string for an image based on the view data settings. It can display date, time, or both, in various formats.
func ImageExif ¶ added in v0.8.0
ImageExif generates a formatted string of EXIF information for an image. It includes f-number, exposure time, focal length, and ISO if available.
func ImageLocation ¶ added in v0.8.0
ImageLocation generates a formatted string of the image location based on EXIF information. It combines the city, state, and country information if available.
func RenderImageWithContainFit ¶ added in v0.12.0
RenderImageWithContainFit renders an image with "contain" fit style.
Parameters:
- ImageData: A string containing the image data (typically a URL or base64-encoded image).
- imageFit: A string specifying the image fit style (unused in this function).
func RenderImageWithCoverFit ¶ added in v0.12.0
RenderImageWithCoverFit renders an image with "cover" fit style.
Parameters:
- ImageData: A string containing the image data (typically a URL or base64-encoded image).
- imageFit: A string specifying the image fit style (unused in this function).
func RenderImageWithoutFit ¶ added in v0.12.0
RenderImageWithoutFit renders an image without any specific fit style.
Parameters:
- ImageData: A string containing the image data (typically a URL or base64-encoded image).
- imageFit: A string specifying the image fit style (unused in this function).
Types ¶
type ImageData ¶ added in v0.11.0
type ImageData struct { // ImmichImage immich asset data ImmichImage immich.ImmichAsset // ImageData image as base64 data ImageData string // ImageData blurred image as base64 data ImageBlurData string // Date image date ImageDate string }
type ViewData ¶ added in v0.11.0
type ViewData struct { // KioskVersion the current build version of Kiosk KioskVersion string // DeviceID unique id for device DeviceID string // Images the images to display in view Images []ImageData // URL queries Queries url.Values // CustomCss CustomCss []byte // instance config config.Config }