From 04e4f62ba5049e3467d26da80b32d638d38fd549 Mon Sep 17 00:00:00 2001 From: N-TITIAN Date: Mon, 12 Aug 2024 11:43:14 +0100 Subject: [PATCH 1/4] small fix --- src/pages/home/components/DonationSection.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/components/DonationSection.jsx b/src/pages/home/components/DonationSection.jsx index 60367fa..d4a9767 100644 --- a/src/pages/home/components/DonationSection.jsx +++ b/src/pages/home/components/DonationSection.jsx @@ -13,6 +13,7 @@ function DonationSection() { {donations.slice(0, 3).map((donation, index) => ( ))} +
From 3d82c19e1dfc45227630b51ba9bae865007d1a82 Mon Sep 17 00:00:00 2001 From: N-TITIAN Date: Mon, 12 Aug 2024 13:04:42 +0100 Subject: [PATCH 2/4] Blog list page --- src/App.jsx | 4 +++ src/pages/Blog/Blog.jsx | 29 ++++++++++++++++ src/pages/Blog/components /BlogList.jsx | 41 +++++++++++++++++++++++ src/pages/causes/CauseDetails.jsx | 10 +++--- src/pages/faqs/Faqs.jsx | 4 +-- src/pages/home/components/BlogCard.jsx | 15 +++++---- src/pages/home/components/EventCard.jsx | 2 +- src/pages/home/components/HelpSection.jsx | 6 ++-- 8 files changed, 94 insertions(+), 17 deletions(-) create mode 100644 src/pages/Blog/Blog.jsx create mode 100644 src/pages/Blog/components /BlogList.jsx diff --git a/src/App.jsx b/src/App.jsx index f263b39..56158ad 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -12,6 +12,8 @@ import Donners from "./pages/donners/Donners"; import Home from "./pages/home/Home"; import Leadership from "./pages/leadership/Leadership"; import Faqs from "./pages/faqs/Faqs"; +import Blog from "./pages/Blog/Blog"; +import BlogDetails from "./pages/Blog/BlogDetails"; function App() { return ( @@ -27,6 +29,8 @@ function App() { } /> } /> } /> + }/> + }/> ); diff --git a/src/pages/Blog/Blog.jsx b/src/pages/Blog/Blog.jsx new file mode 100644 index 0000000..ecfeb6b --- /dev/null +++ b/src/pages/Blog/Blog.jsx @@ -0,0 +1,29 @@ +import React from 'react' +import Header from "../../components/layout/Header"; +import GeneralHero from "../../components/layout/GeneralHero"; +import image1 from "../../assets/images/Rectangle 2.png"; + + +import StatisticsSection from '../../components/layout/StatisticsSection'; +import Footer from '../../components/layout/Footer'; +import BlogList from './components /BlogList'; + +function Blog() { + + + return ( + <> +
+ + + + + + + +
+ + ) +} + +export default Blog \ No newline at end of file diff --git a/src/pages/Blog/components /BlogList.jsx b/src/pages/Blog/components /BlogList.jsx new file mode 100644 index 0000000..b9b16fc --- /dev/null +++ b/src/pages/Blog/components /BlogList.jsx @@ -0,0 +1,41 @@ +import React from 'react' +import BlogCard from '../../home/components/BlogCard'; +import image14 from "../../../assets/images/Rectangle 14.png"; +import Pagination from '../../../components/Pagination'; +function BlogList() { +const blogId=1 + const day="25" + const month="Febuary" + const category="Education" + const title="Children Education Needs For Well The World." + const description="Children Education Needs For Well The World." + const author="Adam" + return ( + <> +
+ +
+ {Array.from({ length: 12 }).map((_, index) => ( + + + ))} + +
+ + +
+ + ) +} + +export default BlogList \ No newline at end of file diff --git a/src/pages/causes/CauseDetails.jsx b/src/pages/causes/CauseDetails.jsx index 2345b99..91cba90 100644 --- a/src/pages/causes/CauseDetails.jsx +++ b/src/pages/causes/CauseDetails.jsx @@ -86,23 +86,23 @@ function CauseDetails() {
-
+
{" "} $20
-
+
{" "} $50
-
+
{" "} $200
-
+
{" "} $200
-
+
{" "} Custom
diff --git a/src/pages/faqs/Faqs.jsx b/src/pages/faqs/Faqs.jsx index d9405a5..1bd9723 100644 --- a/src/pages/faqs/Faqs.jsx +++ b/src/pages/faqs/Faqs.jsx @@ -2,7 +2,7 @@ import React from 'react' import Header from '../../components/layout/Header' import Hero1 from '../../components/layout/Hero1' import Footer from '../../components/layout/Footer' -import FaqsSection from './components/FaqsSection' +// import FaqsSection from './components/FaqsSection' const Faqs = () => { @@ -18,7 +18,7 @@ span = "FAQ'S" /> - +{/* */}
diff --git a/src/pages/home/components/BlogCard.jsx b/src/pages/home/components/BlogCard.jsx index 0ef58a6..509b9cb 100644 --- a/src/pages/home/components/BlogCard.jsx +++ b/src/pages/home/components/BlogCard.jsx @@ -2,9 +2,11 @@ import React from "react"; import Button from "../../../components/Button"; function BlogCard(props) { - const { image, day, month, category, title, description, author } = props; + + const { id,image, day, month, category, title, description, author } = props; const maxDescriptionLength = 60; // max letters - const truncatedDescription = + console.log(id); + const truncatedDescription = description.length > maxDescriptionLength ? `${description.substring(0, maxDescriptionLength)}...` : description; @@ -41,10 +43,11 @@ function BlogCard(props) {

{author}

+ type="secondary-link" + text="Readmore" + icon={} + href={`/blog/${id}`} + >
); diff --git a/src/pages/home/components/EventCard.jsx b/src/pages/home/components/EventCard.jsx index 27af64e..ef825b4 100644 --- a/src/pages/home/components/EventCard.jsx +++ b/src/pages/home/components/EventCard.jsx @@ -1,5 +1,5 @@ import React from 'react' -import image10 from "../../../assets/images/image1.png"; +import image10 from "../../../assets/images/Image1.png"; function EventCard(props) { diff --git a/src/pages/home/components/HelpSection.jsx b/src/pages/home/components/HelpSection.jsx index ac1cf97..564ef65 100644 --- a/src/pages/home/components/HelpSection.jsx +++ b/src/pages/home/components/HelpSection.jsx @@ -1,7 +1,7 @@ import React from "react"; -import icon from "../../../assets/images/icon.png"; -import icon2 from "../../../assets/images/icon2.png"; -import icon3 from "../../../assets/images/icon3.png"; +import icon from "../../../assets/images/Icon.png"; +import icon2 from "../../../assets/images/Icon2.png"; +import icon3 from "../../../assets/images/Icon3.png"; import HelpCard from "./HelpCard"; function HelpSection() { From 11cba73e93e2612345d14f1cec1829917a8afa5c Mon Sep 17 00:00:00 2001 From: Spyke Lionel <59184392+spykelionel@users.noreply.github.com> Date: Tue, 20 Aug 2024 03:43:27 +0100 Subject: [PATCH 3/4] Rename BlogList.jsx to BlogList.jsx Signed-off-by: Spyke Lionel <59184392+spykelionel@users.noreply.github.com> --- src/pages/Blog/{components => components}/BlogList.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/pages/Blog/{components => components}/BlogList.jsx (97%) diff --git a/src/pages/Blog/components /BlogList.jsx b/src/pages/Blog/components/BlogList.jsx similarity index 97% rename from src/pages/Blog/components /BlogList.jsx rename to src/pages/Blog/components/BlogList.jsx index b9b16fc..a08c3e6 100644 --- a/src/pages/Blog/components /BlogList.jsx +++ b/src/pages/Blog/components/BlogList.jsx @@ -38,4 +38,4 @@ const blogId=1 ) } -export default BlogList \ No newline at end of file +export default BlogList From 86a1075806606e2f5fe381096637711dca992e96 Mon Sep 17 00:00:00 2001 From: Spyke Lionel Date: Tue, 20 Aug 2024 03:49:36 +0100 Subject: [PATCH 4/4] minor updates --- src/App.jsx | 9 ++-- src/pages/Blog/Blog.jsx | 35 +++++++------- src/pages/Blog/components/BlogList.jsx | 66 +++++++++++++------------- src/pages/faqs/Faqs.jsx | 24 ++++------ 4 files changed, 62 insertions(+), 72 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 56158ad..25b24cd 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,17 +3,16 @@ import { BrowserRouter, Route, Routes } from "react-router-dom"; import About from "./pages/about/About"; +import Blog from "./pages/Blog/Blog"; import Career from "./pages/career/Career"; import CauseDetails from "./pages/causes/CauseDetails"; import Causes from "./pages/causes/Causes"; import DonatePage from "./pages/causes/DonatePage"; import Contact from "./pages/contact/Contact"; import Donners from "./pages/donners/Donners"; +import Faqs from "./pages/faqs/Faqs"; import Home from "./pages/home/Home"; import Leadership from "./pages/leadership/Leadership"; -import Faqs from "./pages/faqs/Faqs"; -import Blog from "./pages/Blog/Blog"; -import BlogDetails from "./pages/Blog/BlogDetails"; function App() { return ( @@ -29,8 +28,8 @@ function App() { } /> } /> } /> - }/> - }/> + } /> + {/* }/> */} ); diff --git a/src/pages/Blog/Blog.jsx b/src/pages/Blog/Blog.jsx index ecfeb6b..3b26bb9 100644 --- a/src/pages/Blog/Blog.jsx +++ b/src/pages/Blog/Blog.jsx @@ -1,29 +1,28 @@ -import React from 'react' -import Header from "../../components/layout/Header"; +import React from "react"; import GeneralHero from "../../components/layout/GeneralHero"; -import image1 from "../../assets/images/Rectangle 2.png"; - +import Header from "../../components/layout/Header"; +import image1 from "/assets/images/Rectangle 2.png"; -import StatisticsSection from '../../components/layout/StatisticsSection'; -import Footer from '../../components/layout/Footer'; -import BlogList from './components /BlogList'; +import Footer from "../../components/layout/Footer"; +import StatisticsSection from "../../components/layout/StatisticsSection"; +import BlogList from "./components/BlogList"; function Blog() { - - return ( <> -
- - - +
+ - + - -
+ +
- ) + ); } -export default Blog \ No newline at end of file +export default Blog; diff --git a/src/pages/Blog/components/BlogList.jsx b/src/pages/Blog/components/BlogList.jsx index a08c3e6..4625bd0 100644 --- a/src/pages/Blog/components/BlogList.jsx +++ b/src/pages/Blog/components/BlogList.jsx @@ -1,41 +1,39 @@ -import React from 'react' -import BlogCard from '../../home/components/BlogCard'; -import image14 from "../../../assets/images/Rectangle 14.png"; -import Pagination from '../../../components/Pagination'; +import React from "react"; +import Pagination from "../../../components/Pagination"; +import BlogCard from "../../home/components/BlogCard"; +import image14 from "/assets/images/Rectangle 14.png"; + function BlogList() { -const blogId=1 - const day="25" - const month="Febuary" - const category="Education" - const title="Children Education Needs For Well The World." - const description="Children Education Needs For Well The World." - const author="Adam" + const blogId = 1; + const day = "25"; + const month = "Febuary"; + const category = "Education"; + const title = "Children Education Needs For Well The World."; + const description = "Children Education Needs For Well The World."; + const author = "Adam"; return ( <> -
- -
- {Array.from({ length: 12 }).map((_, index) => ( - - - ))} - -
+
+
+ {Array.from({ length: 12 }).map((_, index) => ( + + ))} +
- -
+ +
- ) + ); } -export default BlogList +export default BlogList; diff --git a/src/pages/faqs/Faqs.jsx b/src/pages/faqs/Faqs.jsx index d640e9a..79c36e9 100644 --- a/src/pages/faqs/Faqs.jsx +++ b/src/pages/faqs/Faqs.jsx @@ -1,24 +1,18 @@ -import React from 'react' -import Header from '../../components/layout/Header' -import Hero1 from '../../components/layout/Hero1' -import Footer from '../../components/layout/Footer' -import FaqsSection from './components/FaqsSection' - +import React from "react"; +import Footer from "../../components/layout/Footer"; +import Header from "../../components/layout/Header"; +import Hero1 from "../../components/layout/Hero1"; +// import FaqsSection from './components/FaqsSection' const Faqs = () => { return (
-
- - - +
+ -
); };