Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- func Base(title string, noAnim bool) templ.Component
- func Diff(d DiffData) templ.Component
- func GalleryDetail(d GalleryDetailData) templ.Component
- func GalleryIndex(d GalleryIndexData) templ.Component
- func Index(d IndexData) templ.Component
- type AxisOption
- type Counts
- type DiffData
- type FilterAxisOption
- type GalleryDetailData
- type GalleryIndexData
- type GalleryItemView
- type IndexData
- type ItemGroup
- type LockedAxisDisplay
- type LockedAxisValue
- type MatrixCell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GalleryDetail ¶
func GalleryDetail(d GalleryDetailData) templ.Component
func GalleryIndex ¶
func GalleryIndex(d GalleryIndexData) templ.Component
Types ¶
type AxisOption ¶
type DiffData ¶
type DiffData struct {
Item *review.Item
AxisNames []string
Position int // 1-based position among all items
Total int // total items
PrevID string // empty if no prev
NextID string // empty if no next
NoAnim bool // set by ?noanim=1 for deterministic screenshot tests
Groups []ItemGroup // grouped by leaf directory of Path (for left sidebar)
Counts Counts // session totals (for sidebar header / progress)
}
type FilterAxisOption ¶
FilterAxisOption is one value of an axis as it should appear in the filterbar dropdown. Available options (those that would yield at least one match given the other current filters) precede Disabled ones.
type GalleryDetailData ¶
type GalleryDetailData struct {
RepoLabel string
// Identifies the "current state" — axes the user is looking at. May not
// correspond to a real PNG (then Found is false and Placeholder is shown).
Path string // empty when Found is false
FoundID string // item ID when Found is true
Found bool
AxesCurrent map[string]string
AxisNames []string
Mode string // "focused" | "matrix"
FocusedURL string
MatrixURL string
// Focused mode.
Options map[string][]AxisOption // axis -> dropdown options
// Matrix mode.
Rows string
Cols string
RowVals []string
ColVals []string
Locked []LockedAxisDisplay
Cells [][]MatrixCell
AxisChoices []string // axes available for rows/cols dropdowns
NoAnim bool
}
type GalleryIndexData ¶
type GalleryIndexData struct {
RepoLabel string
Items []GalleryItemView // already filtered
AxisNames []string // sorted
AxisOpts map[string][]FilterAxisOption // axis -> ordered options (available first, then disabled)
Filter map[string]string // axis -> selected value (empty = "any")
Search string
Matched int
Total int
NoAnim bool
}
type GalleryItemView ¶
type IndexData ¶
type IndexData struct {
Items []*review.Item
AxisNames []string // sorted, derived from items
AxisVals map[string][]string // axis -> sorted unique values
Groups []ItemGroup // grouped by leaf directory of Path
Counts Counts
RepoLabel string // shown in the top bar (e.g. "ios-app/")
NoAnim bool // set by ?noanim=1 for deterministic screenshot tests
}
type LockedAxisDisplay ¶
type LockedAxisDisplay struct {
Name string
Values []LockedAxisValue
}
type LockedAxisValue ¶
Click to show internal directories.
Click to hide internal directories.