Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Twitter Bootstrap Bundle Laravel Package

evheniy/twitter-bootstrap-bundle

View on GitHub
Deep Wiki
Context7

TwitterBootstrapBundle

knpbundles.com

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Coverage Status Scrutinizer Code Quality Build Status

This bundle provides TwitterBootstrap in Symfony2 from CDN maxcdn.bootstrapcdn.com

Documentation

You can change TwitterBootstrap version:

twitter_bootstrap:
    version: 3.3.4

You can set TwitterBootstrap local version (it helps if maxcdn doesn't work).

twitter_bootstrap:
    local_js: '@AppBundle/Resources/public/js/bootstrap.min.js'

Default value: '@TwitterBootstrapBundle/Resources/public/js/bootstrap.min.js'

twitter_bootstrap:
    local_fonts_dir: '@AppBundle/Resources/public/fonts/'

Default value: '@TwitterBootstrapBundle/Resources/public/fonts/'

twitter_bootstrap:
    local_css: '@AppBundle/Resources/public/css/bootstrap.min.css'

Default value: '@TwitterBootstrapBundle/Resources/public/css/bootstrap.min.css'

twitter_bootstrap:
    local_theme: '@AppBundle/Resources/public/css/bootstrap-theme.min.css'

Default value: '@TwitterBootstrapBundle/Resources/public/css/bootstrap-theme.min.css'

You can set local CDN:

twitter_bootstrap:
    local_cdn: 'cdn.domain.com'

You can use old html version:

twitter_bootstrap:
    html5: false

Default value: true. If false script will be with type="text/javascript"

You can use async loading:

twitter_bootstrap:
    async: true

Default value: false. If true script will be with async="async"

Installation

$ composer require evheniy/twitter-bootstrap-bundle "1.*"

Or add to composer.json

"evheniy/twitter-bootstrap-bundle": "1.*"

AppKernel:

public function registerBundles()
    {
        $bundles = array(
            ...
            new Evheniy\TwitterBootstrapBundle\TwitterBootstrapBundle(),
        );
        ...

config.yml:

#TwitterBootstrapBundle
twitter_bootstrap: ~

or

#TwitterBootstrapBundle
twitter_bootstrap:
    local_js: '@AppBundle/Resources/public/js/bootstrap.min.js'
    local_fonts_dir: '@AppBundle/Resources/public/fonts/'
    local_css: '@AppBundle/Resources/public/css/bootstrap.min.css'
    local_theme: '@AppBundle/Resources/public/css/bootstrap-theme.min.css'
    local_cdn: 'cdn.domain.com'
    version: 3.3.4
    html5: true
    async: false

And Assetic Configuration in config.yml:

#Assetic Configuration
assetic:
    bundles: [ TwitterBootstrapBundle ]

Add this string to your layout (styles and js)

<html>
    <head>
    ...

    {%- include "TwitterBootstrapBundle:TwitterBootstrap:css.html.twig" -%}
    </head>
    <body>
    ...

    {%- include "TwitterBootstrapBundle:TwitterBootstrap:js.html.twig" -%}
    </body>
</html>

The last step

app/console assetic:dump --env=prod --no-debug

License

This bundle is under the MIT license.

Документация на русском языке

TwitterBootstrap

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings