forked from tokee/juxta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_flora.template.html
124 lines (115 loc) · 3.6 KB
/
demo_flora.template.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flora Danica</title>
<link rel="stylesheet" type="text/css" href="resources/juxta.css" />
<script src="resources/openseadragon.min.js"></script>
<script type="text/javascript" src="resources/overlays_preload.js"></script>
<script type="text/javascript" src="resources/overlays.js"></script>
<style>
html, body, .page {
height: 100%; /* needed for proper layout */
}
body {
background: #eeeeee;
color: #ffffff;
overflow: hidden;
padding: 0;
margin: 0;
}
p {
margin-bottom: 1em;
}
.page {
display: flex;
flex-direction: column;
}
.page-header {
flex: 0 0 auto;
background-color: #cccccc;
color: #000000;
padding: 0.5em 1em 0.5em 1em;
}
.page-content {
flex: 1 1 auto;
position: relative;/* need this to position inner content */
overflow-y: auto;
}
.page-footer {
flex: 0 0 auto;
background-color: #dcdcdc;
color: #000000;
}
#pageinfo {
position: absolute;
top: 5%;
left: 5%;
width: 90%;
height: 10%;
}
.page-header ul {
padding: 0;
margin: 0;
}
.page-header li {
display: inline;
list-style-type: none;
padding-right: 20px;
}
.page-header h1 {
margin-top: 0;
font-size: 1em;
}
#zoom-display {
height: 100%;
}
</style>
</head>
<body>
<div class="page">
<!--<div id="pageinfo">
<h1>${DESIGNATION}: ${TOTAL_IMAGES} images (${MEGAPIXELS} MPixels)</h1>
</div>-->
<div class="page-header">
<h1>Flora Danica images from Statens Naturhistoriske Museum: ${TOTAL_IMAGES} images (${MEGAPIXELS} MPixels)</h1>
<p>Juxta-demo of publicly available images from <a href="http://www.daim.snm.ku.dk/flora-danica-dk">Statens Naturhistoriske Museum</a>. Please see the Museum page for license information.</p>
</div>
<div id="zoom-display" class="openseadragon"><div id="header"></div><div id="infobox"></div><div id="footer"></div></div>
<script type="text/javascript">
var myDragon = OpenSeadragon({
id: "zoom-display",
maxZoomPixelRatio: ${MAX_ZOOM_PIXEL_RATIO},
zoomPerScroll: 2.0,
showNavigator: false,
wrapHorizontal: false,
prefixUrl: "resources/images/",
${TILE_SOURCES}
});
${SETUP_OVERLAY}
</script>
<script type="text/javascript">
overlays.createHeader = function(x, y, image, meta) {
imageId = image.substring(image.lastIndexOf('/')+1).replace(/\.[^/.]+$/, "");
imageLink = meta.split("§")[0];
linkText = meta.split("§")[1];
return '<a href="' + imageLink + '">' + linkText + '</a>';
}
overlays.createFooter = function(x, y, image, meta) {
var description = meta.split("§")[2];
if (description != '') {
description += '<br/>';
}
return description;
}
</script>
<p>Generated `date +"%Y-%m-%d %H:%M"`</p>
<!-- Must be below the creation of myDragon -->
<script type="text/javascript" src="resources/overlays.js"></script>
<script type="text/javascript">
</script>
</div><!-- page -->
</body>
</html>