PHP code example of ianhobbs / slider-block

1. Go to this page and download the library: Download ianhobbs/slider-block library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ianhobbs / slider-block example snippets


return [
    'ianhobbs.slider-block.stackBreakpoint' => '60rem',
];

return [
    'ianhobbs.slider-block.srcsets' => ['avif' => 'avif', 'webp' => 'webp'],
    'ianhobbs.slider-block.fullWidthSizes'
        => '(min-width: 780px) calc(816px + (100vw - 816px) * 0.3), calc(100vw - 2.5rem)',
];

return [
    'ianhobbs.slider-block.formats' => ['avif' => false],
];

return [
    'thumbs' => [
        'srcsets' => [
            'avif' => [ /* '400w' => ['width' => 400, 'format' => 'avif', 'quality' => 75], … */ ],
            'webp' => [ /* … */ ],
        ],
    ],
    'ianhobbs.slider-block.srcsets' => ['avif' => 'avif', 'webp' => 'webp'],
];

return [
    'ianhobbs.slider-block.fullWidthSizes'
        => '(min-width: 780px) calc(816px + (100vw - 816px) * 0.3), calc(100vw - 2.5rem)',
];

<link rel="stylesheet" href="<?= $kirby->plugin('ianhobbs/slider-block')->asset('dist/slider-block.css')->url() 

<script src="<?= $kirby->plugin('ianhobbs/slider-block')->asset('dist/slider-block.js')->url() 

return [
    'ianhobbs.slider-block.injectAssets' => false,
];
css
.slider-block {
  --swiper-wrapper-transition-timing-function: cubic-bezier(0.87, 0, 0.13, 1);
}