-
Notifications
You must be signed in to change notification settings - Fork 5
/
esm.html
47 lines (47 loc) · 1.14 KB
/
esm.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shikitor</title>
<script type="importmap">
{
"imports": {
"shiki": "https://cdn.jsdelivr.net/npm/shiki@^1.6.2/+esm",
"@shikijs/core": "https://cdn.jsdelivr.net/npm/@shikijs/core@^1.6.2/+esm",
"@shikitor/core": "https://cdn.jsdelivr.net/npm/@shikitor/core@latest/+esm"
}
}
</script>
<style>
html, body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
font-family: sans-serif;
font-size: 16px;
}
h1 {
margin: 0;
padding: 1rem;
background-color: #333;
color: #fff;
text-align: center;
}
</style>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/@shikitor/core/dist/index.css'>
</head>
<body>
<h1>Shikitor</h1>
<div id="app" style="height: 100%"></div>
<script type='module'>
import { create } from '@shikitor/core';
const shikitor = create(document.querySelector('#app'), {
theme: 'github-light',
lang: 'javascript',
value: `console.log('Hello, Shikitor!');`,
plugins: []
});
</script>
</body>
</html>