generated from yii2-extensions/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e05ff7
commit 4fced22
Showing
9 changed files
with
301 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yii2\Asset; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
/** | ||
* Twitter Bootstrap 5 CDN CSS bundle. | ||
*/ | ||
final class BootstrapCdnAsset extends AssetBundle | ||
{ | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public $css = [ | ||
'https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css', | ||
]; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public $cssOptions = [ | ||
'crossorigin' => 'anonymous', | ||
'integrity' => 'sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN', | ||
'rel' => 'stylesheet', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yii2\Asset; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
/** | ||
* Twitter Bootstrap 5 CDN JavaScript bundle. | ||
*/ | ||
final class BootstrapPluginCdnAsset extends AssetBundle | ||
{ | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public $js = [ | ||
'https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js', | ||
]; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public $jsOptions = [ | ||
'crossorigin' => 'anonymous', | ||
'integrity' => 'sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL', | ||
]; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public $depends = [ | ||
BootstrapCdnAsset::class, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yii2\Asset; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
/** | ||
* Popper JavaScript bundle. | ||
*/ | ||
final class PopperAsset extends AssetBundle | ||
{ | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public $sourcePath = '@npm/popperjs--core/dist/umd'; | ||
|
||
public function init(): void | ||
{ | ||
parent::init(); | ||
|
||
$assetPopper = YII_ENV === 'prod' ? ['popper.min.js', 'popper.min.js.map'] : ['popper.js', 'popper.js.map']; | ||
|
||
$this->css = $assetPopper; | ||
$this->publishOptions['only'] = $assetPopper; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yii2\Asset; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
/** | ||
* Popper CDN JavaScript bundle. | ||
*/ | ||
final class PopperCdnAsset extends AssetBundle | ||
{ | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public $js = [ | ||
'https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js', | ||
]; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public $jsOptions = [ | ||
'crossorigin' => 'anonymous', | ||
'integrity' => 'sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r', | ||
]; | ||
} |
Oops, something went wrong.