Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
76 lines (74 loc) · 2.13 KB
/
Copy pathindex.html
File metadata and controls
76 lines (74 loc) · 2.13 KB
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
<html>
<head>
<link rel="icon" href="logo.svg">
<script>
// REGISTER ERROR OVERLAY
var hasError = null
const showErrorOverlay = err => {
// must be within function call because that's when the element is defined for sure.
const ErrorOverlay = customElements.get('vite-error-overlay')
console.log(err)
// don't open outside vite environment
if (!ErrorOverlay || hasError) {return}
hasError = true
const overlay = new ErrorOverlay(err)
document.body.appendChild(overlay)
}
window.addEventListener('error', showErrorOverlay)
window.addEventListener('unhandledrejection', ({reason}) => showErrorOverlay(reason))
</script>
<script defer type="module" src="/src/client.js">
</script>
<style>
body {
font-family: monospace;
background: #222;
color: white;
}
h1 {
margin: 0
}
h2 {
margin: 0
}
h3 {
margin: 0
}
.has-suggestion {
cursor: pointer;
}
.message-span {
color: var(--color);
position: relative;
}
.has-suggestion {
position: relative;
}
.has-suggestion:hover {
color: black;
}
.has-suggestion:hover::after {
opacity: 1;
}
.has-suggestion > span {
position: relative;
z-index: 100;
}
.has-suggestion::after {
top: 0;
left: 0;
content: '';
display: block;
position: absolute;
opacity: 0.2;
width: 100%;
height: 100%;
background-color: var(--color, cyan);
}
</style>
</head>
<body>
<div id = "app">
</div>
</body>
</html>