+ + {title} + +
+ {blurb && ( ++ {blurb} +
+ )} +diff --git a/astro.config.mjs b/astro.config.mjs index 425bdeb1..fc604999 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,6 +6,8 @@ import tailwindcss from '@tailwindcss/vite'; import { defineConfig, envField } from 'astro/config'; import { loadEnv } from 'vite'; import config from './public/config.json'; +import tina from '@tinacms/astro/integration'; +import { tinaAdminDevRedirect } from '@tinacms/astro/vite'; const { locales, default_locale: defaultLocale } = config.i18n; const { STATIC_BUILD } = loadEnv(process.env.STATIC_BUILD, process.cwd(), ''); @@ -22,7 +24,7 @@ export default defineConfig({ }, output: STATIC_BUILD === 'true' ? 'static' : 'server', adapter: netlify(), - integrations: [mdx(), sitemap(), react()], + integrations: [mdx(), sitemap(), react(), tina()], vite: { optimizeDeps: { esbuildOptions: { @@ -35,7 +37,7 @@ export default defineConfig({ noExternal: ['clsx', '@phosphor-icons/*', '@radix-ui/*'] } }, - plugins: [tailwindcss()], + plugins: [tailwindcss(), tinaAdminDevRedirect()], resolve: { preserveSymlinks: true, mainFields: [ diff --git a/deno.lock b/deno.lock index e1ede6e4..2a0a32e9 100644 --- a/deno.lock +++ b/deno.lock @@ -35,6 +35,7 @@ "npm:@samvera/clover-iiif@^2.9.1", "npm:@tailwindcss/typography@~0.5.20", "npm:@tailwindcss/vite@^4.3.2", + "npm:@tinacms/astro@0.6", "npm:@tinacms/cli@^2.5.1", "npm:@tinacms/datalayer@^2.0.25", "npm:@turf/turf@^7.3.5", diff --git a/package-lock.json b/package-lock.json index 6bf54a5b..1c04a1a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "@peripleo/peripleo": "^0.8.9", "@samvera/clover-iiif": "^2.9.1", "@tailwindcss/vite": "^4.3.2", + "@tinacms/astro": "^0.6.0", "@tinacms/cli": "^2.5.1", "@tinacms/datalayer": "^2.0.25", "@turf/turf": "^7.3.5", @@ -694,9 +695,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -713,9 +711,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -732,9 +727,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -751,9 +743,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2630,9 +2619,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "optional": true, "os": [ "linux" @@ -2645,9 +2631,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "optional": true, "os": [ "linux" @@ -2660,9 +2643,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "optional": true, "os": [ "linux" @@ -2675,9 +2655,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "optional": true, "os": [ "linux" @@ -3280,6 +3257,19 @@ } } }, + "node_modules/@cu-mkp/editioncrafter/node_modules/@types/react": { + "version": "17.0.93", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.93.tgz", + "integrity": "sha512-KM4Ty/ZTLZupiYxZVAlP+InNJS3De6uBMdq0ePa6/04+eG9Y7ftnWfst1xTLQ5rwAhgHwQ4momt/O4KepdGBTw==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "^0.16", + "csstype": "^3.2.2" + } + }, "node_modules/@cu-mkp/editioncrafter/node_modules/@types/unist": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", @@ -8926,9 +8916,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -8949,9 +8936,6 @@ "cpu": [ "arm" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -8972,9 +8956,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -8995,9 +8976,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -9018,9 +8996,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -9041,9 +9016,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -9296,6 +9268,21 @@ } } }, + "node_modules/@performant-software/shared-components/node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "optional": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/@peripleo/maplibre": { "version": "0.8.9", "resolved": "https://registry.npmjs.org/@peripleo/maplibre/-/maplibre-0.8.9.tgz", @@ -11431,6 +11418,21 @@ "node": ">= 20.19.4" } }, + "node_modules/@react-native/dev-middleware/node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/@react-native/dev-middleware/node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", @@ -11865,9 +11867,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -11884,9 +11883,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -11903,9 +11899,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -11922,9 +11915,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -11941,9 +11931,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -11960,9 +11947,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -12515,6 +12499,17 @@ "react-native": ">0.69" } }, + "node_modules/@solana-mobile/mobile-wallet-adapter-protocol-web3js/node_modules/@types/react": { + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, "node_modules/@solana-mobile/mobile-wallet-adapter-protocol-web3js/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -12656,6 +12651,21 @@ "license": "MIT", "peer": true }, + "node_modules/@solana-mobile/mobile-wallet-adapter-protocol-web3js/node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/@solana-mobile/mobile-wallet-adapter-protocol-web3js/node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", @@ -12735,6 +12745,17 @@ } } }, + "node_modules/@solana-mobile/wallet-adapter-mobile/node_modules/@types/react": { + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, "node_modules/@solana-mobile/wallet-adapter-mobile/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -12885,6 +12906,21 @@ "optional": true, "peer": true }, + "node_modules/@solana-mobile/wallet-adapter-mobile/node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/@solana-mobile/wallet-adapter-mobile/node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", @@ -12964,6 +13000,17 @@ "react-native": ">0.69" } }, + "node_modules/@solana-mobile/wallet-standard-mobile/node_modules/@types/react": { + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, "node_modules/@solana-mobile/wallet-standard-mobile/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -13105,6 +13152,21 @@ "license": "MIT", "peer": true }, + "node_modules/@solana-mobile/wallet-standard-mobile/node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/@solana-mobile/wallet-standard-mobile/node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", @@ -13941,9 +14003,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13960,9 +14019,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -13979,9 +14035,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -13998,9 +14051,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -14310,6 +14360,18 @@ "node": ">=14.17" } }, + "node_modules/@tinacms/astro": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@tinacms/astro/-/astro-0.6.0.tgz", + "integrity": "sha512-bHKUkCkS6ISN0RbD1kLW4olA1RP1UkJP2KT0tQapJYeLZmkqUKaiiqvMtm7gvBzgFUEwWntVbsJjTATjvGYt9w==", + "license": "Apache-2.0", + "dependencies": { + "@tinacms/bridge": "0.3.0" + }, + "peerDependencies": { + "astro": "^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, "node_modules/@tinacms/bridge": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tinacms/bridge/-/bridge-0.3.0.tgz", @@ -19527,6 +19589,14 @@ "@types/node": "*" } }, + "node_modules/@types/scheduler": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/@types/send": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", @@ -31511,6 +31581,21 @@ "license": "MIT", "peer": true }, + "node_modules/jayson/node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/jayson/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -32706,9 +32791,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -32729,9 +32811,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -32752,9 +32831,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -32775,9 +32851,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -36036,6 +36109,21 @@ "node": ">=0.10.0" } }, + "node_modules/metro/node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/metro/node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", @@ -40719,6 +40807,21 @@ "ws": "^7" } }, + "node_modules/react-devtools-core/node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/react-devtools-core/node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", @@ -41681,6 +41784,14 @@ } } }, + "node_modules/recharts/node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/recma-build-jsx": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/recma-build-jsx/-/recma-build-jsx-1.0.0.tgz", diff --git a/package.json b/package.json index ab7f32ab..fe128316 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@peripleo/peripleo": "^0.8.9", "@samvera/clover-iiif": "^2.9.1", "@tailwindcss/vite": "^4.3.2", + "@tinacms/astro": "^0.6.0", "@tinacms/cli": "^2.5.1", "@tinacms/datalayer": "^2.0.25", "@turf/turf": "^7.3.5", diff --git a/src/apps/pages/Banner.astro b/src/apps/pages/Banner.astro index c3a14053..990713a6 100644 --- a/src/apps/pages/Banner.astro +++ b/src/apps/pages/Banner.astro @@ -1,10 +1,11 @@ --- import clsx from 'clsx'; import Container from '@components/Container.astro'; -import LinkButton from '@components/LinkButton'; +import LinkButton from '@components/LinkButton.astro'; import SearchBar from '@apps/pages/SearchBar'; import RichText from '@components/RichText.astro'; import { toBackgroundClass } from '@utils/pageBuilder'; +import { tinaField } from '@tinacms/astro/tina-field'; const Height = { small: 'small', @@ -28,7 +29,9 @@ const { subtitle, textAlignment, title, - url + url, + section, + isTinaPreview } = Astro.props; --- @@ -82,6 +85,7 @@ const { hero && 'banner-hero', home && 'banner-home' )} + data-tina-field={tinaField(section, 'title')} > { title } @@ -89,6 +93,7 @@ const { { subtitle && (
{ subtitle }
@@ -96,6 +101,7 @@ const { { url && (+
{ quote }
diff --git a/src/apps/pages/Images.astro b/src/apps/pages/Images.astro index 5ca73357..90cec351 100644 --- a/src/apps/pages/Images.astro +++ b/src/apps/pages/Images.astro @@ -1,8 +1,9 @@ --- import ImageWithCitation from '@components/ImageWithCitation.astro'; +import { tinaField } from '@tinacms/astro/tina-field'; import _ from 'underscore'; -const { items, title } = Astro.props; +const { items, title, section } = Astro.props; ---
{ link.label }
+{ link.label }
)) } diff --git a/src/apps/pages/MultiColumn.astro b/src/apps/pages/MultiColumn.astro index 902bba5b..6c583611 100644 --- a/src/apps/pages/MultiColumn.astro +++ b/src/apps/pages/MultiColumn.astro @@ -10,7 +10,8 @@ const { buttonText, content, darken, - gap, + gap, + t, textAlignment, title, url @@ -34,6 +35,7 @@ const { buttonText={buttonText} textAlignment={textAlignment} title={title} + t={t} url={url} content={content} gap={gap} diff --git a/src/apps/pages/Page.astro b/src/apps/pages/Page.astro index 3c879274..9a534c2a 100644 --- a/src/apps/pages/Page.astro +++ b/src/apps/pages/Page.astro @@ -1,26 +1,41 @@ --- -import { fetchPage } from '@backend/tina'; import PageBody from '@components/PageBody.astro'; -import PageStoreProvider from '@components/PageStoreProvider'; import { setCacheControl } from '@utils/url'; +import { tinaField } from '@tinacms/astro/tina-field'; +import Header from '@layouts/Header.astro'; +import clsx from 'clsx'; +import branding from '@branding'; -const { slug } = Astro.props; -const locale = Astro.currentLocale; - -const page = await fetchPage(locale, slug); +const { page, isTinaPreview, t } = Astro.props; setCacheControl(Astro.response.headers); --- - -+ { props.description } +
+ )} + { !_.isEmpty(props.url) && ( +- { props.description } -
- )} - { !_.isEmpty(props.url) && ( -+ {blurb} +
+ )} +{blurb}
@@ -92,21 +89,15 @@ const Card = (props: Props) => {- {labels.byline} -
-+ {labels.byline} +
{ item?.description }
@@ -85,10 +92,13 @@ const BlockTypes = { readMore: t('readMore') }} title={item.title} + item={item} /> )} -{ item.__typename.endsWith(BlockTypes.contactForm) && ( + + +{ !isTinaPreview && item.__typename.endsWith(BlockTypes.contactForm) && (+
{ item.quote }
{ item.border_color &&+
{ item.attribution }
{ item.count }
{ item.type || 'records' }
@@ -139,13 +149,13 @@ const BlockTypes = { )} { item.__typename.endsWith(BlockTypes.linkRow) && ( -