From be89f0e2d376f0032e9751d526a0fb3a4fcdc7a5 Mon Sep 17 00:00:00 2001 From: Garrett Dash Nelson Date: Tue, 7 Jan 2025 10:40:00 -0500 Subject: [PATCH] changes to deal with relative base URL --- astro.config.mjs | 4 +++- {public => src/assets}/arrow-left.svg | 0 {public => src/assets}/arrow-right.svg | 0 {public => src/assets}/brand-logo.png | Bin {public => src/assets}/lmec-logo.png | Bin src/components/LocationsNav.astro | 15 ++++++++++----- src/components/ObjectRecord.vue | 2 +- src/layouts/Layout.astro | 12 ++++++++---- src/pages/index.astro | 9 ++++++--- 9 files changed, 28 insertions(+), 14 deletions(-) rename {public => src/assets}/arrow-left.svg (100%) rename {public => src/assets}/arrow-right.svg (100%) rename {public => src/assets}/brand-logo.png (100%) rename {public => src/assets}/lmec-logo.png (100%) diff --git a/astro.config.mjs b/astro.config.mjs index 87761cf..89d14ec 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -7,5 +7,7 @@ import vue from '@astrojs/vue'; // https://astro.build/config export default defineConfig({ - integrations: [tailwind(), vue()] + integrations: [tailwind(), vue()], + site: 'https://www.leventhalmap.org', + base: '/digital-exhibitions/becoming-boston' }); \ No newline at end of file diff --git a/public/arrow-left.svg b/src/assets/arrow-left.svg similarity index 100% rename from public/arrow-left.svg rename to src/assets/arrow-left.svg diff --git a/public/arrow-right.svg b/src/assets/arrow-right.svg similarity index 100% rename from public/arrow-right.svg rename to src/assets/arrow-right.svg diff --git a/public/brand-logo.png b/src/assets/brand-logo.png similarity index 100% rename from public/brand-logo.png rename to src/assets/brand-logo.png diff --git a/public/lmec-logo.png b/src/assets/lmec-logo.png similarity index 100% rename from public/lmec-logo.png rename to src/assets/lmec-logo.png diff --git a/src/components/LocationsNav.astro b/src/components/LocationsNav.astro index 799e50c..9d8c0bf 100644 --- a/src/components/LocationsNav.astro +++ b/src/components/LocationsNav.astro @@ -1,6 +1,11 @@ --- import { getCollection } from 'astro:content'; import type { CollectionEntry } from 'astro:content'; +import { Image } from 'astro:assets'; + +import arrowRight from '../assets/arrow-right.svg' +import arrowLeft from '../assets/arrow-left.svg' + interface Props { current: CollectionEntry<'themes'>; @@ -30,22 +35,22 @@ entries.forEach((entry, i) => {
{previousEntry && - - Left arrow + + Left arrow Previous } {nextEntry && - + Next - Right arrow + Right arrow }
diff --git a/src/components/ObjectRecord.vue b/src/components/ObjectRecord.vue index bea8bcd..f005b45 100644 --- a/src/components/ObjectRecord.vue +++ b/src/components/ObjectRecord.vue @@ -19,7 +19,7 @@ import OpenSeadragon from '@components/OpenSeadragon.vue'; :id="uuidv4()" :options="{ tileSources: [objectInfo.image_source.src], - prefixUrl: '/openseadragon/', + prefixUrl: '/digital-exhibitions/becoming-boston/openseadragon/', preserveViewport: true, visibilityRatio: 1, defaultZoomLevel: 0, diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 07fa690..7b530a9 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,6 +1,10 @@ --- import { SEO } from "astro-seo"; +import { Image } from 'astro:assets'; +import brandLogo from '../assets/brand-logo.png'; +import lmecLogo from '../assets/lmec-logo.png'; + interface Props { title?: string; description?: string; @@ -51,8 +55,8 @@ const metaImage = "https://iiif.digitalcommonwealth.org/iiif/2/commonwealth:js95 {!hideHeader &&
@@ -64,14 +68,14 @@ const metaImage = "https://iiif.digitalcommonwealth.org/iiif/2/commonwealth:js95

Permissions All content in this digital exhibition, with the exception of object images from collections other than the Leventhal Map & Education Center, is licensed on a Creative Commons BY-ND 4.0 License.

-

Citation Garrett Dash Nelson et al., “{ title },” in Becoming Boston: Eight Moments in the Geography of a Changing City (Leventhal Map & Education Center at the Boston Public Library, 2022). https://www.leventhalmap.org/digital-exhibitions/becoming-boston{ Astro.url.pathname }

+

Citation Garrett Dash Nelson et al., “{ title ? title : "Introduction" },” in Becoming Boston: Eight Moments in the Geography of a Changing City (Leventhal Map & Education Center at the Boston Public Library, 2022). https://www.leventhalmap.org{ Astro.url.pathname }

Credits This exhibition was curated by Garrett Dash Nelson, together with the staff of the Leventhal Map & Education Center, including Ezra Acevedo, Emily Bowe, Lauren Chen, Michelle LeBlanc, Lynn Brown, Ian Spangler, Rachel Sharer, and Megan Nally. The physical exhibition was designed by Joelle Riffle.

diff --git a/src/pages/index.astro b/src/pages/index.astro index 66e2175..3056d07 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,6 +3,9 @@ import { getCollection } from 'astro:content'; import Layout from '@layouts/Layout.astro'; import Button from '@components/Button.astro'; +import { Image } from 'astro:assets'; + +import brandLogo from '../assets/brand-logo.png'; const entries = await getCollection('themes'); entries.sort((a, b) => a.data.order - b.data.order); @@ -17,9 +20,9 @@ const description = 'Becoming Boston: Eight Moments in the Geography of a Changi id="splash-image" class="absolute z-50 inset-0 w-full h-full flex justify-center items-center transition-opacity duration-1000 ease-in-out cursor-pointer" > - Becoming Boston
@@ -62,7 +65,7 @@ const description = 'Becoming Boston: Eight Moments in the Geography of a Changi