-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
166 lines (149 loc) · 3.62 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
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.0/styles/default.min.css"
/>
<title>Exception Error</title>
</head>
<style type="text/css" media="all">
* {
margin: 0;
padding: 0;
}
body {
color: white;
background-color: #510303;
}
header {
padding: 25px 10px;
padding-left: 20px;
border-radius: 0 0 25px 25px;
background-color: #a60303;
}
header h3 {
font-size: 18px;
font-family: Tahoma;
margin-bottom: 10px;
text-transform: uppercase;
font-weight: 700;
}
header span {
font-family:
Comic Sans MS,
Sans-Serif;
font-weight: 500;
font-size: 14px;
}
.h {
color: whitesmoke;
font-size: 18px;
font-weight: 700;
margin-left: 5px;
font-family: Tahoma, Sans-Serif;
}
.container {
padding: 15px;
margin-top: 10px;
}
.code-wrapper {
padding: 10px;
font-size: 15px;
margin-top: 10px;
border-radius: 10px;
background-color: #714935;
font-family: Tahoma, Sans-Serif;
}
.code-wrapper > span {
color: white;
display: block;
margin-bottom: 13px;
word-break: break-word;
overflow-wrap: break-word;
}
.code-wrapper span:last-child {
margin-bottom: 0;
}
.code-wrapper.stack > span {
color: #d0d0d0;
}
.code-wrapper pre code {
padding: 10px 0;
font-size: 14px;
min-height: 20px;
border-radius: 7px;
background-color: #ba9582;
}
.highlighted-line {
padding-right: 10px;
background-color: #ff00006f;
}
.hljs-line-numbers {
padding-left: 12px;
margin-right: 10px;
padding-right: 10px;
user-select: none;
border-right: 1px solid #ccc;
}
</style>
<body>
<header>
<h3>Parse Error</h3>
<span>Syntax error, unexpected T_STRING</span>
</header>
<div class="container">
<span class="h">Source File »</span>
<div class="code-wrapper">
<span><b>File: </b>../components/style/App.style</span>
<pre><code class="language-php">
<?php
echo 'Hello, world!';
echo 'This is an error line!';
echo 'Another line of code.';
?>
</code></pre>
</div>
</div>
<div class="container" style="margin-top: -5px">
<span class="h">Call Stack »</span>
<div class="code-wrapper stack">
<span>1. ../components/style/App.style</span>
<span>2. ../components/style/App.style</span>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.0/highlight.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', event => {
document.querySelectorAll('pre code').forEach(block => {
hljs.highlightBlock(block)
addLineNumbers(block)
highlightSpecificLines(block, [4])
})
})
function addLineNumbers(block) {
const lines = block.innerHTML.split('\n')
block.innerHTML = lines
.map((line, index) => {
return `<span class="hljs-line-numbers">${
index + 1
}</span>${line}`
})
.join('\n')
}
function highlightSpecificLines(block, linesToHighlight) {
const lines = block.innerHTML.split('\n')
block.innerHTML = lines
.map((line, index) => {
if (linesToHighlight.includes(index + 1)) {
return `<span class="highlighted-line">${line}</span>`
}
return line
})
.join('\n')
}
</script>
</body>
</html>