Yii 2.0: scrolling-blocks

A pInterest style wall with infinite scrolling.
2 followers

This is a pinterest style layout using the wookmark jquery plugin with infinite scrolling and responsive capabilities built in.

Requirements

Yii2

Usage

Install with composer:

php composer.phar --prefer-dist --stability=dev damiandennis/yii2-scrollingblocks

To use the widget:

namespace damiandennis\scrollingblocks;
 
echo ScrollingBlocks::widget([
    'dataProvider' => $dataProvider,
    'itemView' => '_view',
    'wallOptions' => [
      'itemWidth' => 200,
      'offset' => 5,
      'autoResize' => true,
      'flexibleWidth' => '20%', //This can be determined by the responsive widths below.
    ],
    'responsiveWidths' => [
      '(max-width: 520px)'=>'100%',
      '(min-width: 521px) and (max-width: 655px)'=>'50%',
      '(min-width: 656px) and (max-width: 1000px)'=>'33%',
      '(min-width: 1001px) and (max-width: 1199px)'=>'25%',
      '(min-width: 1200px)'=>'20%',
    ]
]);

Resources

Be the first person to leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet