Creating a Haml- and Sass-based template

Now that we have the content defined for our pages, we will start building the frontend. We will keep the frontend as simple as possible and just render the information we have created using our CMS. This task deals with the creation of the frontend and how to separate it from the backend.

Engage thrusters

Let's get started with the process of frontend creation:

  1. Inside your app/assets folder, create a file called front.css. In Rails we have an advantage of asset pipeline. We can use this to separate the frontend assets. We will create a manifest file called front.css and define front end-related stylesheets under it:
    app/assets/stylesheets/front.css /* * This is a manifest file that'll be compiled into front.css, ...

Get Rails 4 Application Development HOTSHOT now with O’Reilly online learning.

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