Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A quick and maintainable approach is to use <a href="http://www.webjars.org/">WebJars</a> (a client-side dependency manager by <a href="http://www.jamesward.com/">Typesafe Dev Advocate: James Ward</a>), with a few lines in your Build.scala, you can easily add Bootstrap (e.g. version 2.3, 3.0, etc) - and much more - to your project.</p> <p>1) <a href="http://www.webjars.org/documentation">Here's the documentation example for adding Bootstrap 2.3 to Play 2.1</a>, in your <strong>Build.scala</strong>:</p> <pre class="lang-scala prettyprint-override"><code>import sbt._ import Keys._ import play.Project object ApplicationBuild extends Build { val appName = "foo" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( "org.webjars" %% "webjars-play" % "2.1.0-2", "org.webjars" % "bootstrap" % "2.3.2" ) val main = Project(appName, appVersion, appDependencies).settings() } </code></pre> <p>2) Then add an entry to your <strong>routes</strong> file:</p> <pre class="lang-scala prettyprint-override"><code>GET /webjars/*file controllers.WebJarAssets.at(file) </code></pre> <p>3) Add the relevant links to your <strong>templates</strong>:</p> <pre class="lang-html prettyprint-override"><code>&lt;link href='@routes.WebJarAssets.at(WebJarAssets.locate("css/bootstrap.min.css"))' rel='stylesheet' &gt; &lt;script src='@routes.WebJarAssets.at(WebJarAssets.locate("jquery.min.js"))' type='text/javascript' &gt;&lt;/script&gt; </code></pre> <p><em><strong>Note</strong> that WebJars will actually try and find your resources for you, you don't need to full qualify the asset locations.</em></p>
    singulars
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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