alexandermatveev/bootstrap4-bundle

Symfony3+版本的Bootstrap Bundle

安装: 67

依赖者: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

语言:JavaScript

类型:symfony-bundle

1.0 2018-10-09 08:22 UTC

This package is auto-updated.

Last update: 2024-09-09 21:45:41 UTC


README

当前版本

Bootstrap 4.0.0

需求

  1. jQuery https://github.com/AlexanderMatveev/jquery-bundle

  2. Popper.js https://github.com/AlexanderMatveev/popper-bundle

安装

composer require alexandermatveev/bootstrap4-bundle

将Bundle添加到应用程序Kernel(Symfony 3)中

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new AlexanderMatveev\Bootstrap4Bundle\AlexanderMatveevBootstrap4Bundle(),
        // ...
    );
}

安装资源(Symfony 3)

假设您的服务器公共目录名为"web",安装公共供应商资源

bin/console assets:install web

可选地,使用--symlink属性创建链接而不是资源的副本

bin/console assets:install --symlink web

使用方法

在您的HTML模板中引用所需文件,例如

<link href="{{ asset('bundles/alexandermatveevbootstrap4/lib/css/bootstrap.min.css') }}" rel="stylesheet">
<script type="text/javascript" src="{{ asset('bundles/alexandermatveevbootstrap4/lib/js/bootstrap.min.js') }}"></script>

许可证

请参考包含文件的源代码以获取许可证信息

参考

  1. https://bootstrap.ac.cn
  2. https://symfony.com.cn