- Create a
public
folder withinapp
. This is where you will store your css, javascripts, and images - Create a file
application.css
withinapp/public
. This is where you will put your custom CSS. - Inside
app/views
, create a filelayout.erb
. This will automatically render around any other.erb
file that you specify to render in your route block. Add the following code to thelayout.erb
file:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="/application.css">
<title>My Sinatra Application</title>
</head>
<body>
<div class="container">
<%= yield %>
</div>
</body>
</html>