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.
Solution: Partials and lists
From the course: Building a Website with Node.js and Express.js
Solution: Partials and lists
(punchy electronic music) - [Instructor] I hope you took some time to get the artwork sidebar part working. Here's how I would do it. So, I start out by first looking at the page, and to better understand the overall structure, also of this sidebar element, and for that, I would just right-click into the sidebar, and select inspect, because then I see how this whole sidebar is actually built. So, you see that there is first an article class that contains this who should come section, we will leave this alone, but after that, we have this next article that contains the artwork. So, it's two article classes on the index page for instance. When I look into this article class, we see that there is this pixgrid element, that's just a simple list of items, it's not even a HTML list, it's just all those images thrown into this element, pixgrid will then take care of rendering that properly. And we also see that we are rendering…
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)
-
-
-
-