@museumwnf/viewer-layout 3.4.0 → 3.5.0
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 +70 -2
- package/dist/{FeaturedRecord-BJ8LaWGP.js → FeaturedRecord-DJfyvfqt.js} +1 -1
- package/dist/GlossaryPopover-DcptyNWI.js +654 -0
- package/dist/{ItemDetailView-I__hm63H.js → ItemDetailView-COWC8GDg.js} +15 -14
- package/dist/{OnDisplayIn-Dv8i7uvH.js → OnDisplayIn-BfJoPonn.js} +38 -38
- package/dist/RecordView-C9rP8TyQ.js +263 -0
- package/dist/{Theme-B5J0XRe1.js → Theme-CZ-OVXao.js} +24 -24
- package/dist/TimelineEventList-gsoc-SBx.js +841 -0
- package/dist/TimelineResultsView-C2-TnM71.js +1386 -0
- package/dist/{content-p0tqKkcD.js → content-CtwBcSjU.js} +2 -2
- package/dist/content.js +6 -5
- package/dist/dxa.js +351 -349
- package/dist/index.js +6 -5
- package/dist/standalone.js +762 -0
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +5 -4
- package/package.json +4 -3
- package/src/tokens.reference.css +66 -0
- package/dist/TimelineEventList-COjkXEzS.js +0 -1487
- package/dist/TimelineResultsView-ChkBn27W.js +0 -1640
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ all the packages:
|
|
|
20
20
|
| `@museumwnf/viewer-layout/dxa` | DXA family layer | the gallery and exhibition pages and shells, the family-only blocks, `standardRoutes`, `galleryConfig` / `exhibitionConfig` | the entries above, `@museumwnf/viewer-core` and `@museumwnf/viewer-core/dxa` |
|
|
21
21
|
| `@museumwnf/viewer-layout/dxa/gallery.css`, `/dxa/exhibition.css` | DXA family layer | each family's stylesheet: its fonts, page reset and page column, and its theme as a function of the palette | the palette a site's `theme/tokens.css` sets |
|
|
22
22
|
| `@museumwnf/viewer-layout/dxa/testing` | DXA family layer | each family's smoke test, `describeGallerySmoke` / `describeExhibitionSmoke` | the site's config, texts and package, in the site's own Vitest |
|
|
23
|
+
| `@museumwnf/viewer-layout/standalone` | standalone family layer | the chrome, home page, item sheet, text page and blocks of Discover Islamic Art, Discover Baroque Art and Sharing History | the entries above and `@museumwnf/viewer-core` |
|
|
23
24
|
| `@museumwnf/viewer-layout/style.css` | — | one stylesheet for every entry, the family styles included | — |
|
|
24
25
|
| `@museumwnf/viewer-layout/tokens.reference.css` | — | every token the package reads, with its fallback | — |
|
|
25
26
|
|
|
@@ -35,7 +36,8 @@ view does.
|
|
|
35
36
|
1. **Into the lowest layer that fits.** A block comes before a composed view,
|
|
36
37
|
and a composed view before a family page. A block is promoted here when
|
|
37
38
|
several websites need the same thing; a whole page is shared only inside
|
|
38
|
-
the DXA family
|
|
39
|
+
a family: the DXA family under `/dxa`, the standalone family under
|
|
40
|
+
`/standalone`.
|
|
39
41
|
2. **A generic component never defaults to one family's texts.** A block or a
|
|
40
42
|
composed view defaults to a shared entry (`core.*`, `record.*`,
|
|
41
43
|
`partner.*`, …) or takes the entry name as a prop; it never defaults to a
|
|
@@ -43,7 +45,8 @@ view does.
|
|
|
43
45
|
3. **A component only the DXA family uses belongs under `/dxa`.**
|
|
44
46
|
|
|
45
47
|
**The dependency runs one way.** The root, `/content`, `/views` and
|
|
46
|
-
`/components` never import from `/dxa
|
|
48
|
+
`/components` never import from `/dxa` or `/standalone`, and the two
|
|
49
|
+
families never import from each other. Each imports only what the other
|
|
47
50
|
entries publish, and `@museumwnf/viewer-core`. A component that moves
|
|
48
51
|
between entries keeps its old export as an alias until the websites have
|
|
49
52
|
moved; a major release then removes the alias.
|
|
@@ -702,6 +705,71 @@ Since 3.3.0 what every site of a family shared by copy is here once:
|
|
|
702
705
|
which processes this package (viewer-core's `defineViewerConfig` inlines
|
|
703
706
|
it).
|
|
704
707
|
|
|
708
|
+
## Standalone family pages
|
|
709
|
+
|
|
710
|
+
`@museumwnf/viewer-layout/standalone` is the family layer of Discover Islamic
|
|
711
|
+
Art, Discover Baroque Art and Sharing History: three sites legacy built from
|
|
712
|
+
one PHP template family, whose layouts match legacy's
|
|
713
|
+
(inventory-app#2233, decision D1). What they share is here once; what
|
|
714
|
+
differs is a config value, a token or a slot.
|
|
715
|
+
|
|
716
|
+
The shell is a `SiteShell`, so everything the site chrome contract above
|
|
717
|
+
reads works as on any site: `chrome` (the site's files under `theme/assets/`),
|
|
718
|
+
`navigation.placement` (legacy's menu sits under the home page's picture and
|
|
719
|
+
above every other page's band) and `navigation.socialLinks`. A site names
|
|
720
|
+
the shell in its `dataset.config.js` and sets `config.standalone` beside its
|
|
721
|
+
`navigation` (every key optional). Every picture is a key of the chrome map,
|
|
722
|
+
or a URL:
|
|
723
|
+
|
|
724
|
+
```js
|
|
725
|
+
import { mwnfSocialLinks } from '@museumwnf/viewer-layout'
|
|
726
|
+
import { StandaloneShell } from '@museumwnf/viewer-layout/standalone'
|
|
727
|
+
|
|
728
|
+
const chrome = import.meta.glob('../theme/assets/**/*.{jpg,jpeg,png,gif,svg}', {
|
|
729
|
+
eager: true, query: '?url', import: 'default',
|
|
730
|
+
})
|
|
731
|
+
|
|
732
|
+
export default {
|
|
733
|
+
shell: StandaloneShell,
|
|
734
|
+
chrome,
|
|
735
|
+
navigation: {
|
|
736
|
+
languages, links, footerLinks, sectionTitles, // as on every site
|
|
737
|
+
placement: ({ section }) => (section === 'home' ? 'after-banner' : 'before-banner'),
|
|
738
|
+
socialLinks: mwnfSocialLinks,
|
|
739
|
+
},
|
|
740
|
+
standalone: {
|
|
741
|
+
logo: { src: 'legacy/logo_isl_en.png', alt: 'islamicart.identity.title', href: mwnfLinks.portal, print: { en: 'legacy/logo_print.gif', fr: 'legacy/logo_print_fr.gif' } },
|
|
742
|
+
heading: 'islamicart.identity.heading', // the header's title on every page but the home page
|
|
743
|
+
headerLinks: [{ label, href | to, on: 'home' | 'inner' | 'all' }],
|
|
744
|
+
banner: { home: 'legacy/banner.jpg', inner: 'legacy/banner_inside.jpg' },
|
|
745
|
+
languages: true, // false: chrome in one language, no switcher
|
|
746
|
+
copyright: 'islamicart.footer.copyright', // the footer line; the year follows it
|
|
747
|
+
sponsors: { on: 'home' | 'all', columns: [{ lead, text, break, title, logos, links, width }] },
|
|
748
|
+
home: { links: [...], highlight: { list, heading, alsoKnownAs, action, route }, tiles: { caption, items } },
|
|
749
|
+
areas: { [section]: { logo, banner, class } }, // a section with chrome of its own
|
|
750
|
+
},
|
|
751
|
+
}
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
The shell hands the logo to SiteShell's `brand`. The logo, the print logo and
|
|
755
|
+
the banners may each be given once or per language (`{ en, ar }`).
|
|
756
|
+
|
|
757
|
+
| Export | What it is |
|
|
758
|
+
| --- | --- |
|
|
759
|
+
| `StandaloneShell` | `SiteShell` with legacy's chrome: the logo per language, the inner pages' centred heading and "Portal \| Home" links, the home page's picture banner, the inner pages' titled band (`navigation.sectionTitles`), the menu above or below the banner, the band above the footer on the home page, the copyright line with the year, a print-only logo. The page gets `.mwnf-standalone`, the scope of the family stylesheet |
|
|
760
|
+
| `StandaloneHome` | the home page's content: the side links and the record of the day, or a tile grid |
|
|
761
|
+
| `TodayHighlight` | legacy's "Today's highlight": the record for the day of the year from legacy's own list (`home_items_img.txt`), its picture and legacy's lines |
|
|
762
|
+
| `StandaloneItemSheet` | `RecordView` in legacy's three columns: the way back and the pictures; the sheet with its short-description toggle; the coloured Related Content column (`RelatedContent`), which takes the site's own blocks in its `sidebar` slot |
|
|
763
|
+
| `StandaloneTextPage` | a text page in legacy's centred column: a Markdown entry, an optional drop cap, a "→" link and Print |
|
|
764
|
+
| `StandaloneSponsors` | the band above the footer, in columns of text, logos and links |
|
|
765
|
+
| `StandaloneSubNav`, `StandaloneTileGrid`, `StandaloneSlider` | Sharing History's tab strip, picture tiles and slider |
|
|
766
|
+
| `byLanguage`, `dayOfYear`, `pickForDay`, `legacyHomeItemKey` | the plain functions the chrome reads with |
|
|
767
|
+
|
|
768
|
+
Every rule of the family's stylesheet is scoped to `.mwnf-standalone`, and
|
|
769
|
+
every value is a `--mwnf-standalone-*` token with a neutral fallback
|
|
770
|
+
(`tokens.reference.css`); a site's `theme/tokens.css` sets legacy's. It ships
|
|
771
|
+
in `style.css`, so a site imports nothing more.
|
|
772
|
+
|
|
705
773
|
## Theming
|
|
706
774
|
|
|
707
775
|
Every color, font, spacing, radius comes from a `--mwnf-*` CSS custom property with a neutral fallback. Full list: [`tokens.reference.css`](src/tokens.reference.css) (also exported as `@museumwnf/viewer-layout/tokens.reference.css`) — copy it into your website as `theme/tokens.css` and set values.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as e } from "./GlossaryPopover-DcptyNWI.js";
|
|
2
2
|
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u, useSlots as d, withCtx as f } from "vue";
|
|
3
3
|
//#region src/content/FeaturedRecord.vue
|
|
4
4
|
var p = {
|