-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample-cdn.html
59 lines (50 loc) · 2.17 KB
/
sample-cdn.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Alpheios Embedded Sample Page</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/alpheios-components@latest/dist/style/style-components.min.css"/>
</head>
<body>
<p>This is a sample file which shows how to use the alpheios-embedded library from the CDN</p>
<div class="alpheios-enabled" style="max-width:400px;">
<div lang="lat">
<p lang="eng" data-alpheios-ignore="all">(Latin)</p>
<p lang="lat">Arma virumque canō</p>
</div>
<div xml:lang="grc">
<p lang="eng" data-alpheios-ignore="all">(Greek)</p>
<p lang="grc">μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος</p>
</div>
<div lang="ara" dir="rtl">
<p lang="eng" data-alpheios-ignore="all">(Arabic)</p>
<p lang="ara" dir="rtl">بسم الله</p>
</div>
<div lang="per" dir="rtl">
<p lang="eng" data-alpheios-ignore="all">(Persian)</p>
<p lang="per" dir="rtl">صلاح کار کجا و من خراب کجا</p>
</div>
<div lang="gez" dir="ltr">
<p lang="eng" data-alpheios-ignore="all">(Ancient Ethiopic)</p>
ይትባረክ፡ እግዚአብሔር፡ አምላከ፡ እስራኤል፡ አምላክ፡ ለኵሉ፡ መንፈስ፡ ወለኵሉ፡ ዘሥጋ፡ ወይቤሎ፡ እግዚአብሔር፡ ለእዝራ፡ አእምር፡ ወጠይቅ፡
</div>
</div>
</div>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(event) {
import ("https://cdn.jsdelivr.net/npm/alpheios-embedded@latest/dist/alpheios-embedded.min.js").then(embedLib => {
window.AlpheiosEmbed.importDependencies({
mode: 'cdn'
}).then(Embedded => {
new Embedded({clientId: 'alpheios-sample-cdn'}).activate();
}).catch(e => {
console.error(`Import of Alpheios embedded library dependencies failed: ${e}`)
})
}).catch(e => {
console.error(`Import of Alpheios Embedded library failed: ${e}`)
})
});
</script>
</body>
</html>