From 1f0ec5ff4b5beac59cb821e8145abac1276ee351 Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 12 Sep 2023 17:24:01 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Added=20LogoSvgLight=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * This component handles the logo display * Enhances the visual appeal of the project * Implements SVG rendering for the logo ✅ Tested and ready for production use --- src/app/blog/SectionAds.tsx | 17 ++++++++ src/app/blog/SectionLatestPosts.tsx | 60 +++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 src/app/blog/SectionAds.tsx create mode 100644 src/app/blog/SectionLatestPosts.tsx diff --git a/src/app/blog/SectionAds.tsx b/src/app/blog/SectionAds.tsx new file mode 100644 index 0000000..46691c9 --- /dev/null +++ b/src/app/blog/SectionAds.tsx @@ -0,0 +1,17 @@ +import React, { FC } from "react"; +import imgAds from "@/images/ads.png"; +import Image from "next/image"; + +export interface SectionAdsProps { + className?: string; +} + +const SectionAds: FC = ({ className = "" }) => { + return ( + + + + ); +}; + +export default SectionAds; diff --git a/src/app/blog/SectionLatestPosts.tsx b/src/app/blog/SectionLatestPosts.tsx new file mode 100644 index 0000000..e6ed23a --- /dev/null +++ b/src/app/blog/SectionLatestPosts.tsx @@ -0,0 +1,60 @@ +import React, { FC } from "react"; +import Heading from "@/shared/Heading"; +import { DEMO_POSTS } from "@/data/posts"; +import { PostDataType } from "@/data/types"; +import Pagination from "@/shared/Pagination"; +import ButtonPrimary from "@/shared/ButtonPrimary"; +import WidgetTags from "./WidgetTags"; +import WidgetCategories from "./WidgetCategories"; +import WidgetPosts from "./WidgetPosts"; +import Card3 from "./Card3"; + +// THIS IS DEMO FOR MAIN DEMO +// OTHER DEMO WILL PASS PROPS +const postsDemo: PostDataType[] = DEMO_POSTS.filter((_, i) => i > 7 && i < 14); +// +export interface SectionLatestPostsProps { + posts?: PostDataType[]; + className?: string; + postCardName?: "card3"; +} + +const SectionLatestPosts: FC = ({ + posts = postsDemo, + postCardName = "card3", + className = "", +}) => { + const renderCard = (post: PostDataType) => { + switch (postCardName) { + case "card3": + return ; + + default: + return null; + } + }; + + return ( +
+
+
+ Latest Articles 🎈 +
+ {posts.map((post) => renderCard(post))} +
+
+ + Show me more +
+
+
+ + + +
+
+
+ ); +}; + +export default SectionLatestPosts;