pedroresende/bootstrapbundle
最新稳定版本:v3.3.4
Composer 安装命令:
composer require pedroresende/bootstrapbundle
包简介
Twitter Boostrap for Symfony 2
README 文档
README
Install
To install this bundle, please run
$ composer require "pedroresende/bootstrapbundle"
Then run
$ composer update
Add to AppKernel.php
new PedroResende\BootstrapBundle\BootstrapBundle(),
Finally to routing.yml file
bootstrap_public:
resource: "@BootstrapBundle/Resources/config/routing.yml"
prefix: /bootstrap_bundle
Install assets
$ php app/console assets:install --symlink
Assetic dump
$ php app/console assetic:dump
To use in your templates
CSS
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% stylesheets output='css/bootstrap.min.css'
'@bootstrap_css' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" type="text/css"/>
{% endstylesheets %}
JS
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
{% javascripts output='js/bootstrap.min.js'
'@bootstrap_js'
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
You can always simply extend the existing template by using
{% extends 'BootstrapBundle::layout.html.twig' %}
{% block body %}
<div class="container">
{% block container %}{% endblock %}
</div>
{% endblock %}
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-16