tido
Version:
Text Viewer for Digital Objects (TIDO)
190 lines (184 loc) • 4.35 kB
HTML
<html>
<head>
<title>TIDO</title>
<meta charset="utf-8">
<meta name="description" content="<%= htmlWebpackPlugin.options.productDescription %>">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="initial-scale=1, maximum-scale=5, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">
<style>
html, body {
margin: 0;
}
#app {
height: 100vh;
}
</style>
<script type="module" crossorigin src="/tido.js"></script>
<link rel="stylesheet" crossorigin href="/tido.css">
</head>
<body>
<noscript>
<strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<script>
const config = {
collection: "https://api.ahiqar.d.sub.uni-goettingen.de/textapi/ahiqar/arabic/collection.json",
container: "#app",
colors: {
primary: "#234ea6"
},
labels: {
item: "Sheet",
manifest: "Manuscript"
},
fitPanels: false,
panels: [
{
label: "contents_and_metadata",
views: [
{
id: "tree",
label: "contents",
connector: {
id: 1
}
},
{
id: "metadata",
label: "metadata",
connector: {
id: 2,
options: {
collection: {
all: true
},
manifest: {
all: true
},
item: {
all: true
}
}
}
}
]
},
{
label: "image",
views: [
{
id: "image",
label: "Image",
connector: {
id: 3
}
}]
},
{
label: "Transcription",
views: [
{
id: "text1",
label: "Transcription",
default: true,
connector: {
id: 4,
options: {
type: "transcription"
}
}
}
]
},
{
label: "Translation",
show: false,
views: [
{
id: "text3",
label: "Translation",
default: true,
connector: {
id: 4,
options: {
type: "translation"
}
}
},
]
},
{
label: "annotations",
views: [
{
id: "annotations1",
label: "Editorial",
connector: {
id: 5,
options: {
types: [
{
name: "Person",
icon: "person"
},
{
name: "Place",
icon: "marker"
},
{
name: "Editorial Comment",
icon: "chat"
},
{
name: "Reference",
icon: "externalLink"
}
]
}
}
},
{
id: "annotations2",
label: "Motif",
connector: {
id: 5,
options: {
types: [
{
name: "Motif",
icon: "pen"
}
]
}
}
},
{
"id": "annotations3",
"label": "Variants",
"connector": {
"id": 6
}
}
]
}
],
translations: {
en: {
contents_and_metadata: "Contents & Metadata",
next_item: "Next Sheet",
previous_item: "Previous Sheet",
next_manifest: "Next Manuscript",
previous_manifest: "Previous Manuscript",
item: "Sheet"
}
}
};
window.addEventListener('load', function () {
window.tido = new window.Tido(config);
});
</script>
</body>
</html>