grozzzny/coming_soon

Coming soon for Yii2

Installs: 145

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:CSS

Type:yii2-extension

dev-master 2018-08-21 10:52 UTC

This package is auto-updated.

Last update: 2024-10-23 23:28:30 UTC


README

Installation guide

$ php composer.phar require grozzzny/coming_soon "dev-master"

\config\web.php

$config = [
    ...
    'components' => [
        ...
    ],
    ...
    //coming_soon
    'on beforeAction' => function() {
        if(isset($_GET['open'])){
            setcookie("dev","true",time() + 30*24*60*60);
            exit('<html><head><meta http-equiv="refresh" content="0;/"></head><body></body></html>');
        }
    },
    'params' => $params,
];

if (empty($_COOKIE['dev'])) {
    $config['modules']['coming_soon'] = [
        'class' => 'grozzzny\coming_soon\ComingSoonModule',
        'settings' => [
            'title' => 'АМБАР - купить продукты по низким ценам',
            'heading' => 'Сайт в разработке',
            'descriptions' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure perspiciatis quod, voluptatum, porro pariatur facere id in unde obcaecati nobis sapiente cupiditate ipsa veniam quam natus voluptate ipsum minima soluta!',
            'address' => 'One infinity loop, 54100',
            'phone' => '+00 1234567890',
            'email' => 'youremail@domain.com',
            'expiryDate' => '2018/08/31',
            'copyright' => 'www.ambar39.ru. All rights reserved.',
        ]
    ];
    $config['catchAll'] = ['coming_soon'];
}

return $config;