gallery
gallery
#
Gallery — a grid of pictures, captioned by their keys when keyed.
Gallery
#
Bases: Component
images in a grid; a keyed collection captions each picture with its key.
Built with of, each picture links to its entry's page; given plainly,
the pictures link nowhere. An entry with no picture is left out.
cg.ui.Gallery(target.sessions.photo) # captioned by capture time
cg.ui.Gallery(target.sessions.values()[-1].images)
cg.ui.Gallery([target.reference, target.sessions.values()[-1].photo])
cg.ui.Gallery.of(target.sessions, lambda s: thumbnail(s.photo))
Source code in capturegraph-lib/capturegraph/ui/gallery.py
html(render)
#
A grid of figures, one per image.
Source code in capturegraph-lib/capturegraph/ui/gallery.py
of(container, image)
classmethod
#
A gallery of image over container's elements, each linked to its entry's page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
container
|
Map[K, E] | Array[E]
|
A |
required |
image
|
Callable[[E], StillImageFile | None]
|
The picture for one element — any still image, such as a
thumbnail; |
required |