yii2-bootstrap5/README.md
2024-03-28 17:12:16 +08:00

68 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p align="center">
<a href="https://getbootstrap.com/" target="_blank" rel="external">
<img src="https://getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo.svg" height="80px">
</a>
<h1 align="center">Twitter Bootstrap 5 Extension for Yii 2 (Mod)</h1>
<br>
</p>
This is the Twitter Bootstrap extension for [Yii framework 2.0](https://www.yiiframework.com). It encapsulates [Bootstrap 5](https://getbootstrap.com/) components
and plugins in terms of Yii widgets, and thus makes using Bootstrap components/plugins
in Yii applications extremely easy.
For license information check the [LICENSE](LICENSE.md)-file.
Documentation is at [docs/guide/README.md](docs/guide/README.md).
修改说明
------------
由于原yiisoft/yii2-bootstrap5需要bower-asset/bootstrap
而[asset-packagist](https://asset-packagist.org/package/bower-asset/bootstrap)上意外缺失了bower-asset/bootstrap最新版本(5.3.x)
现在手动在composer.json添加bower-asset/bootstrap 5.3.x版本会出现错误
我的项目需要使用bootstrap 5.3新增加的夜间模式,
所以我将原包修改了一下将依赖的bower-asset/bootstrap改为npm-asset/bootstrap
安装
------------
The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
add
```
{
"type": "vcs",
"url": "https://git.chenx221.cyou/chenx221/yii2-bootstrap5"
}
```
to the repositories section of your `composer.json` file,
and add
```
"chenx221/yii2-bootstrap5": "dev-master"
```
to the require section of your `composer.json` file,
Translations
----
The i18n configuration will be automatically added to your application configuration via bootstrapping process.
Usage
----
For example, the following
single line of code in a view file would render a Bootstrap Progress plugin:
```php
<?= yii\bootstrap5\Progress::widget(['percent' => 60, 'label' => 'test']) ?>
```