forked from IUBLibTech/archives_online
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from scientist-softserv/add-uv-package
Bring over package.json from ngao
- Loading branch information
Showing
6 changed files
with
4,373 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"modules": | ||
{ | ||
"footerPanel": | ||
{ | ||
"options": | ||
{ | ||
"shareEnabled": true, | ||
"downloadEnabled": false | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
|
||
<!-- | ||
This is what the embed iframe src links to. It doesn't need to communicate with the parent page, only fill the available space and look for #? parameters | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> | ||
<link rel="icon" href="favicon.ico"> | ||
<link rel="stylesheet" type="text/css" href="uv.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script> | ||
<script type="text/javascript" src="lib/offline.js"></script> | ||
<script type="text/javascript" src="helpers.js"></script> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<script type="text/javascript"> | ||
window.addEventListener('uvLoaded', function(e) { | ||
urlDataProvider = new UV.URLDataProvider(true); | ||
var formattedLocales; | ||
var locales = urlDataProvider.get('locales', ''); | ||
|
||
if (locales) { | ||
var names = locales.split(','); | ||
formattedLocales = []; | ||
|
||
for (var i in names) { | ||
var nameparts = String(names[i]).split(':'); | ||
formattedLocales[i] = {name: nameparts[0], label: nameparts[1]}; | ||
} | ||
|
||
} else { | ||
formattedLocales = [ | ||
{ | ||
name: 'en-GB' | ||
} | ||
] | ||
} | ||
|
||
uv = createUV('#uv', { | ||
root: '.', | ||
iiifResourceUri: urlDataProvider.get('manifest'), | ||
configUri: urlDataProvider.get('config'), | ||
collectionIndex: Number(urlDataProvider.get('c', 0)), | ||
manifestIndex: Number(urlDataProvider.get('m', 0)), | ||
sequenceIndex: Number(urlDataProvider.get('s', 0)), | ||
canvasIndex: Number(urlDataProvider.get('cv', 0)), | ||
rangeId: urlDataProvider.get('rid', 0), | ||
rotation: Number(urlDataProvider.get('r', 0)), | ||
xywh: urlDataProvider.get('xywh', ''), | ||
embedded: true, | ||
locales: formattedLocales | ||
}, urlDataProvider); | ||
}, false); | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<div id="uv" class="uv"></div> | ||
|
||
<script> | ||
$(function() { | ||
|
||
var $UV = $('#uv'); | ||
|
||
function resize() { | ||
var windowWidth = window.innerWidth; | ||
var windowHeight = window.innerHeight; | ||
$UV.width(windowWidth); | ||
$UV.height(windowHeight); | ||
} | ||
|
||
$(window).on('resize' ,function() { | ||
resize(); | ||
}); | ||
|
||
resize(); | ||
}); | ||
|
||
</script> | ||
<script type="text/javascript" src="uv.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "archives_online", | ||
"private": true, | ||
"dependencies": { | ||
"@babel/core": "^7.12.13", | ||
"@babel/plugin-external-helpers": "^7.12.13", | ||
"@babel/plugin-transform-modules-umd": "^7.12.13", | ||
"@babel/preset-env": "^7.12.13", | ||
"universalviewer": "^3.0.16" | ||
}, | ||
"scripts": { | ||
"preinstall": "rm -rf ./public/uv", | ||
"postinstall": "yarn run uv-install && yarn run uv-config", | ||
"uv-install": "shx cp -r ./node_modules/universalviewer/dist ./public/uv", | ||
"uv-config": "shx cp ./config/uv/uv.html ./public/uv/uv.html & shx cp ./config/uv/uv-config.json ./public/uv/" | ||
}, | ||
"devDependencies": { | ||
"shx": "^0.3.2" | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
} |
Oops, something went wrong.