diff --git a/.env.example b/.env.example deleted file mode 100644 index c510f0e..0000000 --- a/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN= -NEXT_PUBLIC_MAPBOX_STYLE_URL= -NEXT_PUBLIC_SANITY_DATASET= -NEXT_PUBLIC_SANITY_PROJECT_ID= -NEXT_PUBLIC_FATHOM_TRACKING_CODE= diff --git a/.eslintrc.json b/.eslintrc.json index eb82587..24e1c6c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "extends": "next/core-web-vitals", "rules": { - "react/display-name": "off" + "react/jsx-key": "off" } } diff --git a/.gitignore b/.gitignore index c87c9b3..fd3dbb5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /node_modules /.pnp .pnp.js +.yarn/install-state.gz # testing /coverage @@ -23,7 +24,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -.pnpm-debug.log* # local env files .env*.local diff --git a/README.md b/README.md index c87e042..c403366 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,17 @@ First, run the development server: npm run dev # or yarn dev +# or +pnpm dev +# or +bun dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. ## Learn More diff --git a/app/(with-map)/entry/[slug]/EntryDetails.tsx b/app/(with-map)/entry/[slug]/EntryDetails.tsx new file mode 100644 index 0000000..26253e5 --- /dev/null +++ b/app/(with-map)/entry/[slug]/EntryDetails.tsx @@ -0,0 +1,54 @@ +import { + getFormattedTenureTypes, + getFormattedEntryDates, +} from "@/app/utils/sanity/entry" +import { Entry } from "@/app/utils/sanity/types" +import { Tag } from "@carbon/icons-react" +import EntryItem from "./EntryItem" +import EntryReferences from "./EntryReferences" +import EntryPortableText from "./EntryPortableText" + +const EntryDetails = (entry?: Entry) => ( +
+ This entry is{" "} + + {entry?.entryRating?.grade || "a draft"} + +
++ {term.patternClassName} {term.type.toLowerCase()} +
++ {term.meta?.description} +
+ {term?.description && ( +{term?.description}
+{children}
, + blockquote: ({ children }) => ( +{children}+ ), + h2: ({ children }) => ( +
{description}
} + {description &&{description}
} {pipe( items, A.map((item) => ( diff --git a/components/sidebar/AccordionItem.module.css b/app/ui/accordion/AccordionItem.module.css similarity index 100% rename from components/sidebar/AccordionItem.module.css rename to app/ui/accordion/AccordionItem.module.css diff --git a/components/sidebar/AccordionItem.tsx b/app/ui/accordion/AccordionItem.tsx similarity index 100% rename from components/sidebar/AccordionItem.tsx rename to app/ui/accordion/AccordionItem.tsx diff --git a/components/carousel/Carousel.module.css b/app/ui/carousel/Carousel.module.css similarity index 100% rename from components/carousel/Carousel.module.css rename to app/ui/carousel/Carousel.module.css diff --git a/components/carousel/Carousel.tsx b/app/ui/carousel/Carousel.tsx similarity index 67% rename from components/carousel/Carousel.tsx rename to app/ui/carousel/Carousel.tsx index f75b42b..df82e11 100644 --- a/components/carousel/Carousel.tsx +++ b/app/ui/carousel/Carousel.tsx @@ -1,19 +1,22 @@ -import css from "./Carousel.module.css" +import { getFormattedEntryDates } from "@/app/utils/sanity/entry" +import { CarouselEntry } from "@/app/utils/sanity/types" import { ArrowRight } from "@carbon/icons-react" -import { CarouselItem } from "@/lib/types" -import { getFormattedEntryDates } from "@/lib/entry" -import Link from "next/link" import clsx from "clsx" +import Link from "next/link" +import css from "./Carousel.module.css" export interface CarouselProps { - data?: CarouselItem[] + data?: CarouselEntry[] title: string cardClassNames?: string } -const CarouselItem = (props: { item: CarouselItem, cardClassNames: string | undefined }) => { +const CarouselItem = (props: { + item: CarouselEntry + cardClassNames: string | undefined +}) => { return ( - +{contributor}
+ ))} ++ The Atlas of Ownership is maintained by Open Systems Lab, non profit company + 9152368 registered in England and Wales +
+) + +export default Disclaimer diff --git a/components/Footer.module.css b/app/ui/footer/Footer.module.css similarity index 100% rename from components/Footer.module.css rename to app/ui/footer/Footer.module.css diff --git a/app/ui/footer/Footer.tsx b/app/ui/footer/Footer.tsx new file mode 100644 index 0000000..70ea934 --- /dev/null +++ b/app/ui/footer/Footer.tsx @@ -0,0 +1,19 @@ +import Contributors from "./Contributors" +import Disclaimer from "./Disclaimer" +import css from "./Footer.module.css" +import FooterLinks from "./FooterLinks" +import FooterLogos from "./FooterLogos" +import SocialIcons from "./SocialIcons" + +const Footer = () => { + return ( + + ) +} +export default Footer diff --git a/app/ui/footer/FooterLinks.tsx b/app/ui/footer/FooterLinks.tsx new file mode 100644 index 0000000..f3867a6 --- /dev/null +++ b/app/ui/footer/FooterLinks.tsx @@ -0,0 +1,41 @@ +import Link from "next/link" +import css from "./Footer.module.css" + +const FooterLinks = () => { + const pageLinks = [ + { title: "About", path: "/about" }, + { title: "Explore the patterns", path: "/patterns" }, + { title: "Licence", path: "/licence" }, + { title: "Accessibility", path: "/accessibility" }, + { title: "Terms of use", path: "/terms-of-use" }, + ] + + return ( +{truncate(entry.description, { length: 280, separator: " " })}
++ {truncate(entry?.content?.[0].children[0].text ?? "", { + length: 280, + separator: " ", + })} +