bprs/style-bundle
Composer 安装命令:
composer require bprs/style-bundle
包简介
Simple Bootstrap style for applications
README 文档
README
Simple Bootstrap Styling for your symfony applications.
It contains form theming, js, css and flashbags with translation activated
install
get bundle
on the commandline in your projectfolder, use composercomposer require: bprs/style-bundle
activate bundle
AppKernelnew Bprs\StyleBundle\BprsStyleBundle()
usage
The basic idea is a simple reusable layout.
in your template, use
{% extends "BprsStyleBundle::layout.html.twig" %}
{% block nav_head%}
{% include 'BprsStyleBundle::menu.html.twig' with {'selected': '#selected_menu_item#', 'dropdown': '#selected_dropdown_item#'} %}
{% endblock %}
{% block body_main %}
{#your page content#}
{% endblock %}
in your config.yml, add:
twig globals: version: "YourVersion" name: "YourProjectName"
use form theming
in your config.yml, add:
form: resources: - 'BprsStyleBundle:Form:fields.html.twig'
use character counter
include the js file in your view
<script src="{{ asset('bundles/bprsstyle/js/charactercounter.js')}}"></script>
active the counter on your jquery object like
$("#my_textarea").characterCounter({ counterCssClass: 'help-block', limit: 1000 });
overwrite bundle
add app/Resources/BprsStylBundle/views/menu.html.twig
add app/Resources/BprsStylBundle/views/layout.html.twig
and edit it accordingly.
'selected' allows highlighting of a main menu point, dropdown allows highlighting of a menu entry.
统计信息
- 总下载量: 187
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: 未知许可证
- 更新时间: 2015-02-09