ui

package
v0.114.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package ui embeds the built cataloging SPA (Svelte, see src/) so lcatd serves it as static files -- one deployable, no CORS. The committed dist/index.html is a placeholder; `npm run build` (run before `go build` in a release) overwrites dist/ with the real app, which go:embed picks up at compile time. A deployment may instead host dist/ on its own CDN and run lcatd API-only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(brandCSS []byte) http.Handler

Handler serves the embedded SPA with history-API fallback: unknown non-asset paths get index.html so client-side routes deep-link.

A non-empty brandCSS (the LCATD_BRAND_CSS file, read at boot -- tasks/135) is served at /brand.css and linked from index.html at the end of <head>, after the built app.css, so its rules win the cascade: a deployment re-brands the app.css tokens (or anything else) by authoring plain CSS, without forking or rebuilding the SPA. The link is render-blocking like any head stylesheet, so the first paint already carries the brand.

func IsPlaceholder

func IsPlaceholder() bool

IsPlaceholder reports whether the embedded SPA is the committed placeholder (no build was run before `go build`). Callers log a warning: the API works, but the browser UI shows a build notice rather than the app.

Types

This section is empty.

Jump to

Keyboard shortcuts

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