bprs/style-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 composer
composer require: bprs/style-bundle

activate bundle

AppKernel
new 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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: 未知许可证
  • 更新时间: 2015-02-09