Skip to main content
Add a gallery entry to admin.views to show documents as a grid of cards: an image, the title and a few fields on each. Gallery cards look like board cards and use the same keys, but they sit in a grid and can’t be dragged. See the complete Collection views reference.
An upload collection needs nothing set: each card shows the document’s own file.

Card images

Cards show the collection’s admin.useAsThumbnail, which defaults to the collection’s first upload field. On an upload collection with no upload field, each card shows the document’s own file. A gallery can set its own useAsThumbnail: another top-level upload field, or false for no images. A bad field name stops startup with an error naming the collection, the view and the field. The image area has a fixed height, so cards line up. A card with no image, such as a company with no logo, keeps the image area and shows a document icon.

Layout and paging

Cards fill as many columns as fit the page, at least 240px wide, or 150px on a phone. The gallery loads one page at a time, 25 cards unless pagination.defaultLimit says otherwise, with page controls below the grid. Clicking a card opens the record in the record panel beside the gallery. Saving or deleting there refreshes the page. With the collection’s admin.useAsDone set, each built-in card starts with a check circle that toggles the record’s done field, and done cards show a muted title. The card open in the panel shows the shared selected style. The gallery’s sort, filters, card fields and page size are saved per user. Reset to default in the view menu returns to the config.

Styling

Gallery styles sit in FrogBot’s CSS layer, so an app’s own CSS overrides them without extra specificity. The grid is .collection-gallery, each card .collection-gallery__card, and the card body uses the board’s classes: .fb-card__image, .fb-card__title and .fb-card__field. The --fb-card-image-height variable sets the image area’s height.