Skip to content

Commit c10de71

Browse files
committed
Started with the barest of possibly workable content ➕
Initial commit to version control ⚡️
1 parent 41b2f5e commit c10de71

File tree

2 files changed

+113
-0
lines changed

2 files changed

+113
-0
lines changed

recipe/0599-drag-and-drop/index.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Name of Recipe
3+
id: -1
4+
layout: recipe
5+
tags: [tbc]
6+
summary: "tbc"
7+
viewers:
8+
topic:
9+
- basic
10+
---
11+
12+
## Use Case
13+
14+
Describe the use case that the pattern is intended to solve.
15+
Why is this pattern important?
16+
17+
## Implementation Notes
18+
19+
What do you need to know to use this pattern?
20+
How do you implement the pattern?
21+
22+
## Restrictions
23+
24+
When is this pattern is usable / not usable? Is it deprecated? If it uses multiple specifications, which versions are needed, etc.?
25+
26+
Delete this section if it is not needed.
27+
If you don't know what the restrictions might be initially, just leave the following line:
28+
**Unknown - Help Needed**
29+
30+
## Example
31+
32+
Describe the solution in prose and provide an example.
33+
The example json document must be an external document, and imported with the following:
34+
35+
{% include manifest_links.html viewers="" manifest="manifest.json" %}
36+
37+
<img src="https://collections.library.yale.edu/assets/iiif-ca042537b7cca44f9a22d3960ae9e3a8d990bc6e442b1376b928d7c79ab353c9.png" draggable="true" ondragstart="drag(event)" alt="IIIF logo; drag and drop onto a supporting viewer to see this resource in that viewer">
38+
39+
<script>
40+
function drag(ev) {
41+
ev.dataTransfer.setData("text/plain", {
42+
"@context": "http://iiif.io/api/presentation/3/context.json",
43+
"id": "https://example.org/content-states/1",
44+
"type": "Annotation",
45+
"motivation": ["contentState"],
46+
"target": {
47+
"id": "https://iiif.io/api/cookbook/recipe/0006-text-language/manifest.json",
48+
"type": "Manifest"
49+
}
50+
});
51+
}
52+
</script>
53+
54+
## Related Recipes
55+
56+
Provide a bulleted list of related recipes and why they are relevant.
57+
58+
{% include acronyms.md %}
59+
{% include links.md %}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"@context": "http://iiif.io/api/presentation/3/context.json",
3+
"id": "{{ id.url }}",
4+
"type": "Manifest",
5+
"label": { "en": [ "Visible Text Annotation" ] },
6+
"items": [
7+
{
8+
"id": "{{ id.path }}/canvas",
9+
"type": "Canvas",
10+
"height": 31722,
11+
"width": 70399,
12+
"items": [
13+
{
14+
"id": "{{ id.path }}/page/p1/1",
15+
"type": "AnnotationPage",
16+
"items": [
17+
{
18+
"id": "{{ id.path }}/annotation/p0001-image",
19+
"type": "Annotation",
20+
"motivation": "painting",
21+
"body": {
22+
"id": "https://iiif.io/api/image/3.0/example/reference/36ca0a3370db128ec984b33d71a1543d-100320001004/full/max/0/default.jpg",
23+
"type": "Image",
24+
"format": "image/jpeg",
25+
"height": 31722,
26+
"width": 70399,
27+
"service": [
28+
{
29+
"id": "https://iiif.io/api/image/3.0/example/reference/36ca0a3370db128ec984b33d71a1543d-100320001004",
30+
"profile": "level1",
31+
"type": "ImageService3"
32+
}
33+
]
34+
},
35+
"target": "{{ id.path }}/canvas"
36+
},
37+
{
38+
"id": "{{ id.path }}/annotation/p0001-text",
39+
"type": "Annotation",
40+
"motivation": "painting",
41+
"body": {
42+
"type": "TextualBody",
43+
"format": "text/html",
44+
"value": "<p style='font-size:1000px; background-color: rgba(16, 16, 16, 0.5); padding:300px'>The koto is to the right, carried in a cloth wrapping.</p>",
45+
"language": "en"
46+
},
47+
"target": "{{ id.path }}/canvas#xywh=5500,12200,8000,5000"
48+
}
49+
]
50+
}
51+
]
52+
}
53+
]
54+
}

0 commit comments

Comments
 (0)