|
11 | 11 | <div id="mirador" style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;"></div> |
12 | 12 | <script type="module"> |
13 | 13 | import Mirador from '../../../src'; |
14 | | - var miradorInstance = Mirador.viewer({ |
15 | | - id: 'mirador', |
16 | | - theme: { |
17 | | - transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, |
18 | | - }, |
19 | | - windows: [ |
20 | | - { |
21 | | - manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/72a8-rn85/collection', |
22 | | - thumbnailNavigationPosition: 'far-bottom', |
23 | | - }], |
24 | | - catalog: [ |
25 | | - // a resource with an image canvas |
26 | | - { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/D8F76D6D/manifest', |
27 | | - provider: 'Basic image examples' }, |
28 | | - // a resource with multiple paginated image canvases |
29 | | - { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/d8-bjct-g075/manifest', provider: 'Paginated images examples' }, |
30 | | - // a resource with a PDF canvas |
31 | | - { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/n8qs-6964/manifest', provider: 'Public PDF examples'}, |
32 | | - // a resource with a limited-access PDF canvas |
33 | | - { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/D88D13C6/manifest', provider: 'Columbia community PDF examples'}, |
34 | | - // a resource with an AV canvas |
35 | | - { manifestId: "https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/D8698MF9/manifest", provider: 'Public AV canvas examples'}, |
36 | | - // a resource with a limited-access AV canvas |
37 | | - { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/d8-346v-m088/manifest', provider: 'Columbia community AV canvas examples'}, |
38 | | - { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/72a8-rn85/collection', |
39 | | - provider: 'Columbia collection as folders' }, |
40 | | - { manifestId: 'https://iiif.harvardartmuseums.org/manifests/object/299843', provider: 'Other Organization' }, |
41 | | - ], |
42 | | - window: { |
43 | | - allowTopCollectionButton: true, |
44 | | - } |
45 | | - }, |
46 | | - [...Mirador.culPlugins.downloadDialogPlugin].concat([...Mirador.culPlugins.viewXmlPlugin]).concat([...Mirador.culPlugins.citationsSidebarPlugin]).concat([...Mirador.culPlugins.videojsPlugin]).concat([...Mirador.culPlugins.canvasRelatedLinksPlugin]).concat([...Mirador.culPlugins.hintingSideBar]).concat([...Mirador.culPlugins.viewerNavigation]).concat([...Mirador.culPlugins.collectionFoldersPlugin]).concat([...Mirador.culPlugins.nativeObjectViewerPlugin]) |
47 | | - ); |
| 14 | + const { |
| 15 | + canvasRelatedLinksPlugin, |
| 16 | + citationsSidebarPlugin, |
| 17 | + collectionFoldersPlugin, |
| 18 | + downloadDialogPlugin, |
| 19 | + hintingSideBar, |
| 20 | + nativeObjectViewerPlugin, |
| 21 | + videojsPlugin, |
| 22 | + viewXmlPlugin, |
| 23 | + viewerNavigation, |
| 24 | + } = Mirador.culPlugins; |
| 25 | + |
| 26 | + const flattenPluginConfigs = (...plugins) => plugins.reduce((acc, curr) => acc.concat([...curr]), []); |
| 27 | + |
| 28 | + var miradorInstance = Mirador.viewer( |
| 29 | + { |
| 30 | + id: 'mirador', |
| 31 | + theme: { |
| 32 | + transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, |
| 33 | + }, |
| 34 | + windows: [{ |
| 35 | + manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/d8-346v-m088/manifest', |
| 36 | + thumbnailNavigationPosition: 'far-bottom', |
| 37 | + }], |
| 38 | + catalog: [ |
| 39 | + // a resource with an image canvas |
| 40 | + { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/D8F76D6D/manifest', |
| 41 | + provider: 'Basic image examples' }, |
| 42 | + // a resource with multiple paginated image canvases |
| 43 | + { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/d8-bjct-g075/manifest', provider: 'Paginated images examples' }, |
| 44 | + // a resource with a PDF canvas |
| 45 | + { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/n8qs-6964/manifest', provider: 'Public PDF examples'}, |
| 46 | + // a resource with a limited-access PDF canvas |
| 47 | + { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/D88D13C6/manifest', provider: 'Columbia community PDF examples'}, |
| 48 | + // a resource with an AV canvas |
| 49 | + { manifestId: "https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/D8698MF9/manifest", provider: 'Public AV canvas examples'}, |
| 50 | + // a resource with a limited-access AV canvas |
| 51 | + { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/d8-346v-m088/manifest', provider: 'Columbia community AV canvas examples'}, |
| 52 | + // a resource with nested collections as folders |
| 53 | + { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/72a8-rn85/collection', provider: 'Columbia collection as folders' }, |
| 54 | + // a resource with no-download hints |
| 55 | + { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/10.7916/rtc5-yw43/manifest', provider: 'Columbia public with no-download'}, |
| 56 | + // a collection from ASpace |
| 57 | + { manifestId: 'https://dlc-staging.library.columbia.edu/iiif/3/presentation/aspace/07a6d30d74e29fabe3cf77fa0e330489/collection', provider: 'Columbia ASpace collection example'}, |
| 58 | + { manifestId: 'https://iiif.harvardartmuseums.org/manifests/object/299843', provider: 'Other Organization' }, |
| 59 | + ], |
| 60 | + window: { |
| 61 | + allowTopCollectionButton: true, |
| 62 | + } |
| 63 | + }, |
| 64 | + flattenPluginConfigs( |
| 65 | + canvasRelatedLinksPlugin, citationsSidebarPlugin, collectionFoldersPlugin, |
| 66 | + downloadDialogPlugin, hintingSideBar, nativeObjectViewerPlugin, |
| 67 | + videojsPlugin, viewerNavigation, viewXmlPlugin |
| 68 | + ) |
| 69 | + ); |
48 | 70 | </script> |
49 | 71 | </body> |
50 | 72 | </html> |
0 commit comments