@museumwnf/viewer-layout 3.79.0 → 3.80.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/dist/dxa.js +818 -781
- package/package.json +3 -3
- package/src/dxa/testing.js +69 -41
package/README.md
CHANGED
|
@@ -671,6 +671,52 @@ One page serves both families: `PartnerDetail`, the partner page
|
|
|
671
671
|
`galleryPartnerDetail` / `exhibitionPartnerDetail`, which `standardRoutes`
|
|
672
672
|
passes as its `family` prop.
|
|
673
673
|
|
|
674
|
+
### An exhibition's own choices
|
|
675
|
+
|
|
676
|
+
A legacy exhibition's package carries the site's own choices on its
|
|
677
|
+
exhibition record: the banner and home pictures, the welcome popup, which
|
|
678
|
+
timeline the menu offers, the partners it hides. A package built from the
|
|
679
|
+
inventory's own data (inventory-app#2727) carries none of them: the site sets
|
|
680
|
+
them in its `dataset.config.js`, and each one it sets wins over the package.
|
|
681
|
+
Since 3.80.0:
|
|
682
|
+
|
|
683
|
+
```js
|
|
684
|
+
const chrome = import.meta.glob('../theme/assets/**/*.{jpg,jpeg,png,gif,svg}', {
|
|
685
|
+
eager: true, query: '?url', import: 'default',
|
|
686
|
+
})
|
|
687
|
+
|
|
688
|
+
export default exhibitionConfig({
|
|
689
|
+
// … the values above, and:
|
|
690
|
+
chrome,
|
|
691
|
+
legacyRoutes: false, // a new site has no legacy addresses
|
|
692
|
+
home: { item: '<item id>', image: 'home.jpg' }, // the home page's picture and its caption's item
|
|
693
|
+
banner: { item: '<item id>', image: 'banner.jpg' }, // the other pages' banner
|
|
694
|
+
popup: { body: '<ns>.popup.body' }, // a locale entry, Markdown; false for none
|
|
695
|
+
timeline: 'site', // 'site', 'country' or false
|
|
696
|
+
hiddenPartners: ['<partner id>'],
|
|
697
|
+
})
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
- `home` and `banner`: `image` is a file under `theme/assets/` (through
|
|
701
|
+
`chrome`) or an address; without one, the item's own first picture. The
|
|
702
|
+
item's sheet captions the banner.
|
|
703
|
+
- `popup`: the notice shown once per visit; a picture in it is a file under
|
|
704
|
+
`theme/assets/`.
|
|
705
|
+
- `timeline`: `'site'` for the exhibition's own chronology (its
|
|
706
|
+
`source: 'site'` timeline), `'country'` for the worldwide one, `false` for
|
|
707
|
+
no Timeline menu entry.
|
|
708
|
+
- `hiddenPartners`: partners left off the lists and profile pages; their
|
|
709
|
+
items still show.
|
|
710
|
+
- `legacyRoutes: false` leaves out the legacy redirects.
|
|
711
|
+
|
|
712
|
+
An unknown key is reported in the console and ignored. Such a package also
|
|
713
|
+
differs in what it ships, and the family reads both shapes: a tag facet keys
|
|
714
|
+
on the tag's own `id` when it has no legacy id, a theme filter on the theme's
|
|
715
|
+
own `id`, a related-content entry is grouped by its `category` (the link
|
|
716
|
+
type: further reading and catalogues under Further reading, the rest under
|
|
717
|
+
Other content), and a theme with no sub-themes shows its own pictures in its
|
|
718
|
+
gallery.
|
|
719
|
+
|
|
674
720
|
An exhibition's theme pages read its three theme colours as
|
|
675
721
|
`--mwnf-dxa-theme-*` tokens; a record with no project gets the
|
|
676
722
|
`mwnf-chip--Explore` chip.
|