Creating the work page - part 9

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
Search for a command to run...

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
No comments yet. Be the first to comment.
So far, we have used a static menu in our header. This static menu doesn't do much expect for the visual representation. Let's change that and make it work. We'll also tackle setting the active state on each page. If you are new to this series, you c...
Most of you know me for my consistency, a golden arrow in my blog series. I've written 1000 articles in 1008 days! Almost an article a day, and my honeymoon was the only holiday I ever took. I'm super proud of this achievement; it has been a fantasti...

It's not the first time I'll be talking about community. I think it's an essential aspect of any successful tool. This shows in my previous explorations of Astro, Medusa, and now Vendure as well. All these products thrive in a super open, welcoming, ...

The cool part about Vendure is how easy it is to set up and how abstract each layer is. Basically, we get the following elements: External database Server Worker Admin UI Frontend While this is amazing, it also brings a bit of complexity when it co...

The previous article looked at customizing Vendure on a data and process level. In this article, we'll look at customizing emails, as they are often a big part of a webshop system. We'll be looking at two different layers of customization for customi...

Even though Vendure is a pretty significant project out of the box, in some cases, we might want to go in and modify some elements to work to our specific use case. In this article, I'll take a high-level look at some elements we can customize within...

What would our portfolio be without a dedicated work page, right?
Let's get started on creating this. Hopefully, we can reuse some of the components we already created when working on the homepage, as we see for the blog page.
As a reminder, the work page looks like this in the design file.

Let's start by adding a new page to our pages directory. We'll call this file work.js.
The rough outline for it will look like this:
import Head from 'next/head';
export default function WorkPage() {
return (
<div>
<Head>
<title>NextJS Work</title>
<meta name='description' content='Generated by create next app' />
<link rel='icon' href='/favicon.ico' />
</Head>
<section>
<div>
<h1>Work</h1>
</div>
</section>
</div>
);
}
We can reuse all the classes we used in yesterday's blog page.
<section className="px-6">
<div className="max-w-4xl mx-auto">
<h1 className="text-3xl font-bold mb-6 p-4">Work</h1>
</div>
</section>
Now let's add some mockup work components we created before.
import Head from 'next/head';
import Work from '../components/work';
export default function WorkPage() {
return (
<div>
<Head>
<title>NextJS Work</title>
<meta name='description' content='Generated by create next app' />
<link rel='icon' href='/favicon.ico' />
</Head>
<section className='px-6'>
<div className='max-w-4xl mx-auto'>
<h1 className='text-3xl font-bold mb-6 p-4'>Work</h1>
<Work />
<Work />
<Work />
<Work />
</div>
</section>
</div>
);
}
Let's see how it looks when we run our app and visit the work page.

Wow, this one works out of the box. Thank you, reusable components.
You can also find the completed code for today on GitHub
Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter