Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I use lessphp in windows with Bootstrap v3.0.0. The original idea is from <a href="http://mossco.co.uk/symfony-2/symfony-2-and-bootstrap-3-assetic-config-and-base-html-template-file/" rel="nofollow">http://mossco.co.uk/symfony-2/symfony-2-and-bootstrap-3-assetic-config-and-base-html-template-file/</a></p> <p>I have also added to the entries for the fonts, icons.</p> <p>My composer.json</p> <pre><code>"require": { "components/jquery": "dev-master", "leafo/lessphp": "v0.4.0", "twbs/bootstrap": "v3.0.0", }, </code></pre> <p>For the config.yml copy 'cssembed' and 'yuicompressor' to '%kernel.root_dir%/Resources' /java/</p> <p>My config.yml</p> <pre><code> # Assetic Configuration assetic: debug: %kernel.debug% use_controller: false bundles: [ ] java: C:\Program Files\Java\jre7\bin\java.exe filters: cssrewrite: ~ cssembed: jar: %kernel.root_dir%/Resources/java/cssembed-0.4.5.jar yui_js: jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar lessphp: file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php apply_to: "\.less$" assets: jquery_js: inputs: - "%kernel.root_dir%/../components/jquery/jquery.min.js" filters: [?yui_js] bootstrap_js: inputs: - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/transition.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/alert.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/modal.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/dropdown.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/scrollspy.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/tab.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/tooltip.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/popover.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/button.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/collapse.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/carousel.js" - "%kernel.root_dir%/../vendor/twbs/bootstrap/js/affix.js" filters: [?yui_js] bootstrap_less: inputs: - "%kernel.root_dir%/../vendor/twbs/bootstrap/less/bootstrap.less" filters: [lessphp, cssembed] fonts_glyphicons_eot: inputs: - "%kernel.root_dir%/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.eot" output: "fonts/glyphicons-halflings-regular.eot" fonts_glyphicons_svg: inputs: - "%kernel.root_dir%/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.svg" output: "fonts/glyphicons-halflings-regular.svg" fonts_glyphicons_ttf: inputs: - "%kernel.root_dir%/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.ttf" output: "fonts/glyphicons-halflings-regular.ttf" fonts_glyphicons_woff: inputs: - "%kernel.root_dir%/../vendor/twbs/bootstrap/fonts/glyphicons-halflings-regular.woff" output: "fonts/glyphicons-halflings-regular.woff" </code></pre> <p>And here my base.html.twig</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8" /&gt; &lt;title&gt;{% block title %}Welcome!{% endblock %}&lt;/title&gt; {% block stylesheets %} {% stylesheets '@bootstrap_less' combine=true %} &lt;link href="{{ asset_url }}" type="text/css" rel="stylesheet"&gt; {% endstylesheets %} {% endblock %} &lt;link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /&gt; &lt;/head&gt; &lt;body&gt; {% block body %}{% endblock %} {% block javascripts %} {% javascripts '@jquery_js' '@bootstrap_js' filter='?yui_js' combine=true %} &lt;script src="{{ asset_url }}"&gt;&lt;/script&gt; {% endjavascripts %} {% endblock %} &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Somehow cssembed unnecessary or does not function properly and can be removed with this solution!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload