Skip to content

Commit

Permalink
Add a simple example for configuring default manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
camillevilla committed Dec 1, 2020
1 parent 2db642d commit 29fe991
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
import Mirador from 'mirador/dist/es/src/index';
import examplePlugin from './plugins/example_plugin';

// Example: Some IIIF manifests related to cats! 🐱
// TASK 1: Show the Washington State University manifest in the main viewer
// TASK 2: Add your own manifest to the catalog (Try https://researchworks.oclc.org/iiif-explorer/ for more cat photos)

const config = {
id: 'mirador-viewer',
windows: [
{
manifestId: 'https://purl.stanford.edu/fr426cg9537/iiif/manifest',
}
],
id: 'mirador-viewer',
windows: [{ // These manifests will load in the viewer
manifestId: 'https://damsssl.llgc.org.uk/iiif/2.0/1556378/manifest.json',
},
{
manifestId: 'https://damsssl.llgc.org.uk/iiif/2.0/1487439/manifest.json',
canvasIndex: 1,
}
],
catalog: [{ // These manifests are available in the catalog.
manifestId: 'https://damsssl.llgc.org.uk/iiif/2.0/1556378/manifest.json',
},
{
manifestId: 'https://damsssl.llgc.org.uk/iiif/2.0/1487439/manifest.json',
provider: 'The National Library of Wales',
},
{
manifestId: 'https://cdm16866.contentdm.oclc.org/iiif/info/cchm_photo/5342/manifest.json',
provider: 'Washington State University',
},
{
manifestId: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/faeff7fb-f8a7-44b5-95ed-cff9a9ffd198.json',
provider: 'Bodleian Libraries, University of Oxford',
}
]
};

const plugins = [];

Mirador.viewer(config, plugins);
Mirador.viewer(config, plugins);

0 comments on commit 29fe991

Please sign in to comment.