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: Blog section homepage - Next.js Tutorial
From the course: The Freelance Stack: Real Project with Next.js and Strapi
Styling: Blog section homepage
So, in terms of styling, what we will be doing is, just in our components folder, add the new Blog Preview as CSS, and then don't forget to bring that into the main CSS as well. Here we go, import components Blog Preview, like so, like so. And then I'm going to have the Blog Preview as per usual here open, and we're also going need a look at the block preview item in a second. So what do we want to do? Well, first of all, the block preview component by itself, it needs to be a flex container, because we're going to have two items here, and we want to center this headline article here at this headline at the top. And the easiest way for us to just make sure everything sits exactly how it should would be to now make the whole thing a flex container so we're just going to say display flex flex direction is column and then we're going to say align items center and that should already move our headline right to the middle of well it sits in the middle we can't really see it now because we…
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)
-
-