uran1980/yii2-pace-widget

An Yii2 widget for automatic web page progress bar.

Installs: 5 508

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 2

Open Issues: 0

Type:yii2-extension

0.0.2 2015-03-07 00:00 UTC

This package is auto-updated.

Last update: 2024-12-13 05:41:53 UTC


README

An Yii2 widget for automatic web page progress bar based on Pace javascript library.

What Pace do?

Pace will automatically monitor your ajax requests, event loop lag, document ready state, and elements on your page to decide the progress.

On ajax navigation it will begin again!

For more info see: github.hubspot.com/pace.

Installation

Composer

The preferred way to install this extension is through Composer.

Either run

php composer.phar require uran1980/yii2-pace-widget "dev-master"

or add

"uran1980/yii2-pace-widget": "dev-master"

to the require section of your composer.json

Usage

To activate this widget add this line to you view or layout:

<?php echo uran1980\yii\widgets\pace\Pace::widget(); ?>

Available options: color, theme and paceOptions, for example:

<?php echo uran1980\yii\widgets\pace\Pace::widget([
    'color' => 'green',
    'theme' => 'flash',
]); ?>

or with paceOptions (@see pace documentation for mor info):

<?php echo uran1980\yii\widgets\pace\Pace::widget([
    'color' => 'blue',
    'theme' => 'flash',
    'paceOptions' => [
        'ajax'      => false,
        'document'  => false,
    ],
]); ?>

Author

Ivan Yakovlev, e-mail: uran1980@gmail.com