O'Reilly logo

Learning Sinatra by Manoj Sehrawat, Sudeep Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing layout.haml

All of our web pages will have a common header and use some additional css rules that are not defined in Bootstrap's framework. So, let's see how the code goes and understand it line by line:

!!! 5 %html %head %title ToDo %script{src: "/js/jquery-1.11.2.min.js"} %script{src: "/js/bootstrap.min.js"} %link{rel: "stylesheet", href: "/css/bootstrap.min.css"} %link{rel: "stylesheet", href: "/css/bootstrap-theme.min.css"} :css .has-below { padding-bottom: 20px; } %body .container-fluid .col-md-12 .row %nav.navbar.navbar-inverse.navbar-fixed-top{role:'navigation'} .navbar-inner .container-fluid .navbar-header %button.navbar-toggle{data:{toggle:'collapse'}} %span.icon-bar %span.icon-bar %span.icon-bar %a.navbar-brand{href: url('/')} ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required