-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
186 lines (163 loc) · 7.54 KB
/
index.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Linkset visualization demo</title>
<meta name="viewport" content="width=device-width" />
<script src="gs1LinksetViz.js"></script>
<link rel="stylesheet" href="gs1LinksetViz.css" title="Basic linkset layout styles" />
<style type="text/css">
body {font-family: sans-serif}
span#useDemo {
text-decoration: underline;
cursor: pointer;
}
#linksetInput {
margin-top: 2em;
width:1000px;
max-width:100%;
overflow:auto;
white-space: nowrap;
height:300px
}
button {
background-color: #F26334;
color: white;
padding: 1em;
border: thin solid #002c6c;
}
</style>
<!-- Demo linkset is rendered as this DL
<dl class="linkList">
<dt class="linkType"><a href="https://gs1.org/voc/defaultLink">https://gs1.org/voc/defaultLink</a></dt>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://dalgiardino.com/risotto-rice-with-mushrooms/">https://dalgiardino.com/risotto-rice-with-mushrooms/</a></dd>
<dd class="title"><span class="toTitle">Title: </span>Product information</dd>
<dt class="linkType"><a href="https://gs1.org/voc/defaultLinkMulti">https://gs1.org/voc/defaultLinkMulti</a></dt>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://dalgiardino.com/risotto-rice-with-mushrooms/index.html.vi">https://dalgiardino.com/risotto-rice-with-mushrooms/index.html.vi</a></dd>
<dd class="title"><span class="toTitle">Title: </span>Product information</dd>
<dd class="hreflang"><span class="toTitle">Language: </span>vi</dd>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://dalgiardino.com/risotto-rice-with-mushrooms/index.html.es">https://dalgiardino.com/risotto-rice-with-mushrooms/index.html.es</a></dd>
<dd class="title"><span class="toTitle">Title: </span>Información del Producto</dd>
<dd class="hreflang"><span class="toTitle">Language: </span>es</dd>
<dt class="linkType"><a href="https://gs1.org/voc/pip">https://gs1.org/voc/pip</a></dt>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://example.com/en/defaultPage">https://example.com/en/defaultPage</a></dd>
<dd class="title"><span class="toTitle">Title: </span>Product information</dd>
<dd class="hreflang"><span class="toTitle">Language: </span>en</dd>
<dd class="mediaType"><span class="toTitle">Media type: </span>text/html</dd>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://example.com/fr/defaultPage">https://example.com/fr/defaultPage</a></dd>
<dd class="title"><span class="toTitle">Title: </span>Information produit</dd>
<dd class="hreflang"><span class="toTitle">Language: </span>fr</dd>
<dt class="linkType"><a href="https://gs1.org/voc/whatsInTheBox">https://gs1.org/voc/whatsInTheBox</a></dt>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://example.com/en/packContents/GB">https://example.com/en/packContents/GB</a></dd>
<dd class="title"><span class="toTitle">Title: </span>What's in the box?</dd>
<dd class="hreflang"><span class="toTitle">Language: </span>en</dd>
<dd class="context"><span class="toTitle">Context: </span>GB</dd>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://example.com/fr/packContents/FR">https://example.com/fr/packContents/FR</a></dd>
<dd class="title"><span class="toTitle">Title: </span>Qu'y a-t-il dans la boite?</dd>
<dd class="hreflang"><span class="toTitle">Language: </span>fr</dd>
<dd class="context"><span class="toTitle">Context: </span>FR</dd>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://example.com/fr/packContents/CH">https://example.com/fr/packContents/CH</a></dd>
<dd class="title"><span class="toTitle">Title: </span>Qu'y a-t-il dans la boite?</dd>
<dd class="hreflang"><span class="toTitle">Language: </span>fr</dd>
<dd class="context"><span class="toTitle">Context: </span>CH</dd>
<dt class="linkType"><a href="https://gs1.org/voc/relatedVideo">https://gs1.org/voc/relatedVideo</a></dt>
<dd class="href"><span class="toTitle">Target URL: </span><a href="https://video.example">https://video.example</a></dd>
<dd class="title"><span class="toTitle">Title: </span>See it in action! (en); Voyez-le en action! (fr)</dd>
<dd class="hreflang"><span class="toTitle">Language: </span>en, fr</dd>
<dd class="fwqs"><span class="toTitle">Forward query: </span>false</dd>
</dl>
-->
</head>
<body>
<header><h1>Linkset visualization demo</h1></header>
<main>
<p>This page demonstrates the GS1 linkset visualization library. Paste your own linkset into the window or <span id="useDemo">use the demo</span>.</p>
<section id="inputArea">
<textarea id="linksetInput"></textarea>
<button id="refresh">Visualize</button>
</section>
<section id="linksetVizualization"></section>
</main>
<script>
// Scripting here is just needed for this demo page, it's not part of the actual visualisation library.
const demoLinkset = {
"linkset": [
{
"anchor": "https://example.com/01/614141123452",
"itemDescription": "Dal Giardino's world famous Risotto Rice with Mushrooms ",
"unixtime":1606376889,
"https://gs1.org/voc/defaultLink": [
{
"href": "https://dalgiardino.com/risotto-rice-with-mushrooms/",
"title": "Product information"
}
],
"https://gs1.org/voc/defaultLinkMulti": [
{
"href": "https://dalgiardino.com/risotto-rice-with-mushrooms/index.html.vi",
"hreflang": ["vi"],
"title": "Product information"
},
{
"href": "https://dalgiardino.com/risotto-rice-with-mushrooms/index.html.es",
"hreflang": ["es"],
"title": "Información del Producto"
}
],
"https://gs1.org/voc/pip": [
{
"href": "https://example.com/en/defaultPage",
"hreflang": ["en"],
"type": "text/html",
"title": "Product information"
},
{
"href": "https://example.com/fr/defaultPage",
"hreflang": ["fr"],
"title": "Information produit"
}
],
"https://gs1.org/voc/whatsInTheBox": [
{
"href": "https://example.com/en/packContents/GB",
"hreflang": ["en"],
"title": "What's in the box?",
"context": "GB"
},
{
"href": "https://example.com/fr/packContents/FR",
"hreflang": ["fr"],
"title": "Qu'y a-t-il dans la boite?",
"context": "FR"
},
{
"href": "https://example.com/fr/packContents/CH",
"hreflang": ["fr"],
"title": "Qu'y a-t-il dans la boite?",
"context": "CH"
}
],
"https://gs1.org/voc/relatedVideo": [
{
"href": "https://video.example",
"hreflang": ["en", "fr"],
"title*": [ { "value": "See it in action!" , "language" : "en" }, { "value": "Voyez-le en action!" , "language" : "fr" } ],
"fwqs": false
}
]
}
]
};
window.onload = setup;
function setup() {
const displayElement = document.getElementById('linksetVizualization');
document.getElementById('refresh').addEventListener('click', function() {
linksetViz(JSON.parse(document.getElementById('linksetInput').value), displayElement);
displayElement.scrollIntoView();
}, false);
document.getElementById('useDemo').addEventListener('click', function() {
document.getElementById('linksetInput').value = JSON.stringify(demoLinkset, undefined, 2);
}, false);
}
</script>
</body></html>