Skip to content

Commit

Permalink
chore: add citation key in user config
Browse files Browse the repository at this point in the history
  • Loading branch information
orlinmalkja committed Nov 21, 2024
1 parent 23b4c23 commit 9b4a3cb
Show file tree
Hide file tree
Showing 2 changed files with 167 additions and 165 deletions.
331 changes: 167 additions & 164 deletions examples/ahiqar-arabic-karshuni-local.html
Original file line number Diff line number Diff line change
@@ -1,175 +1,178 @@
<!DOCTYPE html>
<html>
<head><title>TIDO</title>
<meta charset="utf-8">
<meta name="description" content="">
<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">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="dist/tido.css">
<style>
html, body {
margin: 0;
}
#app {
height: 100vh;
}
</style>
</head>
<body>
<noscript><strong>We're sorry but TIDO doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong></noscript>
<head>
<title>TIDO</title>
<meta charset="utf-8" />
<meta name="description" content="" />
<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"
/>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" href="dist/tido.css" />
<style>
html,
body {
margin: 0;
}
#app {
height: 100vh;
}
</style>
</head>
<body>
<noscript
><strong
>We're sorry but TIDO doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong
></noscript
>

<div id="app"></div>
<script src="dist/tido.js"></script>
<script>
window.addEventListener('load', function () {
window.tido = new window.Tido({
"collection": "http://localhost:8181/ahiqar/textapi/ahiqar/arabic-karshuni/collection.json",
"labels": {
"item": "Sheet",
"manifest": "Manuscript"
},
"colors": {
"forceMode": "light",
"primary": "#1a3771"
},
"panels": [
{
"label": "contents_and_metadata",
"views": [
{
"id": "tree",
"label": "contents",
"connector": {
"id": 1
}
<div id="app"></div>
<script src="dist/tido.js"></script>
<script>
window.addEventListener("load", function () {
window.tido = new window.Tido({
collection:
"http://localhost:8181/ahiqar/textapi/ahiqar/arabic-karshuni/collection.json",
labels: {
item: "Sheet",
manifest: "Manuscript",
},
{
"id": "metadata",
"label": "metadata",
"connector": {
"id": 2,
"options": {
"collection": {
"all": true
colors: {
forceMode: "light",
},
panels: [
{
label: "contents_and_metadata",
views: [
{
id: "tree",
label: "contents",
connector: {
id: 1,
},
},
"manifest": {
"all": true
{
id: "metadata",
label: "metadata",
connector: {
id: 2,
options: {
collection: {
all: true,
},
manifest: {
all: true,
},
item: {
all: true,
},
citationKey: "Citation",
},
},
},
"item": {
"all": true
}
}
}
}
]
},
{
"label": "image",
"views": [
{
"id": "image",
"label": "Image",
"connector": {
"id": 3
}
}]
},
{
"label": "text",
"views": [
{
"id": "text1",
"label": "Transcription",
"default": true,
"connector": {
"id": 4,
"options": {
"type": "transcription"
}
}
},
{
"id": "text2",
"label": "Transliteration",
"connector": {
"id": 4,
"options": {
"type": "transliteration"
}
}
}
]
},
{
"label": "annotations",
"views": [
{
"id": "annotations1",
"label": "Editorial",
"connector": {
"id": 5,
"options": {
"types": [
{
"name": "Person",
"icon": "person"
],
},
{
label: "image",
views: [
{
id: "image",
label: "Image",
connector: {
id: 3,
},
},
],
},
{
label: "text",
views: [
{
id: "text1",
label: "Transcription",
default: true,
connector: {
id: 4,
options: {
type: "transcription",
},
},
{
"name": "Place",
"icon": "marker"
},
{
id: "text2",
label: "Transliteration",
connector: {
id: 4,
options: {
type: "transliteration",
},
},
{
"name": "Editorial Comment",
"icon": "chat"
},
],
},
{
label: "annotations",
views: [
{
id: "annotations1",
label: "Editorial",
connector: {
id: 5,
options: {
types: [
{
name: "Person",
icon: "biPersonFill",
},
{
name: "Place",
icon: "biGeoAltFill",
},
{
name: "Editorial Comment",
icon: "biChatFill",
},
{
name: "Reference",
icon: "biBoxArrowUpRight",
},
],
},
},
{
"name": "Reference",
"icon": "externalLink"
}
]
}
}
},
{
"id": "annotations2",
"label": "Motif",
"connector": {
"id": 5,
"options": {
"types": [
{
"name": "Motif",
"icon": "pen"
}
]
}
}
},
{
id: "annotations2",
label: "Motif",
connector: {
id: 5,
options: {
types: [
{
name: "Motif",
icon: "biPenFill",
},
],
},
},
},
],
},
],
translations: {
en: {
contents_and_metadata: "Contents & Metadata",
next_item: "Next Sheet",
previous_item: "Previous Sheet",
next_manifest: "Next Manuscript",
previous_manifest: "Previous Manuscript",
},
},
{
"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"
}
}
});
});
</script>
</body>
});
});
</script>
</body>
</html>
1 change: 0 additions & 1 deletion src/components/metadata/MetadataItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function showCopyCitation(key, config) {
const metadataView = getMetadataView(config.panels);
// when we retrieve each MetadataItem, we want to know whether we are in the row of the citation
if (metadataView.connector.options.citationKey) {
console.log(metadataView.connector.options.citationKey === key);
return metadataView.connector.options.citationKey === key;
}
return false;
Expand Down

0 comments on commit 9b4a3cb

Please sign in to comment.