Wallogit.com
2017 © Pedro Peláez
Zurb Foundation Bundle For Symfony
``` js // composer.json, (*1)
{ "require": { // ... "itlized/zurb-foundation": "dev-master" } }, (*2)
### Add bundle to your application kernel ``` php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Itlized\Bundle\ZurbFoundationBundle\ItlizedZurbFoundationBundle(), // ... ); }
``` bash $ php composer.phar update itlized/zurb-foundation, (*3)
### Install assets Given your server's public directory is named "web", install the public vendor resources ``` bash $ php app/console assets:install web
Optionally, use the --symlink attribute to create links rather than copies of the resources, (*4)
``` bash $ php app/console assets:install --symlink web, (*5)
## Usage Refer to the desired files in your HTML template, e.g. ``` html <link rel="stylesheet" type="text/css" href="{{ asset('bundles/itlizedzurbfoundation/css/foundation.min.css') }}" />
The Foundation scripts requires jQuery. The bundle installs itlized/zurb-foundation, which should be referenced before loading any foundation script., (*6)
html
<script type="text/javascript" src="{{ asset('bundles/itlizedzurbfoundation/js/vendor/jquery.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/itlizedzurbfoundation/js/foundation.min.js') }}"></script>, (*7)
Zurb Foundation is MIT licensed, (*8)