Using classes
Once we have imported Bootstrap CSS, we can use Bootstrap classes and styles. It is just the same as writing code in HTML, that is, <input class="btn btn-primary"/>
. You can find the complete guide on Bootstrap's website (http://twitter.github.com/bootstrap/base-css.html).
Let's take button for example:
import stdlib.themes.bootstrap function page(){ <div style="margin:5px"> <button class="btn btn-large">Large Button</button> <button class="btn">Default Button</button> <button class="btn btn-primary">Primary Button</button> <button class="btn btn-small">Small Button</button> <button class="btn btn-mini">Mini Button</button> </div> } Server.start(Server.http,{title:"Opa Packt",~page})
And that's it; it is quite simple to use Bootstrap's classes in Opa, the result looks as follows: