-
Notifications
You must be signed in to change notification settings - Fork 20
/
two-up.html
56 lines (39 loc) · 1.58 KB
/
two-up.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<html>
<head>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
background: #000;
}
#uv1 {
float: left;
}
#uv2 {
float: right;
}
</style>
</head>
<body>
<iframe id="uv1" src="https://universalviewer.io/examples/uv/uv.html#?manifest=https://api.bl.uk/metadata/iiif/ark:/81055/vdc_100054581994.0x000001/manifest.json&c=0&m=0&s=0&cv=0&config=https://universalviewer.io/examples/two-up-config.json&locales=en-GB:English (GB),cy-GB:Cymraeg&xywh=-1383,-197,5333,3936&r=0" width="560" height="420" allowfullscreen frameborder="0"></iframe>
<iframe id="uv2" src="https://universalviewer.io/examples/uv/uv.html#?manifest=https://api.bl.uk/metadata/iiif/ark:/81055/vdc_100054605479.0x000001/manifest.json&c=0&m=0&s=0&cv=0&config=https://universalviewer.io/examples/two-up-config.json&locales=en-GB:English (GB),cy-GB:Cymraeg&xywh=-1383,-197,5333,3936&r=0" width="560" height="420" allowfullscreen frameborder="0"></iframe>
<script>
var uv1, uv2;
function resize() {
var width = window.innerWidth / 2;
var height = window.innerHeight;
uv1.style.width = width;
uv1.style.height = height;
uv2.style.width = width;
uv2.style.height = height;
}
window.addEventListener('DOMContentLoaded', function() {
uv1 = document.querySelector('#uv1');
uv2 = document.querySelector('#uv2');
window.addEventListener('resize', resize);
resize();
}, false);
</script>
</body>
</html>