A custom layout template

 We will now create a custom template for our application. The first thing that we will do is to go into the views folder and open layout.jade; there are a few things that we need to do here. We will set up just a very basic structure, so we will go right under the body tag here and add a space and create a class called container:

doctype htmlhtml  head    title= title    link(rel='stylesheet', href='/stylesheets/style.css')  body   .container       block content

In the container class, we will create an img tag using Jade, giving it a class of logo (I'll give it an src attribute); we'll set this to /images/nodebloglogo.png, and this will be in your files:

 .container img.logo(src='/images/nodebloglogo.png')

In this container, we ...

Get Learn Node.js by Building 6 Projects. now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.