-
Notifications
You must be signed in to change notification settings - Fork 4
/
SplashingImagesAsset.php
68 lines (60 loc) · 1.94 KB
/
SplashingImagesAsset.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* Splashing Images plugin for Craft CMS 3.x
*
* unsplash.com integration for Craft 3
*
* @link https://studioespresso.co
* @copyright Copyright (c) 2017 Studio Espresso
*/
namespace studioespresso\splashingimages\assetbundles\SplashingImages;
use Craft;
use craft\web\AssetBundle;
use craft\web\assets\cp\CpAsset;
/**
* SplashingImagesAsset AssetBundle
*
* AssetBundle represents a collection of asset files, such as CSS, JS, images.
*
* Each asset bundle has a unique name that globally identifies it among all asset bundles used in an application.
* The name is the [fully qualified class name](http://php.net/manual/en/language.namespaces.rules.php)
* of the class representing it.
*
* An asset bundle can depend on other asset bundles. When registering an asset bundle
* with a view, all its dependent asset bundles will be automatically registered.
*
* http://www.yiiframework.com/doc-2.0/guide-structure-assets.html
*
* @author Studio Espresso
* @package SplashingImages
* @since 1.0.0
*/
class SplashingImagesAsset extends AssetBundle
{
// Public Methods
// =========================================================================
/**
* Initializes the bundle.
*/
public function init()
{
// define the path that your publishable resources live
$this->sourcePath = "@studioespresso/splashingimages/assetbundles/splashingimages/dist";
// define the dependencies
$this->depends = [
CpAsset::class,
];
// define the relative path to CSS/JS files that should be registered with the page
// when this asset bundle is registered
$this->js = [
'js/infinite-scroll.pkgd.min.js',
'js/masonry.pkgd.min.js',
'js/imagesloaded.pkgd.min.js',
'js/splashing-images.js',
];
$this->css = [
'css/SplashingImages.css',
];
parent::init();
}
}