- {item.date} -
-- {item.title} -
-- {item.summary} -
-+"Our mission is to bring about meaningful and positive changes in the health and well-being of people with diff --git a/client/src/pages/News.tsx b/client/src/pages/News.tsx index 97496f7..fef7f5a 100644 --- a/client/src/pages/News.tsx +++ b/client/src/pages/News.tsx @@ -1,6 +1,7 @@ import React from "react"; import { SiteHeader } from "@/components/SiteHeader"; import { SiteFooter } from "@/components/SiteFooter"; +import { formatNewsDate, newsArticles } from "@/lib/news"; const navigationItems = [ { label: "Home", href: "/" }, @@ -10,27 +11,6 @@ const navigationItems = [ { label: "Contact", href: "/contact" }, ]; -const newsItems = [ - { - date: "Dec 2025", - title: "Winter sessions and holiday activities", - summary: - "Our winter timetable is live. Sessions continue with extra family days across December.", - }, - { - date: "Nov 2025", - title: "Volunteer spotlight: the team behind the yard", - summary: - "A huge thank you to our volunteers who keep everything running smoothly week to week.", - }, - { - date: "Oct 2025", - title: "New accessibility equipment supported by donors", - summary: - "We have added new adaptive tack to make sessions more comfortable and inclusive.", - }, -]; - export const News = (): JSX.Element => { return (@@ -67,24 +47,46 @@ export const News = (): JSX.Element => {-- - {newsItems.map((item) => ( -- - ))} +- {item.date} -
-- {item.title} -
-- {item.summary} -
-+ ++ {newsArticles.map((item) => ( ++ {item.image && ( + + )} + + ))} ++ {formatNewsDate(item.date)} +
+ ++ + {item.title} + +
++ {item.summary} +
+ + Read more + +diff --git a/client/src/pages/NewsArticle.tsx b/client/src/pages/NewsArticle.tsx new file mode 100644 index 0000000..d305464 --- /dev/null +++ b/client/src/pages/NewsArticle.tsx @@ -0,0 +1,79 @@ +import React from "react"; +import { useRoute } from "wouter"; +import { SiteHeader } from "@/components/SiteHeader"; +import { SiteFooter } from "@/components/SiteFooter"; +import { formatNewsDate, getNewsArticle } from "@/lib/news"; +import NotFound from "@/pages/not-found"; + +const navigationItems = [ + { label: "Home", href: "/" }, + { label: "About", href: "/about" }, + { label: "News", href: "/news" }, + { label: "Support Us", href: "/support" }, + { label: "Contact", href: "/contact" }, +]; + +export const NewsArticle = (): JSX.Element => { + const [, params] = useRoute("/news/:slug"); + const article = getNewsArticle(params?.slug ?? ""); + + if (!article) { + return ; + } + + return ( + ++ ); +}; diff --git a/client/src/pages/Privacy.tsx b/client/src/pages/Privacy.tsx new file mode 100644 index 0000000..e2a73f3 --- /dev/null +++ b/client/src/pages/Privacy.tsx @@ -0,0 +1,45 @@ +import React from "react"; +import { SiteHeader } from "@/components/SiteHeader"; +import { SiteFooter } from "@/components/SiteFooter"; + +const navigationItems = [ + { label: "Home", href: "/" }, + { label: "About", href: "/about" }, + { label: "News", href: "/news" }, + { label: "Support Us", href: "/support" }, + { label: "Contact", href: "/contact" }, +]; + +export const Privacy = (): JSX.Element => { + return ( ++ ++ + ++ +++ +++++ {formatNewsDate(article.date)} +
+ ++ {article.title} +
++ {article.summary} +
++ ++ +++ + Back to news + +++ ++ ); +}; diff --git a/package-lock.json b/package-lock.json index 2b34d19..97c811d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,6 +53,7 @@ "framer-motion": "^11.13.1", "input-otp": "^1.4.2", "lucide-react": "^0.453.0", + "marked": "^17.0.1", "memorystore": "^1.6.7", "next-themes": "^0.4.6", "passport": "^0.7.0", @@ -5642,6 +5643,18 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, + "node_modules/marked": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-17.0.1.tgz", + "integrity": "sha512-boeBdiS0ghpWcSwoNm/jJBwdpFaMnZWRzjA6SkUMYb40SVaN1x7mmfGKp0jvexGcx+7y2La5zRZsYFZI6Qpypg==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", diff --git a/package.json b/package.json index 3b806aa..db71ca2 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "framer-motion": "^11.13.1", "input-otp": "^1.4.2", "lucide-react": "^0.453.0", + "marked": "^17.0.1", "memorystore": "^1.6.7", "next-themes": "^0.4.6", "passport": "^0.7.0",+ + + ++ ++++ Privacy Policy +
++ Privacy Policy +
++ We respect your privacy and only collect the + information needed to respond to enquiries and + operate the site. +
++ We use Cloudflare Web Analytics, which does not use + cookies or track individuals. +
++