@museumwnf/viewer-layout 3.70.0 → 3.71.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 +40 -27
- package/dist/{Theme-DmcJnG3h.js → Theme-DvCv48p7.js} +119 -123
- package/dist/TimelineResultsView-Bn4rC_Se.js +614 -0
- package/dist/dxa.js +509 -489
- package/dist/minisite.js +837 -735
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +1 -1
- package/package.json +6 -4
- package/src/minisite/testing.js +281 -0
- package/src/styles/dxa-exhibition.css +14 -1
- package/src/styles/dxa-gallery.css +9 -3
- package/dist/TimelineResultsView-BF3VoCs_.js +0 -686
package/dist/views.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./FeaturedRecord-Fe19w6_G.js";
|
|
2
|
-
import { n, r, t as i } from "./TimelineResultsView-
|
|
2
|
+
import { n, r, t as i } from "./TimelineResultsView-Bn4rC_Se.js";
|
|
3
3
|
import { t as a } from "./RecordView-CBC7tBCX.js";
|
|
4
4
|
import { t as o } from "./GlossaryPopover-DbQKXhx9.js";
|
|
5
5
|
import { d as s, i as ee, l as te, n as c } from "./PartnerMap-DdyMLtgH.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@museumwnf/viewer-layout",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.71.0",
|
|
4
4
|
"description": "Page structure for MWNF websites: PageShell composing seven optional, token-styled sections, the content components a page is made of, and the composed views a website names instead of writing a page.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"src/tokens.reference.css",
|
|
18
18
|
"src/styles/dxa-gallery.css",
|
|
19
19
|
"src/styles/dxa-exhibition.css",
|
|
20
|
-
"src/dxa/testing.js"
|
|
20
|
+
"src/dxa/testing.js",
|
|
21
|
+
"src/minisite/testing.js"
|
|
21
22
|
],
|
|
22
23
|
"main": "./dist/index.js",
|
|
23
24
|
"module": "./dist/index.js",
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"./dxa/gallery.css": "./src/styles/dxa-gallery.css",
|
|
33
34
|
"./dxa/exhibition.css": "./src/styles/dxa-exhibition.css",
|
|
34
35
|
"./dxa/testing": "./src/dxa/testing.js",
|
|
36
|
+
"./minisite/testing": "./src/minisite/testing.js",
|
|
35
37
|
"./style.css": "./dist/viewer-layout.css",
|
|
36
38
|
"./tokens.reference.css": "./src/tokens.reference.css"
|
|
37
39
|
},
|
|
@@ -43,12 +45,12 @@
|
|
|
43
45
|
"test": "vitest run"
|
|
44
46
|
},
|
|
45
47
|
"peerDependencies": {
|
|
46
|
-
"@museumwnf/viewer-core": "^2.
|
|
48
|
+
"@museumwnf/viewer-core": "^2.21.0",
|
|
47
49
|
"vue": "^3.5.0",
|
|
48
50
|
"vue-router": "^4.5.0 || ^5.0.0"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
|
-
"@museumwnf/viewer-core": "^2.
|
|
53
|
+
"@museumwnf/viewer-core": "^2.21.0",
|
|
52
54
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
53
55
|
"@vue/test-utils": "^2.5.1",
|
|
54
56
|
"jsdom": "^30.1.3",
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// The mini-sites' smoke tests, written once (`@museumwnf/viewer-layout/minisite/testing`).
|
|
2
|
+
//
|
|
3
|
+
// Every mini-site of a family renders the same pages (minisiteConfig() and its
|
|
4
|
+
// siblings), so the family shares one smoke test. A site's own
|
|
5
|
+
// tests/smoke.test.js calls it with what only the site knows: its config, its
|
|
6
|
+
// minisite.json, its texts, its chrome's SOURCES.json and its text namespace.
|
|
7
|
+
// The family is minisite.json's `family`: `ISL` (Discover Islamic Art's
|
|
8
|
+
// exhibitions), `GAI` (its Artistic Introduction), `BAR` (Discover Baroque
|
|
9
|
+
// Art's) or `SH` (Sharing History's). A site may add tests of its own after
|
|
10
|
+
// the call.
|
|
11
|
+
//
|
|
12
|
+
// Runs inside the site's own Vitest, as ../dxa/testing.js does: `vitest`,
|
|
13
|
+
// node:fs and the data package resolve from the site.
|
|
14
|
+
import { readFileSync } from 'node:fs'
|
|
15
|
+
import { describe, expect, it, vi } from 'vitest'
|
|
16
|
+
import { mergeMessages } from '@museumwnf/viewer-core'
|
|
17
|
+
import {
|
|
18
|
+
checkChromeSources, checkOfferedLanguages, checkRoutes, checkSectionMeta, checkTextsRendered, mountSite as mountOn,
|
|
19
|
+
} from '@museumwnf/viewer-core/testing'
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const WAIT = { timeout: 20000 }
|
|
23
|
+
|
|
24
|
+
// What legacy's address and the theme file of each family look like, the
|
|
25
|
+
// marks that a copy of a template has become a mini-site.
|
|
26
|
+
// Each family's text set; the same names as exhibition.js's LABELS, repeated
|
|
27
|
+
// because this file ships as source on its own, without the built entry.
|
|
28
|
+
const LABEL_SETS = { ISL: 'minisite', GAI: 'minisiteArtIntro', BAR: 'minisiteBaroque', SH: 'minisiteSharingHistory' }
|
|
29
|
+
|
|
30
|
+
const FAMILIES = {
|
|
31
|
+
ISL: { legacy: /^https:\/\/.+\/exhibitions\//, token: '--minisite-' },
|
|
32
|
+
GAI: { legacy: /^https:\/\/.+\/gai\//, token: '--minisite-' },
|
|
33
|
+
BAR: { legacy: /^https:\/\/.+\/exhibitions\/BAR\//, token: '--minisite-' },
|
|
34
|
+
SH: { legacy: /^https:\/\/sharinghistory\.museumwnf\.org\/exhibitions\/AWE\//, token: '--sh-head-bg' },
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The family's smoke test, against this site's own dataset:
|
|
39
|
+
* - `config`, `exhibition` — the site's dataset.config.js and minisite.json;
|
|
40
|
+
* - `sharedTexts`, `ownTexts` — its family's viewer-i18n bundle and its
|
|
41
|
+
* locales/en.json, merged as main.js merges them;
|
|
42
|
+
* - `sources` — theme/assets/legacy/SOURCES.json, its chrome's provenance;
|
|
43
|
+
* - `namespace` — its own texts' namespace (package.json `viewerI18n.namespace`).
|
|
44
|
+
*/
|
|
45
|
+
export function describeMinisiteSmoke({ config, exhibition, sharedTexts, ownTexts, sources, namespace }) {
|
|
46
|
+
const family = exhibition.family ?? 'ISL'
|
|
47
|
+
const marks = FAMILIES[family]
|
|
48
|
+
if (!marks) throw new Error(`describeMinisiteSmoke: unknown family "${family}" in minisite.json.`)
|
|
49
|
+
const messages = mergeMessages(sharedTexts, { en: ownTexts })
|
|
50
|
+
const mountSite = (hash) => mountOn(config, messages, hash)
|
|
51
|
+
const namespaces = [config.minisite?.texts ?? LABEL_SETS[family], namespace, 'core', 'layout']
|
|
52
|
+
|
|
53
|
+
describe('mini-site smoke test', () => {
|
|
54
|
+
// A copy of the family's template is not a mini-site until inventory-app's
|
|
55
|
+
// scripts/minisites generator has written what legacy configured for it:
|
|
56
|
+
// the settings, the theme and the frame's pictures.
|
|
57
|
+
it("carries this site's own settings, theme and pictures", () => {
|
|
58
|
+
expect(exhibition.legacy).toMatch(marks.legacy)
|
|
59
|
+
if (family === 'ISL' || family === 'BAR') expect(exhibition.curators.length).toBeGreaterThan(0)
|
|
60
|
+
if (family === 'SH') expect(exhibition.profiles.length).toBeGreaterThan(0)
|
|
61
|
+
expect(readFileSync('theme/tokens.css', 'utf8')).toContain(marks.token)
|
|
62
|
+
expect(Object.keys(sources.files).length).toBeGreaterThan(0)
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it('holds the chrome taken from legacy, byte for byte, and nothing else', () => {
|
|
66
|
+
expect(checkChromeSources(sources)).toEqual([])
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
it('declares the entities every route reads, and the section it belongs to', () => {
|
|
70
|
+
for (const route of config.extraViews) expect(Array.isArray(route.meta?.entities), route.name).toBe(true)
|
|
71
|
+
expect(checkSectionMeta(config)).toEqual([])
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
it('publishes no generic entity pages', () => {
|
|
75
|
+
expect(config.features.entities).toEqual([])
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
it('offers the languages the package declares, where the exhibition has texts in them', () => {
|
|
79
|
+
const rule = family === 'ISL' || family === 'GAI' ? { entity: 'collections' } : undefined
|
|
80
|
+
expect(checkOfferedLanguages(config, rule)).toEqual([])
|
|
81
|
+
expect(config.languages.length).toBeGreaterThan(0)
|
|
82
|
+
expect(config.navigation.languages.map((l) => l.code)).toEqual(config.languages)
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
PAGES[family]({ config, mountSite, namespaces })
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ── Each family's pages ────────────────────────────────────────────────────
|
|
90
|
+
|
|
91
|
+
const PAGES = {
|
|
92
|
+
ISL({ config, mountSite, namespaces }) {
|
|
93
|
+
it('draws the home page: the title, the menu and the curators', async () => {
|
|
94
|
+
const { app, host } = await mountSite('#/?lang=en')
|
|
95
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-minisite-home__title')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
96
|
+
// The introduction and one entry per theme.
|
|
97
|
+
expect(host.querySelectorAll('.mwnf-minisite-home__menu div').length).toBeGreaterThan(1)
|
|
98
|
+
expect(host.querySelectorAll('.mwnf-minisite-partners__curator').length).toBe(config.minisite.curators.length)
|
|
99
|
+
// The frame: the menu over the footer, legacy's links in its order.
|
|
100
|
+
expect(host.querySelectorAll('.mwnf-minisite-menu li').length).toBe(config.navigation.menu.length)
|
|
101
|
+
app.unmount()
|
|
102
|
+
}, 30000)
|
|
103
|
+
|
|
104
|
+
it('draws the introduction: its text and its captioned pictures', async () => {
|
|
105
|
+
const { app, host } = await mountSite('#/introduction?lang=en')
|
|
106
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-minisite-intro__content')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
107
|
+
// The captions come with the items' texts, which may arrive after the introduction's.
|
|
108
|
+
await vi.waitFor(() => expect(host.querySelectorAll('.mwnf-minisite-intro-item strong').length).toBeGreaterThan(0), WAIT)
|
|
109
|
+
app.unmount()
|
|
110
|
+
}, 30000)
|
|
111
|
+
|
|
112
|
+
it('draws an exhibition page: thumbnails, the item on show and its caption', async () => {
|
|
113
|
+
const { app, host } = await mountSite('#/exhibition/1/1?lang=en')
|
|
114
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-minisite-page__caption strong')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
115
|
+
expect(host.querySelectorAll('.mwnf-minisite-page__thumbs a').length).toBeGreaterThan(0)
|
|
116
|
+
expect(host.querySelector('.mwnf-minisite-page__page-title').textContent.trim()).not.toBe('')
|
|
117
|
+
// The first page's previous page is the introduction.
|
|
118
|
+
expect(host.querySelector('.mwnf-minisite-page__nav--end a').getAttribute('href')).toContain('#/introduction')
|
|
119
|
+
app.unmount()
|
|
120
|
+
}, 30000)
|
|
121
|
+
|
|
122
|
+
it("draws legacy's windows without the frame", async () => {
|
|
123
|
+
const { app, host } = await mountSite('#/credits?lang=en')
|
|
124
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-minisite-credits h1')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
125
|
+
expect(host.querySelector('.mwnf-minisite-header')).toBeNull()
|
|
126
|
+
app.unmount()
|
|
127
|
+
}, 30000)
|
|
128
|
+
|
|
129
|
+
it('declares every route by name, and leaves the catch-all to the router', () => {
|
|
130
|
+
expect(checkRoutes(config, { names: ['home', 'introduction', 'exhibition', 'credits', 'map', 'zoom'] })).toEqual([])
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
it('renders its own texts, none as a bare entry name', async () => {
|
|
134
|
+
const { app, host } = await mountSite('#/exhibition/1/1?lang=en')
|
|
135
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-minisite-page__caption')).not.toBeNull(), WAIT)
|
|
136
|
+
expect(host.textContent).toContain('Exhibition homepage')
|
|
137
|
+
expect(checkTextsRendered(host, { namespaces })).toEqual([])
|
|
138
|
+
app.unmount()
|
|
139
|
+
}, 30000)
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
GAI({ config, mountSite, namespaces }) {
|
|
143
|
+
it('draws the home page: the title, the subtitle, the menu of its themes and the social-media links', async () => {
|
|
144
|
+
const { app, host } = await mountSite('#/?lang=en')
|
|
145
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-artintro-home__title')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
146
|
+
expect(host.querySelector('.mwnf-artintro-home__subtitle').textContent.trim()).not.toBe('')
|
|
147
|
+
expect(host.querySelectorAll('.mwnf-artintro-home__menu div, .mwnf-artintro-home__menu2 div').length).toBeGreaterThan(1)
|
|
148
|
+
expect(host.querySelectorAll('.mwnf-artintro-home__social a').length).toBe(config.minisite.social.length)
|
|
149
|
+
// No menu over the footer.
|
|
150
|
+
expect(host.querySelector('.mwnf-minisite-menu')).toBeNull()
|
|
151
|
+
app.unmount()
|
|
152
|
+
}, 30000)
|
|
153
|
+
|
|
154
|
+
it("draws a theme's page: its pages, the item on show, its caption and the thumbnails", async () => {
|
|
155
|
+
const { app, host } = await mountSite('#/page/1/1?lang=en')
|
|
156
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-artintro-page__caption strong')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
157
|
+
expect(host.querySelector('.mwnf-artintro-page__title').textContent.trim()).not.toBe('')
|
|
158
|
+
expect(host.querySelectorAll('.mwnf-artintro-page__pages a').length).toBeGreaterThan(0)
|
|
159
|
+
expect(host.querySelectorAll('.mwnf-artintro-page__thumbs a').length).toBeGreaterThan(0)
|
|
160
|
+
app.unmount()
|
|
161
|
+
}, 30000)
|
|
162
|
+
|
|
163
|
+
it('draws the zoom window without the frame', async () => {
|
|
164
|
+
const { app, host } = await mountSite('#/zoom?lang=en')
|
|
165
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-minisite-zoom')).not.toBeNull(), WAIT)
|
|
166
|
+
expect(host.querySelector('.mwnf-minisite-header')).toBeNull()
|
|
167
|
+
app.unmount()
|
|
168
|
+
}, 30000)
|
|
169
|
+
|
|
170
|
+
it('declares every route by name, and leaves the catch-all to the router', () => {
|
|
171
|
+
expect(checkRoutes(config, { names: ['home', 'page', 'zoom'] })).toEqual([])
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
it('renders its own texts, none as a bare entry name', async () => {
|
|
175
|
+
const { app, host } = await mountSite('#/page/1/1?lang=en')
|
|
176
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-artintro-page__caption')).not.toBeNull(), WAIT)
|
|
177
|
+
expect(host.textContent).toContain('More information')
|
|
178
|
+
expect(checkTextsRendered(host, { namespaces })).toEqual([])
|
|
179
|
+
app.unmount()
|
|
180
|
+
}, 30000)
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
BAR({ config, mountSite, namespaces }) {
|
|
184
|
+
it('draws the home page: the title, the menu, the curators and the designer', async () => {
|
|
185
|
+
const { app, host } = await mountSite('#/?lang=en')
|
|
186
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-baroqueart-home__title')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
187
|
+
// The introduction and one entry per theme.
|
|
188
|
+
expect(host.querySelectorAll('.mwnf-baroqueart-home__menu div').length).toBeGreaterThan(1)
|
|
189
|
+
expect(host.querySelectorAll('.mwnf-baroqueart-partners__curator').length).toBe(config.minisite.curators.length)
|
|
190
|
+
expect(Boolean(host.querySelector('.mwnf-baroqueart-partners__design'))).toBe(Boolean(config.minisite.design))
|
|
191
|
+
// The frame: the menu over the footer, legacy's links in its order.
|
|
192
|
+
expect(host.querySelectorAll('.mwnf-baroqueart-menu li').length).toBe(config.navigation.menu.length)
|
|
193
|
+
app.unmount()
|
|
194
|
+
}, 30000)
|
|
195
|
+
|
|
196
|
+
it('draws the introduction: its text and its captioned pictures', async () => {
|
|
197
|
+
const { app, host } = await mountSite('#/introduction?lang=en')
|
|
198
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-baroqueart-intro__content')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
199
|
+
await vi.waitFor(() => expect(host.querySelectorAll('.mwnf-baroqueart-intro-item strong').length).toBeGreaterThan(0), WAIT)
|
|
200
|
+
app.unmount()
|
|
201
|
+
}, 30000)
|
|
202
|
+
|
|
203
|
+
it('draws an exhibition page: thumbnails, the item on show and its caption', async () => {
|
|
204
|
+
const { app, host } = await mountSite('#/exhibition/1/1?lang=en')
|
|
205
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-baroqueart-page__caption strong')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
206
|
+
expect(host.querySelectorAll('.mwnf-baroqueart-page__thumbs a').length).toBeGreaterThan(0)
|
|
207
|
+
expect(host.querySelector('.mwnf-baroqueart-page__page-title').textContent.trim()).not.toBe('')
|
|
208
|
+
expect(host.querySelector('.mwnf-baroqueart-page__nav--end a').getAttribute('href')).toContain('#/introduction')
|
|
209
|
+
app.unmount()
|
|
210
|
+
}, 30000)
|
|
211
|
+
|
|
212
|
+
it('draws the zoom window without the frame', async () => {
|
|
213
|
+
const { app, host } = await mountSite('#/zoom?lang=en')
|
|
214
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-baroqueart-zoom')).not.toBeNull(), WAIT)
|
|
215
|
+
expect(host.querySelector('.mwnf-baroqueart-header')).toBeNull()
|
|
216
|
+
app.unmount()
|
|
217
|
+
}, 30000)
|
|
218
|
+
|
|
219
|
+
it('declares every route by name, and leaves the catch-all to the router', () => {
|
|
220
|
+
expect(checkRoutes(config, { names: ['home', 'introduction', 'exhibition', 'zoom'] })).toEqual([])
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
it('renders its own texts, none as a bare entry name', async () => {
|
|
224
|
+
const { app, host } = await mountSite('#/exhibition/1/1?lang=en')
|
|
225
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-baroqueart-page__caption')).not.toBeNull(), WAIT)
|
|
226
|
+
expect(host.textContent).toContain('Exhibition homepage')
|
|
227
|
+
expect(checkTextsRendered(host, { namespaces })).toEqual([])
|
|
228
|
+
app.unmount()
|
|
229
|
+
}, 30000)
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
SH({ config, mountSite, namespaces }) {
|
|
233
|
+
it('draws the home page: the title, the theme menu, the logos and the frame', async () => {
|
|
234
|
+
const { app, host } = await mountSite('#/?lang=en')
|
|
235
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-sh-home__title')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
236
|
+
expect(host.querySelectorAll('.mwnf-sh-home__theme').length).toBeGreaterThan(0)
|
|
237
|
+
expect(host.querySelectorAll('.mwnf-sh-band__logos img').length).toBeGreaterThan(0)
|
|
238
|
+
expect(host.querySelectorAll('.mwnf-sh-menu > ul > li').length).toBe(config.navigation.menu.length)
|
|
239
|
+
app.unmount()
|
|
240
|
+
}, 30000)
|
|
241
|
+
|
|
242
|
+
it('draws the introduction: its text and a captioned picture', async () => {
|
|
243
|
+
const { app, host } = await mountSite('#/introduction?lang=en')
|
|
244
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-sh-intro__body')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
245
|
+
// The caption is the record's, whose texts load after the exhibition's.
|
|
246
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-sh-intro__picture b')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
247
|
+
app.unmount()
|
|
248
|
+
}, 30000)
|
|
249
|
+
|
|
250
|
+
it("draws a theme's overview and a subtheme: thumbnails, the item on show and its caption", async () => {
|
|
251
|
+
for (const address of ['#/theme/1?lang=en', '#/theme/1/1?lang=en']) {
|
|
252
|
+
const { app, host } = await mountSite(address)
|
|
253
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-sh-panel__name')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
254
|
+
expect(host.querySelectorAll('.mwnf-sh-page__thumbs img').length).toBeGreaterThan(0)
|
|
255
|
+
expect(host.querySelector('.mwnf-sh-page__name').textContent.trim()).not.toBe('')
|
|
256
|
+
app.unmount()
|
|
257
|
+
}
|
|
258
|
+
}, 60000)
|
|
259
|
+
|
|
260
|
+
it("draws legacy's windows without the frame", async () => {
|
|
261
|
+
const { app, host } = await mountSite('#/credits?lang=en')
|
|
262
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-sh-window h3')?.textContent.trim()).toBeTruthy(), WAIT)
|
|
263
|
+
expect(host.querySelector('.mwnf-sh-header')).toBeNull()
|
|
264
|
+
app.unmount()
|
|
265
|
+
}, 30000)
|
|
266
|
+
|
|
267
|
+
it('declares every route by name, and leaves the catch-all to the router', () => {
|
|
268
|
+
expect(
|
|
269
|
+
checkRoutes(config, { names: ['home', 'introduction', 'theme', 'subtheme', 'further-reading', 'credits', 'cover-image', 'zoom'] }),
|
|
270
|
+
).toEqual([])
|
|
271
|
+
})
|
|
272
|
+
|
|
273
|
+
it('renders its own texts, none as a bare entry name', async () => {
|
|
274
|
+
const { app, host } = await mountSite('#/theme/1/1?lang=en')
|
|
275
|
+
await vi.waitFor(() => expect(host.querySelector('.mwnf-sh-panel')).not.toBeNull(), WAIT)
|
|
276
|
+
expect(host.textContent).toContain('Exhibition homepage')
|
|
277
|
+
expect(checkTextsRendered(host, { namespaces })).toEqual([])
|
|
278
|
+
app.unmount()
|
|
279
|
+
}, 30000)
|
|
280
|
+
},
|
|
281
|
+
}
|
|
@@ -913,14 +913,27 @@ a { color: inherit; }
|
|
|
913
913
|
background-color: var(--main-color);
|
|
914
914
|
color: var(--main-text-color);
|
|
915
915
|
}
|
|
916
|
+
/* The picture's name and its link to the sheet in the contrast colour, the
|
|
917
|
+
link underlined, as the deployed client draws them (live, and the Hijaz
|
|
918
|
+
demo). */
|
|
916
919
|
.mwnf-dxa-theme-page__detail--title {
|
|
917
920
|
font-weight: 700;
|
|
921
|
+
color: var(--contrast-color);
|
|
918
922
|
}
|
|
919
923
|
.mwnf-dxa-theme-page__entry {
|
|
920
924
|
margin-top: 20px;
|
|
921
925
|
font-style: italic;
|
|
922
926
|
color: var(--contrast-color);
|
|
923
|
-
text-decoration:
|
|
927
|
+
text-decoration: underline;
|
|
928
|
+
}
|
|
929
|
+
/* ThemeComponent's glossary links: underlined, the contrast colour under the
|
|
930
|
+
pointer. */
|
|
931
|
+
.mwnf-dxa-theme-page .gloss-term {
|
|
932
|
+
text-decoration: underline;
|
|
933
|
+
cursor: pointer;
|
|
934
|
+
}
|
|
935
|
+
.mwnf-dxa-theme-page .gloss-term:hover {
|
|
936
|
+
color: var(--contrast-color);
|
|
924
937
|
}
|
|
925
938
|
.mwnf-dxa-theme-page__entry:hover {
|
|
926
939
|
text-decoration: underline;
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
--mwnf-font-heading: 'Roboto Condensed', 'mwnf-arrows', 'Roboto', Arial, sans-serif;
|
|
55
55
|
--mwnf-line-height: 1.4;
|
|
56
56
|
--mwnf-weight-heading: 700;
|
|
57
|
-
|
|
57
|
+
/* Legacy's gallery sets no text colour: the browser's black. */
|
|
58
|
+
--mwnf-color-text: #000000;
|
|
58
59
|
--mwnf-color-background: var(--background-color);
|
|
59
60
|
--mwnf-color-accent: var(--theme-dark);
|
|
60
61
|
--mwnf-color-muted: #555555;
|
|
@@ -140,7 +141,8 @@
|
|
|
140
141
|
--mwnf-banner-overlay-text: #ffffff;
|
|
141
142
|
--mwnf-banner-overlay-background: color-mix(in srgb, var(--theme-dark) 60%, transparent);
|
|
142
143
|
--mwnf-banner-caption-background: rgba(0, 0, 0, 0.6);
|
|
143
|
-
|
|
144
|
+
/* dxa-client BannerComponent's and SubBanner's caption. */
|
|
145
|
+
--mwnf-banner-caption-text: rgba(255, 255, 255, 0.8);
|
|
144
146
|
--mwnf-banner-section-height: 20vh;
|
|
145
147
|
--mwnf-banner-section-max-height: 150px;
|
|
146
148
|
--mwnf-banner-section-title-size: 190%;
|
|
@@ -402,8 +404,10 @@ a { color: inherit; }
|
|
|
402
404
|
text-decoration: underline;
|
|
403
405
|
cursor: pointer;
|
|
404
406
|
}
|
|
407
|
+
/* Legacy's pager buttons are disabled where they lead nowhere, and the live
|
|
408
|
+
site draws them in the browser's own colour for a disabled button. */
|
|
405
409
|
.mwnf-dxa-gallery-pages__button.is-disabled {
|
|
406
|
-
color:
|
|
410
|
+
color: rgba(16, 16, 16, 0.3);
|
|
407
411
|
cursor: default;
|
|
408
412
|
}
|
|
409
413
|
.mwnf-dxa-gallery-pages__numbers .is-disabled {
|
|
@@ -420,6 +424,7 @@ a { color: inherit; }
|
|
|
420
424
|
.mwnf-banner--section .mwnf-banner__caption {
|
|
421
425
|
margin-inline-start: auto;
|
|
422
426
|
line-height: normal;
|
|
427
|
+
color: var(--mwnf-banner-caption-text);
|
|
423
428
|
}
|
|
424
429
|
/* Legacy's band is 50px at least, its 10px above and below the title's own
|
|
425
430
|
(dxa-client SubBanner): with no title, the caption is centred in 50px. */
|
|
@@ -463,6 +468,7 @@ a { color: inherit; }
|
|
|
463
468
|
line is taller). */
|
|
464
469
|
.mwnf-back-link__button {
|
|
465
470
|
padding: 2px 8px 2px 0;
|
|
471
|
+
font-weight: bold;
|
|
466
472
|
}
|
|
467
473
|
.mwnf-back-link__arrow {
|
|
468
474
|
display: inline-block;
|