yii2-bootstrap5/README.md

68 lines
1.9 KiB
Markdown
Raw Normal View History

<p align="center">
2023-01-02 16:03:21 +08:00
<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>
2024-03-28 17:12:16 +08:00
<h1 align="center">Twitter Bootstrap 5 Extension for Yii 2 (Mod)</h1>
<br>
</p>
2023-01-03 17:33:06 +08:00
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).
2024-03-28 17:12:16 +08:00
修改说明
------------
由于原yiisoft/yii2-bootstrap5需要bower-asset/bootstrap
而[asset-packagist](https://asset-packagist.org/package/bower-asset/bootstrap)上意外缺失了bower-asset/bootstrap最新版本(5.3.x)
2024-03-28 17:12:16 +08:00
现在手动在composer.json添加bower-asset/bootstrap 5.3.x版本会出现错误
2024-03-28 17:12:16 +08:00
我的项目需要使用bootstrap 5.3新增加的夜间模式,
所以我将原包修改了一下将依赖的bower-asset/bootstrap改为npm-asset/bootstrap
安装
------------
2023-01-02 16:03:21 +08:00
The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
2024-03-28 17:12:16 +08:00
add
```
2024-03-28 17:12:16 +08:00
{
"type": "vcs",
"url": "https://git.chenx221.cyou/chenx221/yii2-bootstrap5"
}
```
2024-03-28 17:12:16 +08:00
to the repositories section of your `composer.json` file,
and add
```
2024-03-28 17:12:16 +08:00
"chenx221/yii2-bootstrap5": "dev-master"
```
2024-03-28 17:12:16 +08:00
to the require section of your `composer.json` file,
2022-01-05 18:17:55 +08:00
Translations
----
2022-01-06 14:48:50 +08:00
The i18n configuration will be automatically added to your application configuration via bootstrapping process.
2022-01-05 18:17:55 +08:00
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']) ?>
```