noop/twitter-bootstrap-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

A simple bundle to integrate 2.0 Twitter bootstrap

This package has no released version yet, and little information is available.


README

#WARNING

Since after 1594b84da7450f5740eb225bf3bde0e6792a0800, the bundle is independent from @ruian work. See original repository.

#WARNING If you use a symfony 2.0.x version please use the correct branch of this bundle (2.0.x in that case)

#How to install ?

##Add theses lines into your deps

[NoopTwitterBootstrapBundle]
    git=git://github.com/andrewtch/NoopTwitterBootstrapBundle.git
    version=origin/master
    target=/bundles/Noop/TwitterBootstrapBundle

[TwitterBootstrap1]
    git=git://github.com/twitter/bootstrap.git
    target=/twitter/bootstrap/v1/
    version=v1.4.0

[TwitterBootstrap2]
    git=git://github.com/twitter/bootstrap.git
    target=/twitter/bootstrap/v2/
    version=v2.0.0

[lessphp]
    git=git://github.com/leafo/lessphp.git
    target=/lessphp/
    version=origin/master

##Add autoloading

#app/autoload.php
 <?php
$loader->registerNamespaces(array(
    #...
    'Noop' => __DIR__.'/../vendor/bundles',
));

 #some code...

 // Add support for lessc
require  __DIR__.'/../vendor/lessphp/lessc.inc.php';

##Register this bundle

#app/AppKernel.php
 <?php
$bundles = array(
    #...
    new Noop\TwitterBootstrapBundle\NoopTwitterBootstrapBundle(),
);

##Update and install all the deps

./bin/vendors update
or
./bin/vendors install --reinstall

#How to use it ?

##Init and compile twitter-bootstrap from source Replace VERSION by the supported version you want, v1 or v2

php5 app/console twitter-bootstrap:clear
php5 app/console twitter-bootstrap:compile VERSION
php5 app/console assets:install web/

##Add your bootstrap to your layout Replace VERSION by the supported version you want, v1 or v2

<!DOCTYPE html>
<html>
<head>
    <title>Twitter Bootstrap</title>
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/nooptwitterbootstrap/css/bootstrapVERSION.css') }}">
</head>
<body>
    <!-- Some code -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" src="{{ asset('bundles/nooptwitterbootstrap/js/bootstrapVERSION.js') }}"></script>
</body>
</html>

##Use bootstrap form style Replace VERSION by the supported version you want, v1 or v2

{% form_theme form_view 'NoopTwitterBootstrapBundle:Form:bootstrap_VERSION.html.twig' %}

##Include alerts to display flash messages

{% include 'NoopTwitterBootstrapBundle:Alert:bootstrap_VERSION.html.twig' %}