blog New is linked to post page

This commit is contained in:
parsa aghaei 2024-10-07 14:53:34 +03:30
parent 13af089b38
commit 7d0f1dfb6a
9 changed files with 109 additions and 23 deletions

View File

@ -26,7 +26,7 @@ type AboutMeDataType = {
export default async function AboutMe() {
const aboutMeData: AboutMeDataType = await fetch(
`${process.env.NEXT_PUBLIC_API_URL}/about-me`,
`${process.env.NEXT_PUBLIC_FRONT_URL}/api/website/about-me`,
{
cache: "no-store", // غیرفعال کردن کش
},

View File

@ -0,0 +1,15 @@
import { useParams } from "next/navigation";
type propsType = {
id: number;
params: { slug: string };
};
export default function SingleCategory({ params, id }: propsType) {
return (
<div>
{params.slug}
{id}
</div>
);
}

View File

@ -0,0 +1,7 @@
export default function Categories() {
return (
<div>list of categories</div>
)
}

View File

@ -1,4 +1,5 @@
import Image from "next/image";
import Link from "next/link";
export default function New() {
return (
@ -27,9 +28,14 @@ export default function New() {
</h2>
</div>
<h1 className="z-10 w-full text-[18px] font-[600] text-white sm:text-[28px]">
How to accept rejection gracefully and use it to grow
</h1>
<Link
href={"/blog/posts/Our 15 favorite websites from August 2018"}
className="z-10"
>
<h1 className="w-full text-[18px] font-[600] text-white sm:text-[28px]">
How to accept rejection gracefully and use it to grow
</h1>
</Link>
<p className="z-10 w-full text-[14px] font-[400] text-white sm:text-[16px]">
User research is the reality check every project needs. Heres our
@ -50,36 +56,52 @@ export default function New() {
<p className="text-[16px] font-[400] text-blog-text-passive">
SEP 04 2018
</p>
<h3 className="text-[16px] font-[600] text-blog-text-default">
Our 15 favorite websites from August 2018
</h3>
<Link href={"/blog/posts/Our 15 favorite websites from August 2018"}>
<h3 className="text-[16px] font-[600] text-blog-text-default">
Our 15 favorite websites from August 2018
</h3>
</Link>
</div>
<div className="flex w-full flex-col rounded-md p-2 transition-all hover:scale-105 hover:shadow-md">
<p className="text-[16px] font-[400] text-blog-text-passive">
SEP 04 2018
</p>
<h3 className="text-[16px] font-[600] text-blog-text-hover">
The beginners guide to user research
</h3>
<Link href={"/blog/posts/The beginners guide to user research"}>
<h3 className="text-[16px] font-[600] text-blog-text-hover">
The beginners guide to user research
</h3>
</Link>
</div>
<div className="flex w-full flex-col rounded-md p-2 transition-all hover:scale-105 hover:shadow-md">
<p className="text-[16px] font-[400] text-blog-text-passive">
SEP 04 2018
</p>
<h3 className="text-[16px] font-[600] text-blog-text-default">
Web page layout 101: website anatomy every designer needs to learn
</h3>
<Link
href={
"/blog/posts/Web page layout 101: website anatomy every designer needs to learn"
}
>
<h3 className="text-[16px] font-[600] text-blog-text-default">
Web page layout 101: website anatomy every designer needs to learn
</h3>
</Link>
</div>
<div className="flex w-full flex-col rounded-md p-2 transition-all hover:scale-105 hover:shadow-md">
<p className="text-[16px] font-[400] text-blog-text-passive">
SEP 04 2018
</p>
<h3 className="text-[16px] font-[600] text-blog-text-default">
10 essential sections to a high-converting landing page
</h3>
<Link
href={
"/blog/posts/10 essential sections to a high-converting landing page"
}
>
<h3 className="text-[16px] font-[600] text-blog-text-default">
10 essential sections to a high-converting landing page
</h3>
</Link>
</div>
</div>
</div>

View File

@ -0,0 +1,14 @@
type propsType = {
id: number;
params: { slug: string };
};
export default function FilterdPosts({ params, id }: propsType) {
return (
<div>
{params.slug}
{id}
</div>
);
}

View File

@ -1,7 +0,0 @@
import React from 'react'
export default function New() {
return (
<div>New</div>
)
}

View File

@ -0,0 +1,15 @@
import { useParams } from "next/navigation";
type propsType = {
id: number;
params: { slug: string };
};
export default function SinglePost({ params, id }: propsType) {
return (
<div>
{params.slug}
{id}
</div>
);
}

View File

@ -0,0 +1,5 @@
export default function Posts() {
return <div>blog posts list page</div>;
}

View File

@ -0,0 +1,15 @@
import { useParams } from "next/navigation";
type propsType = {
id: number;
params: { slug: string };
};
export default function SingleTag({ params, id }: propsType) {
return (
<div>
{params.slug}
{id}
</div>
);
}