开源网/扩展包

Twitter Bootstrap 扩展包 for Symfony2

安装次数: 442

依赖者: 2

建议者: 0

安全: 0

星标: 2

关注者: 5

分支: 0

语言:JavaScript

类型:symfony-bundle

dev-master 2013-11-03 19:52 UTC

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 报告