silverware/masonry

SilverWare Masonry Module.

Installs: 85

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:silverstripe-vendormodule

1.3.0 2018-06-12 10:43 UTC

This package is not auto-updated.

Last update: 2024-10-25 13:19:20 UTC


README

Latest Stable Version Latest Unstable Version License

Provides a masonry component for use with SilverWare.

Contents

Requirements

Installation

Installation is via Composer:

$ composer require silverware/masonry

Usage

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:

  1. Using the CMS, add a new instance of MasonryComponent to your SilverWare template or layout.
  2. Select the list source for the component from the dropdown field on the Main tab.
  3. Configure the component using the Style and Options tabs.

Column Widths

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.

Gutter

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.

Horizontal Order

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.

Issues

Please use the GitHub issue tracker for bug reports and feature requests.

Contribution

Your contributions are gladly welcomed to help make this project better. Please see contributing for more information.

Attribution

Maintainers

License

BSD-3-Clause © Praxis Interactive