The next part of our application will pull things together; it is the navigation bar. In previous applications, the navigation has been its own Backbone view, but this is not the case this time. Instead, we'll create a new server-side template just for navigation. We'll be able to use this as an include, as we did with the header and footer templates. So, create the nav.ejs
file in the views
directory and put the following code in it:
<nav> <ul> <li><a href="/">Tokenr</a></li> <li><a href="/"> Play </a></li> <li><a href="/scoreboard"> Scoreboard </a></li> </ul> </nav>
It's a basic list; there isn't much navigating to do in our application. But of course, we'll need to add some styling. Here's the last addition to the style.css
file in the public
directory:
nav { margin:0; background-color: #4E5D6C; overflow: hidden; font-size:19px; } ul { list-style...