Skip to content
Snippets Groups Projects
Commit 10247127 authored by Loïs Poujade's avatar Loïs Poujade
Browse files

Try to include mirador-annotations plugin

parent 95e5ece6
No related branches found
No related tags found
No related merge requests found
FROM alpine:latest
RUN apk add npm
COPY . /opt
WORKDIR /opt
RUN npm install
CMD npm start
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000"> <meta name="theme-color" content="#000000" />
<title>Mirador</title> <title>Mirador</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" />
</head> </head>
<body> <body>
<div id="mirador" style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;"></div> <div id="mirador" style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;"></div>
...@@ -13,32 +13,29 @@ ...@@ -13,32 +13,29 @@
<script type="text/javascript"> <script type="text/javascript">
var miradorInstance = Mirador.viewer({ var miradorInstance = Mirador.viewer({
id: 'mirador', id: 'mirador',
theme: { theme: { transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, },
transitions: window.location.port === '4488' ? { create: () => 'none' } : {}, annotation: {
adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`),
exportLocalStorageAnnotations: false,
}, },
windows: [{
manifestId: 'https://iiif.harvardartmuseums.org/manifests/object/299843',
canvasId: 'https://iiif.harvardartmuseums.org/manifests/object/299843/canvas/canvas-47174892',
thumbnailNavigationPosition: 'far-bottom',
},
{
manifestId: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json',
}],
catalog: [ catalog: [
{ manifestId: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json' }, { manifestid: 'http://localhost:8000/dzkimgs_annotated_video.json' },
{ manifestId: 'https://iiif.harvardartmuseums.org/manifests/object/299843' }, { manifestid: 'http://localhost:8000/video_split_annopage.json' },
{ manifestId: "https://media.nga.gov/public/manifests/nga_highlights.json", provider: "National Gallery of Art"}, { manifestid: 'http://localhost:8000/fediverse.json' },
{ manifestId: "https://data.ucd.ie/api/img/manifests/ucdlib:33064", provider: "Irish Architectural Archive"}, { manifestid: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json' },
{ manifestId: "https://wellcomelibrary.org/iiif/b18035723/manifest", provider: "Wellcome Library"}, { manifestid: 'https://iiif.harvardartmuseums.org/manifests/object/299843' },
{ manifestId: "https://demos.biblissima.fr/iiif/metadata/florus-dispersus/manifest.json", provider: "Biblissima"}, { manifestid: "https://media.nga.gov/public/manifests/nga_highlights.json", provider: "national gallery of art"},
{ manifestId: "https://www.e-codices.unifr.ch/metadata/iiif/gau-Fragment/manifest.json", provider: "e-codices - Virtual Manuscript Library of Switzerland"}, { manifestid: "https://data.ucd.ie/api/img/manifests/ucdlib:33064", provider: "irish architectural archive"},
{ manifestId: "https://wellcomelibrary.org/iiif/collection/b18031511", provider: "Wellcome Library"}, { manifestid: "https://wellcomelibrary.org/iiif/b18035723/manifest", provider: "wellcome library"},
{ manifestId: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b10022508f/manifest.json", provider: "Bibliothèque nationale de France"}, { manifestid: "https://demos.biblissima.fr/iiif/metadata/florus-dispersus/manifest.json", provider: "biblissima"},
{ manifestId: "https://manifests.britishart.yale.edu/Osbornfa1", provider: "Beinecke Rare Book and Manuscript Library, Yale University"}, { manifestid: "https://www.e-codices.unifr.ch/metadata/iiif/gau-fragment/manifest.json", provider: "e-codices - virtual manuscript library of switzerland"},
{ manifestId: "https://iiif.biblissima.fr/chateauroux/B360446201_MS0005/manifest.json", provider: "Biblissima"}, { manifestid: "https://wellcomelibrary.org/iiif/collection/b18031511", provider: "wellcome library"},
{ manifestId: "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/m4/q7/t1m4q77fr328/manifest", provider: "Durham University Library"}, { manifestid: "https://gallica.bnf.fr/iiif/ark:/12148/btv1b10022508f/manifest.json", provider: "bibliothèque nationale de france"},
//{ manifestId: "https://iiif.vam.ac.uk/collections/O1023003/manifest.json", provider: "Ocean liners"}, { manifestid: "https://manifests.britishart.yale.edu/osbornfa1", provider: "beinecke rare book and manuscript library, yale university"},
{ manifestId: "https://zavicajna.digitalna.rs/iiif/iiif/api/presentation/3/96571949-03d6-478e-ab44-a2d5ad68f935%252F00000001%252Fostalo01%252F00000071/manifest", provider: "Библиотека 'Милутин Бојић'"}, { manifestid: "https://iiif.biblissima.fr/chateauroux/b360446201_ms0005/manifest.json", provider: "biblissima"},
{ manifestid: "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/m4/q7/t1m4q77fr328/manifest", provider: "durham university library"},
//{ manifestid: "https://iiif.vam.ac.uk/collections/o1023003/manifest.json", provider: "ocean liners"},
{ manifestid: "https://zavicajna.digitalna.rs/iiif/iiif/api/presentation/3/96571949-03d6-478e-ab44-a2d5ad68f935%252f00000001%252fostalo01%252f00000071/manifest", provider: "библиотека 'милутин бојић'"},
] ]
}); });
</script> </script>
......
version: "3.9"
services:
mirador:
image: mirador_local
build:
dockerfile: Dockerfile.dev
context: .
volumes:
- ./:/opt
ports:
- 4444:4444
command: "sh -c 'npm install --force && npm start'"
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"build:watch": "webpack --watch --mode=development", "build:watch": "webpack --watch --mode=development",
"prepublishOnly": "npm run clean && npm run build:es && npm run build:cjs && npm run build", "prepublishOnly": "npm run clean && npm run build:es && npm run build:cjs && npm run build",
"size": "bundlewatch --config bundlewatch.config.json", "size": "bundlewatch --config bundlewatch.config.json",
"start": "NODE_ENV=development webpack serve --open" "start": "NODE_ENV=development webpack serve --open --host=0.0.0.0"
}, },
"license": "Apache-2.0", "license": "Apache-2.0",
"contributors": [ "contributors": [
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
], ],
"repository": "https://github.com/ProjectMirador/mirador", "repository": "https://github.com/ProjectMirador/mirador",
"dependencies": { "dependencies": {
"mirador-annotations": "^0.5.0",
"@material-ui/core": "^4.12.3", "@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.9.1", "@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.53", "@material-ui/lab": "^4.0.0-alpha.53",
......
import miradorAnnotationPlugins from 'mirador-annotations/es/index';
import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter';
import MiradorViewer from './lib/MiradorViewer'; import MiradorViewer from './lib/MiradorViewer';
/** /**
* Default Mirador instantiation * Default Mirador instantiation
*/ */
function viewer(config, pluginsOrStruct) { function viewer(config) {
/*
let struct; let struct;
if (Array.isArray(pluginsOrStruct)) { if (Array.isArray(pluginsOrStruct)) {
...@@ -11,8 +14,8 @@ function viewer(config, pluginsOrStruct) { ...@@ -11,8 +14,8 @@ function viewer(config, pluginsOrStruct) {
} else { } else {
struct = pluginsOrStruct; struct = pluginsOrStruct;
} }
*/
return new MiradorViewer(config, struct); return new MiradorViewer(config, [...miradorAnnotationPlugins]);
} }
export default { export default {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment