Provides a masonry component for use with SilverWare.
Installation is via Composer:
$ composer require silverware/masonry
This module provides a MasonryComponent
which accepts an implementation of SilverWare\Lists\ListSource
in
order to render the list items using a masonry layout. It is recommended that the list items provide
a image via SilverWare\Extensions\Model\MetaDataExtension
in order to be rendered correctly.
To make use of this component:
- Using the CMS, add a new instance of
MasonryComponent
to your SilverWare template or layout. - Select the list source for the component from the dropdown field on the Main tab.
- Configure the component using the Style and Options tabs.
On the Style tab, you may choose either "Percentages" or "Pixels" for the column widths of the component. For each type of unit, fields are available to specify the column width per viewport size:
- Tiny
- Small
- Medium
- Large
- Huge
As SilverWare uses a mobile-first approach, you should enter at least one width in the "Tiny" field.
On the Style tab, you may also define the gutter size in pixels. The gutter is the amount of space between each item in the masonry grid.
The component defaults to using a horizontal order for the rendered items. On the Options tab, you may uncheck the "Order items horizontally" checkbox to alter the layout order. For more information, please see the Masonry documentation.
Please use the GitHub issue tracker for bug reports and feature requests.
Your contributions are gladly welcomed to help make this project better. Please see contributing for more information.
- Makes use of Masonry and imagesLoaded by David DeSandro.
Colin Tucker | Praxis Interactive |
BSD-3-Clause © Praxis Interactive