Build the view

Starting with the layout, get more stuff in there to make this work correctly

  1. meta(charset='utf-8')
  2. meta(http-equiv='X-UA-Compatible', content='IE=edge')
  3. meta(name='description', content='#{description}')
  4. meta(name='viewport', content='width=device-width, initial-scale=1.0, minimum-scale=0.5 maximum-scale=1.0 minimal-ui')

Update the index.js file in ./routes

  1. res.render('index', { title: 'Contact me', description: 'This is a new demo' });

Open ./views/index.jade and add the following:

  1. section.message-container
  2. h1.title= title
  3. form#form.form(action='#', method='get')
  4. ul
  5. li
  6. label(for='name') Your Name:
  7. input#name(type='text', placeholder='Your Name', name='name', tabindex='1')
  8. li
  9. label(for='email') Your Email:
  10. input#email(type='email', placeholder='Your Email', name='email', tabindex='2')
  11. li
  12. label(for='message') Message:
  13. textarea#message(placeholder='Message…', name='message', tabindex='3')
  14. button#submit Send Message