diff --git a/app/[locale]/[...uriSegments]/page.tsx b/app/[locale]/[...uriSegments]/page.tsx index 7d4f07ad..c623013d 100644 --- a/app/[locale]/[...uriSegments]/page.tsx +++ b/app/[locale]/[...uriSegments]/page.tsx @@ -102,7 +102,6 @@ export async function generateStaticParams({ const sectionMap = { events: EventPageTemplate, - // galleryItems: GalleryPageTemplate, glossaryTerms: GlossaryPageTemplate, news: NewsPageTemplate, searchResults: SearchPageTemplate, diff --git a/components/content-blocks/SlideBlock/index.js b/components/content-blocks/SlideBlock/index.js index c386bcce..74e06928 100644 --- a/components/content-blocks/SlideBlock/index.js +++ b/components/content-blocks/SlideBlock/index.js @@ -32,9 +32,7 @@ const SlideBlock = ({ // get manually-curated data first. This has some filtering for missing entries (deleted in craft) let allItems = []; - if (dynamicComponent === "galleryItems") { - allItems = normalizeItemData(items, "galleryEntry"); - } else if (dynamicComponent === "staffProfiles") { + if (dynamicComponent === "staffProfiles") { allItems = normalizeItemData(items, "staffEntry"); truncate = 50; } @@ -74,10 +72,6 @@ const SlideBlock = ({ const makePretitle = (cat, type) => { if (type === "slideshow") { return t(`gallery.slideshow`); - } else if (type === "galleryItem") { - return cat?.[0]?.slug - ? t(`gallery.${cat[0].slug}`) - : t(`gallery.gallery`); } return null; }; diff --git a/components/dynamic/DataList/index.js b/components/dynamic/DataList/index.js index 28b6c1fd..8d2d5b3e 100644 --- a/components/dynamic/DataList/index.js +++ b/components/dynamic/DataList/index.js @@ -34,7 +34,6 @@ const DataList = ({ const listTypeMap = { newsPosts: "news-post", pressReleases: "press-release", - imageGalleryItems: "image", videoGalleryItems: "video", }; const listType = categories.find((c) => c.slug === listTypeMap[component]); diff --git a/components/dynamic/GalleryList/index.js b/components/dynamic/GalleryList/index.js deleted file mode 100644 index 52380fbc..00000000 --- a/components/dynamic/GalleryList/index.js +++ /dev/null @@ -1,35 +0,0 @@ -import PropTypes from "prop-types"; -import { useTranslation } from "react-i18next"; -import DataList from "@/dynamic/DataList"; -import { MasonryGrid } from "@rubin-epo/epo-react-lib"; - -const GalleryList = ({ excludeId = null, limit = 20, component }) => { - const { t } = useTranslation(); - - return ( -
- - {({ entries }) => ( - <> - {entries?.length > 0 && } - - )} - -
- ); -}; - -GalleryList.propTypes = { - excludeId: PropTypes.string, - limit: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - component: PropTypes.node, -}; - -export default GalleryList; diff --git a/components/dynamic/SearchList/index.js b/components/dynamic/SearchList/index.js index a6c310a1..a6f3e6ff 100644 --- a/components/dynamic/SearchList/index.js +++ b/components/dynamic/SearchList/index.js @@ -45,33 +45,6 @@ const SearchList = ({ }; let customBreadcrumbs; - if (entry.typeHandle === "galleryItem") { - customBreadcrumbs = makeCustomBreadcrumbs(rootPages, "Gallery"); - // add category strings and pre-filtered crumb: id, title, uri - let typeId = ""; - let typeTitlePlural = ""; - let typeSlug = "gallery"; - - if (entry.galleryItemCategory.length > 0) { - typeId = entry.galleryItemCategory[0].id; - typeTitlePlural = t( - `gallery.plural-${entry.galleryItemCategory[0].slug}` - ); - typeSlug = entry.galleryItemCategory[0].slug; - - customBreadcrumbs.push({ - id: typeId, - title: typeTitlePlural, - uri: `gallery/gallery-search?filter=${typeId}`, - }); - } - return ( - - ); - } if (entry.typeHandle === "slideshow") { customBreadcrumbs = makeCustomBreadcrumbs(rootPages, "Slideshows"); return ( @@ -89,7 +62,6 @@ const SearchList = ({ const makeSubtitle = (entry) => { const type = { - galleryItem: t("gallery.gallery-item"), slideshow: t("gallery.slideshow"), events: t("events.event"), job: t("jobs.job"), diff --git a/components/dynamic/index.js b/components/dynamic/index.js index e465d7c5..53c2b09b 100644 --- a/components/dynamic/index.js +++ b/components/dynamic/index.js @@ -1,5 +1,4 @@ import EventList from "./EventList"; -import GalleryList from "./GalleryList"; import JobList from "./JobList"; import NewsList from "./NewsList"; import RelatedList from "./RelatedList"; @@ -12,7 +11,6 @@ export default { EventList, JobList, NewsList, - GalleryList, RelatedList, SearchList, SlideshowList, diff --git a/components/factories/DynamicComponentFactory.js b/components/factories/DynamicComponentFactory.js index f3b0d72b..1fdea988 100644 --- a/components/factories/DynamicComponentFactory.js +++ b/components/factories/DynamicComponentFactory.js @@ -1,6 +1,5 @@ import PropTypes from "prop-types"; import EventList from "@/components/dynamic/EventList"; -import GalleryList from "@/dynamic/GalleryList"; import JobList from "@/dynamic/JobList"; import NewsList from "@/dynamic/NewsList"; import RelatedList from "@/dynamic/RelatedList"; @@ -13,9 +12,6 @@ import GlossaryList from "@/dynamic/GlossaryList"; const componentMap = { alertStream: TempList, events: EventList, - galleryItems: GalleryList, - imageGalleryItems: GalleryList, - videoGalleryItems: GalleryList, jobs: JobList, news: NewsList, newsPosts: NewsList, diff --git a/components/page/Aside/patterns/Media/index.js b/components/page/Aside/patterns/Media/index.js index 8f912ef4..2599a0f4 100644 --- a/components/page/Aside/patterns/Media/index.js +++ b/components/page/Aside/patterns/Media/index.js @@ -62,20 +62,6 @@ export default function MediaAside({ ); - } else if (a.galleryItem?.length > 0) { - if (a.galleryItem[0].uri) { - return ( - - - - ); - } } })} diff --git a/components/page/FilterBar/index.js b/components/page/FilterBar/index.js index dd47b134..57adb524 100644 --- a/components/page/FilterBar/index.js +++ b/components/page/FilterBar/index.js @@ -23,7 +23,6 @@ const FilterBar = ({ filterType, setLiveRegionMessage }) => { const { categories } = useGlobalData(); const filterMap = { events: "eventFilters", - galleryItems: "galleryTypes", jobs: "jobTypes", news: "newsFilters", staffProfiles: "staffFilters", diff --git a/components/templates/GalleryPage/index.js b/components/templates/GalleryPage/index.js deleted file mode 100644 index 9b5b9a71..00000000 --- a/components/templates/GalleryPage/index.js +++ /dev/null @@ -1,305 +0,0 @@ -/* eslint-disable */ -import React from "react"; -import PropTypes from "prop-types"; -import styled from "styled-components"; -import Link from "next/link"; -import { useTranslation } from "react-i18next"; -import { - createLocationString, - useCustomBreadcrumbs, - useDateString, -} from "@/lib/utils"; -import Breadcrumbs from "@/page/Breadcrumbs"; -import { - Container, - ResponsiveImage, - Buttonish, - Accordion, -} from "@rubin-epo/epo-react-lib"; -import { containerNarrow, respond } from "@/styles/globalStyles"; - -export default function GalleryPage({ - data: { - entry: { - assetVariants, - credit, - customDateCreated, - openGraphImage, - galleryItemCategory, - galleryItemTags, - id, - metadataDate, - metadataVersion, - publisher, - publisherId, - richTextDescription, - subLocation, - title, - uri, - usageTerms, - videoUrl, - }, - globals: { - creditDefault, - metadataVersionDefault, - publisherDefault, - publisherIdDefault, - usageTermsDefault, - }, - }, -}) { - const { t } = useTranslation(); - - const customBreadcrumbs = useCustomBreadcrumbs("Gallery"); - - // add category strings and pre-filtered crumb: id, title, uri - let typeId = ""; - let typeTitlePlural = ""; - let typeSlug = "gallery"; - - if (galleryItemCategory.length > 0) { - typeId = galleryItemCategory[0].id; - typeTitlePlural = t(`gallery.plural-${galleryItemCategory[0].slug}`); - typeSlug = galleryItemCategory[0].slug; - - customBreadcrumbs.push({ - id: typeId, - title: typeTitlePlural, - uri: `gallery?filter=${typeId}`, - }); - } - - const rootHomeLink = customBreadcrumbs.slice(-1)[0]; - const galleryHomeLink = customBreadcrumbs.slice(0, 1)[0]; - const pageLink = { - id, - uri, - title, - }; - - const image = openGraphImage[0]; - - // localized dates - const localizedMetadataDate = useDateString(metadataDate); - const localizedCustomDate = useDateString(customDateCreated); - - // logic for displaying city/state in US, city/country outside - let loc; - if (subLocation.length > 0) { - loc = - subLocation[0].title + - ", " + - createLocationString( - subLocation[0].city, - subLocation[0].state, - subLocation[0].country - ); - } - - const SecondaryInfo = () => ( - <> - {assetVariants.length > 0 && - assetVariants.map((a, i) => { - if (a.assetHeader) { - return ( -

- {a.assetHeader} -

- ); - } else if (a.assetLink?.length > 0) { - return ( - - - {a.assetName || t(`gallery.${a.commonName}`)} - - {a.assetLink[0].kind === "image" - ? ` (${a.assetLink[0].width} x ${a.assetLink[0].height})` - : ` - ${(parseInt(a.assetLink[0].size) / 1000).toFixed( - 1 - )} MB`} - - ); - } else { - return null; - } - })} - {galleryItemTags?.length > 0 && ( - <> -

{t(`gallery.tags`)}

- {galleryItemTags.map((tag, i) => ( - - {`#${tag.title} `} - - ))} - - )} - - ); - - return ( - <> - - -

{title}

-
- - {videoUrl ? ( -