blog items mock-up components
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
export default function Gallery() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,63 +1,28 @@
|
|||||||
"use server"
|
"use server"
|
||||||
|
|
||||||
|
import { BlogInterface, posts } from "@/components/blog";
|
||||||
|
import BlogItem, { BlogItemParams } from "@/components/blogItem";
|
||||||
|
|
||||||
export default async function HistoryDetails({
|
export default async function HistoryDetails({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
params: Promise<{ slug: string }>;
|
params: Promise<{ slug: string }>;
|
||||||
}) {
|
}) {
|
||||||
const { slug } = await params;
|
const { slug } = await params;
|
||||||
const default_img: string = "https://shadcnblocks.com/images/block/placeholder-dark-1.svg"
|
|
||||||
const default_style: string = "blog-paragraph mb-5 text-muted-foreground md:text-base lg:max-w-2xl lg:text-lg"
|
const blog_item: BlogInterface = posts.find((value) => value.slug == slug) as BlogInterface
|
||||||
const sub_header_style: string = "py-12 mb-3 text-pretty text-xl font-semibold md:mb-4 md:text-4xl lg:mb-6 lg:max-w-3xl lg:text-3xl"
|
|
||||||
|
const blog_item_params: BlogItemParams = {
|
||||||
|
slug: slug,
|
||||||
|
title_style: "py-12 mb-3 text-pretty text-xl font-semibold md:mb-4 md:text-4xl lg:mb-6 lg:max-w-3xl lg:text-3xl",
|
||||||
|
subtitle_style: "py-12 mb-3 text-pretty text-xl font-semibold md:mb-4 md:text-4xl lg:mb-6 lg:max-w-3xl lg:text-3xl"
|
||||||
|
,
|
||||||
|
p_style: "blog-paragraph mb-5 text-muted-foreground md:text-base lg:max-w-2xl lg:text-lg",
|
||||||
|
default_img: "https://shadcnblocks.com/images/block/placeholder-dark-1.svg",
|
||||||
|
blog_content: blog_item,
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="flex flex-col w-full lg:md:py-24 sm:py-24">
|
<BlogItem params={blog_item_params} />
|
||||||
<section className="container self-center max-w-2xl">
|
|
||||||
<div className="blog-title w-full h-28 justify-center">
|
|
||||||
<h1 className="mb-3 text-pretty text-3xl font-semibold lg:text-5xl">
|
|
||||||
{slug}
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div className="content">
|
|
||||||
<div>
|
|
||||||
<h2 className={sub_header_style}>Subtitle 1</h2>
|
|
||||||
<p className={default_style}>
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti architecto incidunt, hic in consectetur eligendi nobis numquam tenetur sit repellat et unde, maxime ducimus autem esse temporibus omnis eum molestias!
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<img
|
|
||||||
src={default_img}
|
|
||||||
alt={slug}
|
|
||||||
className="aspect-[16/9] mb-5 rounded-sm h-full w-full object-cover object-center"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h2 className={sub_header_style}>Subtitle 2</h2>
|
|
||||||
<p className={default_style}>
|
|
||||||
Lorem ipsm dolor sit amet, consectetur adipisicing elit. Deleniti architecto incidunt, hic in consectetur eligendi nobis numquam tenetur sit repellat et unde, maxime ducimus autem esse temporibus omnis eum molestias!
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<img
|
|
||||||
src={default_img}
|
|
||||||
alt={slug}
|
|
||||||
className="aspect-[16/9] mb-5 rounded-sm h-full w-full object-cover object-center"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h2 className={sub_header_style}>Subtitle 3</h2>
|
|
||||||
<p className={default_style}>
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti architecto incidunt, hic in consectetur eligendi nobis numquam tenetur sit repellat et unde, maxime ducimus autem esse temporibus omnis eum molestias!
|
|
||||||
</p>
|
|
||||||
<p className={default_style}>
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti architecto incidunt, hic in consectetur eligendi nobis numquam tenetur sit repellat et unde, maxime ducimus autem esse temporibus omnis eum molestias!
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use server";
|
"use server";
|
||||||
|
|
||||||
import Features, { FeatureItem } from "@/components/features";
|
import Features, { FeatureItem } from "@/components/features";
|
||||||
import Gallery6 from "@/components/gallery";
|
import Gallery from "@/components/gallery";
|
||||||
import Hero from "@/components/hero";
|
import Hero from "@/components/hero";
|
||||||
|
|
||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
@@ -108,8 +108,8 @@ export default async function Home() {
|
|||||||
</ul>
|
</ul>
|
||||||
</FeatureItem>
|
</FeatureItem>
|
||||||
</Features>
|
</Features>
|
||||||
<Gallery6 />
|
<Gallery />
|
||||||
<Gallery6 />
|
<Gallery />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,40 +2,59 @@ import { ArrowRight } from "lucide-react";
|
|||||||
|
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
|
||||||
const posts = [
|
export interface BlogInterface {
|
||||||
|
id: string,
|
||||||
|
slug: string,
|
||||||
|
title: string,
|
||||||
|
content: string,
|
||||||
|
label: string,
|
||||||
|
author: string,
|
||||||
|
published: string,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BlogSummaryInterface extends BlogInterface {
|
||||||
|
summary: string,
|
||||||
|
image: string,
|
||||||
|
href: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export const posts: BlogSummaryInterface[] = [
|
||||||
{
|
{
|
||||||
id: "post-1",
|
id: 'a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6',
|
||||||
title: "Duis sem sem, gravida vel porttitor eu, volutpat ut arcu",
|
slug: 'tech-advancements-2025',
|
||||||
summary:
|
title: 'Tech Advancements in 2025',
|
||||||
"Pellentesque eget quam ligula. Sed felis ante, consequat nec ultrices ut, ornare quis metus. Vivamus sit amet tortor vel enim sollicitudin hendrerit.",
|
content: 'The year 2025 promises groundbreaking technologies that will reshape industries. In this article, we explore the key advancements that could transform how we work, live, and communicate.',
|
||||||
label: "Ut varius dolor turpis",
|
label: 'Technology',
|
||||||
author: "Jane Doe",
|
author: 'd3f5e6g7-h8i9j0k1-l2m3n4o5p6q7',
|
||||||
published: "1 Jan 2024",
|
published: '2025-01-14',
|
||||||
href: "#",
|
summary: 'A look at the tech trends to expect in 2025 and beyond, from AI to quantum computing.',
|
||||||
image: "https://shadcnblocks.com/images/block/placeholder-dark-1.svg",
|
image: 'https://via.placeholder.com/600x400?text=Tech+2025',
|
||||||
|
href: 'history/tech-advancements-2025'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "post-2",
|
id: 'f7g8h9i0-j1k2l3m4-n5o6p7q8r9s0t1u2v3',
|
||||||
title: "Duis sem sem, gravida vel porttitor eu, volutpat ut arcu",
|
slug: 'sustainable-fashion-2025',
|
||||||
summary:
|
title: 'Sustainable Fashion in 2025',
|
||||||
"Pellentesque eget quam ligula. Sed felis ante, consequat nec ultrices ut, ornare quis metus. Vivamus sit amet tortor vel enim sollicitudin hendrerit.",
|
content: 'Sustainability is no longer a trend, but a movement within the fashion industry. This article discusses how eco-friendly practices are influencing fashion designs and consumer behavior in 2025.',
|
||||||
label: "Ut varius dolor turpis",
|
label: 'Fashion',
|
||||||
author: "Jane Doe",
|
author: 'w4x5y6z7-a8b9c0d1-e2f3g4h5i6j7',
|
||||||
published: "1 Jan 2024",
|
published: '2025-01-12',
|
||||||
href: "#",
|
summary: 'Exploring how sustainable fashion is evolving in 2025 with innovative materials and ethical brands.',
|
||||||
image: "https://shadcnblocks.com/images/block/placeholder-dark-1.svg",
|
image: 'https://via.placeholder.com/600x400?text=Sustainable+Fashion',
|
||||||
|
href: 'history/sustainable-fashion-2025'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "post-3",
|
id: 'v1w2x3y4-z5a6b7c8-d9e0f1g2h3i4j5k6l7',
|
||||||
title: "Duis sem sem, gravida vel porttitor eu, volutpat ut arcu",
|
slug: 'mental-health-awareness-2025',
|
||||||
summary:
|
title: 'Mental Health Awareness in 2025',
|
||||||
"Pellentesque eget quam ligula. Sed felis ante, consequat nec ultrices ut, ornare quis metus. Vivamus sit amet tortor vel enim sollicitudin hendrerit.",
|
content: 'As mental health awareness continues to grow, 2025 brings new challenges and opportunities to address psychological well-being. This article focuses on emerging trends in mental health support and public perception.',
|
||||||
label: "Ut varius dolor turpis",
|
label: 'Health',
|
||||||
author: "Jane Doe",
|
author: 'm8n9o0p1-q2r3s4t5-u6v7w8x9y0z1a2b3',
|
||||||
published: "1 Jan 2024",
|
published: '2025-01-10',
|
||||||
href: "#",
|
summary: 'Highlighting the importance of mental health awareness in 2025, focusing on new treatments and societal changes.',
|
||||||
image: "https://shadcnblocks.com/images/block/placeholder-dark-1.svg",
|
image: 'https://via.placeholder.com/600x400?text=Mental+Health+2025',
|
||||||
},
|
href: '/history/mental-health-awareness-2025'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const Blog = () => {
|
const Blog = () => {
|
||||||
|
|||||||
65
latosa-frontend/components/blogItem.tsx
Normal file
65
latosa-frontend/components/blogItem.tsx
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
import { BlogInterface } from "@/components/blog";
|
||||||
|
|
||||||
|
export interface BlogItemParams {
|
||||||
|
slug: string
|
||||||
|
title_style: string,
|
||||||
|
subtitle_style: string,
|
||||||
|
p_style: string,
|
||||||
|
default_img: string
|
||||||
|
blog_content: BlogInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function BlogItem({ params }
|
||||||
|
: { params: BlogItemParams }
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
<main className="flex flex-col w-full lg:md:py-24 sm:py-24">
|
||||||
|
<section className="container self-center max-w-2xl">
|
||||||
|
<div className="blog-title w-full h-28 justify-center">
|
||||||
|
<h1 className="mb-3 text-pretty text-3xl font-semibold lg:text-5xl">
|
||||||
|
{params.slug}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div className="content">
|
||||||
|
<div>
|
||||||
|
<h2 className={params.subtitle_style}>Subtitle 1</h2>
|
||||||
|
<p className={params.p_style}>
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti architecto incidunt, hic in consectetur eligendi nobis numquam tenetur sit repellat et unde, maxime ducimus autem esse temporibus omnis eum molestias!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<img
|
||||||
|
src={params.default_img}
|
||||||
|
alt={params.slug}
|
||||||
|
className="aspect-[16/9] mb-5 rounded-sm h-full w-full object-cover object-center"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h2 className={params.subtitle_style}>Subtitle 2</h2>
|
||||||
|
<p className={params.p_style}>
|
||||||
|
Lorem ipsm dolor sit amet, consectetur adipisicing elit. Deleniti architecto incidunt, hic in consectetur eligendi nobis numquam tenetur sit repellat et unde, maxime ducimus autem esse temporibus omnis eum molestias!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<img
|
||||||
|
src={params.default_img}
|
||||||
|
alt={params.slug}
|
||||||
|
className="aspect-[16/9] mb-5 rounded-sm h-full w-full object-cover object-center"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h2 className={params.subtitle_style}>Subtitle 3</h2>
|
||||||
|
<p className={params.p_style}>
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti architecto incidunt, hic in consectetur eligendi nobis numquam tenetur sit repellat et unde, maxime ducimus autem esse temporibus omnis eum molestias!
|
||||||
|
</p>
|
||||||
|
<p className={params.p_style}>
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti architecto incidunt, hic in consectetur eligendi nobis numquam tenetur sit repellat et unde, maxime ducimus autem esse temporibus omnis eum molestias!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -54,7 +54,7 @@ const data = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const Gallery6 = () => {
|
const Gallery = () => {
|
||||||
const [carouselApi, setCarouselApi] = useState<CarouselApi>();
|
const [carouselApi, setCarouselApi] = useState<CarouselApi>();
|
||||||
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
||||||
const [canScrollNext, setCanScrollNext] = useState(false);
|
const [canScrollNext, setCanScrollNext] = useState(false);
|
||||||
@@ -171,4 +171,4 @@ const Gallery6 = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Gallery6;
|
export default Gallery;
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ const Navbar = () => {
|
|||||||
variant: "ghost",
|
variant: "ghost",
|
||||||
}),
|
}),
|
||||||
)}
|
)}
|
||||||
href="#"
|
href="/history"
|
||||||
>
|
>
|
||||||
Blog
|
Blog
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user