开源网/ 扩展包
Twitter Bootstrap 扩展包 for Symfony2
dev-master
2013-11-03 19:52 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- braincrafted/bootstrap-bundle: dev-master
- twitter/bootstrap: 2.3.*
This package is not auto-updated.
Last update: 2024-09-23 13:26:05 UTC
README
这是什么?
这是一个用于 Symfony2 的 alpha 扩展包,您可以轻松快速地添加 jQuery、Bootstrap 和其他库。
感谢 Florian Eckerstorfer 的灵感,受 https://github.com/braincrafted/bootstrap-bundle 启发。
通过 composer 安装
{
"require": {
"sopinet/bootstrap-extend-bundle": "dev-master"
}
},
"scripts": {
"post-install-cmd": [
"Sopinet\\Bundle\\BootstrapExtendBundle\\Composer\\ScriptHandler::copyExport"
],
"post-update-cmd": [
"Sopinet\\Bundle\\BootstrapExtendBundle\\Composer\\ScriptHandler::copyExport"
]
}
在 AppKernel 中添加扩展包
new Sopinet\Bundle\BootstrapExtendBundle\SopinetBootstrapExtendBundle(),
执行后
sudo php app/console assets:install
配置
您可以通过配置来选择包含哪些库,默认只包含 jQuery 和 Bootstrap,要添加更多
sopinet_bootstrap_extend:
include: [ jcrop, image-gallery, font-awesome, jqueryform, datepicker ]
用法
在您的 twig 文件中,您可以这样做
{% extends 'SopinetBootstrapExtendBundle:Base:normal.html.twig' %}
{% block title %}Yourweb{% endblock %}
{% block body %}
<div class="container">
Hello world!
</div>
{% endblock %}
问题,错误?
请通过 github 报告