scrolling-blocks A pInterest style wall with infinite scrolling.

  1. Requirements
  2. Usage
  3. Resources

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:

[sh]
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

0 0
2 followers
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: User Interface
Developed by: InLoveWithYii
Created on: Aug 22, 2014
Last updated: 9 years ago

Related Extensions