From the course: Building a Website with Node.js and Express.js
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Create a site-wide layout
From the course: Building a Website with Node.js and Express.js
Create a site-wide layout
- [Instructor] So far we created one template for the index page. If we look at it, there are parts that will be the same for any sub-page. This would be the whole html head section with just the page title changing but also the navigation, the hero section with the large image is something that you may want to show on some sub-pages. Let's open Chrome developer tools real quick and for that I can just now click right into the page and choose inspect because we want to inspect the parts of the page. And if we hover over those section in html on the right side, we see that they get marked on the left side, so we can identify which section we are on in html. And there you see that we have this header section with this jumbotron up there and then we also have this nav directly below and then there is an article that contains the speakerslist and if we keep scrolling, we end up at some container and let's scroll down…
Contents
-
-
-
-
-
-
(Locked)
Create a site-wide layout6m 54s
-
(Locked)
Using partials with EJS4m 56s
-
(Locked)
Template variables in more detail5m 57s
-
(Locked)
Looping through lists in templates11m 33s
-
(Locked)
Creating a list page6m 4s
-
(Locked)
Using parameter routes7m 9s
-
(Locked)
Challenge: Partials and lists2m 20s
-
(Locked)
Solution: Partials and lists8m 46s
-
(Locked)
-
-
-
-