From the course: The Freelance Stack: Real Project with Next.js and Strapi
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Styling: Article hero section - Next.js Tutorial
From the course: The Freelance Stack: Real Project with Next.js and Strapi
Styling: Article hero section
So with the JSX structure now, we can build our styling for that article intro component. And again, we're going to go into our blocks folder here, create an article intro partial file SCSS like that. And we're going to use the article intro class and bring it into our main SCSS as well. Like that. Perfect. Now, what do we have? Well, we're going to have quite some padding on this one because we need the padding at the top to have enough space for the header and we're also going to have some padding on both sides as well and then the height similar to the one on the hero section will be 83 ram right 830 pixels now before we look at how that looks in the browser we actually want to take care of the background image here so i'm going to say background which is the container and again this is very similar to what we've done on our hero section, which is the position needs to be absolute, it needs to be top left positioned at zero, in this case also the z index minus one, so that it sits…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Create dynamic zone in Strapi for customizable blog content14m 6s
-
(Locked)
Creating data for highlight article8m 28s
-
(Locked)
Article hero section JSX5m 45s
-
(Locked)
Styling: Article hero section5m 26s
-
(Locked)
Article intro component JSX8m 40s
-
(Locked)
Styling: Article intro component5m 29s
-
(Locked)
Generic article component to render different component depending on Strapi data9m 14s
-
(Locked)
Article headline JSX3m 15s
-
(Locked)
Styling: Article headline1m
-
(Locked)
Text with image component JSX15m 9s
-
(Locked)
Styling: Text with image component5m 48s
-
(Locked)
Article paragraph JSX2m 23s
-
(Locked)
Styling: Article paragraph1m 6s
-
(Locked)
Image component JSX3m 49s
-
(Locked)
Styling: Image component2m 20s
-
(Locked)
Other articles section on individual blog page3m 17s
-
(Locked)
Blog section homepage JSX13m 11s
-
(Locked)
Styling: Blog section homepage8m 52s
-
(Locked)
Fix article item for featured items on homepage1m 18s
-
(Locked)
-
-