-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
238 lines (208 loc) · 6.17 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Alicante Workshop</title>
<style>
body {
margin: 0;
}
/* General container styling */
#root {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 20px auto;
/* Center the div horizontally */
}
/* Header */
h1 {
font-size: 24px;
font-weight: bold;
margin-bottom: 20px;
}
/* GitHub Feed header */
h2 {
font-size: 20px;
margin-bottom: 15px;
}
/* User Info */
.d-flex.flex-items-baseline.py-4 {
display: flex;
align-items: center;
}
.avatar-user {
border-radius: 50%;
margin-right: 10px;
}
a {
color: #0366d6;
text-decoration: none;
font-weight: bold;
}
/* Commit Box */
.Box {
background-color: #f9f9f9;
border: 1px solid #e1e4e8;
border-radius: 6px;
padding: 10px;
margin-top: 15px;
}
/* Commit List */
.commits ul {
list-style: none;
padding-left: 0;
margin-top: 10px;
}
.commits li {
display: flex;
align-items: center;
margin-bottom: 8px;
padding: 8px;
background-color: #f1f1f1;
/* Light background for commit items */
border-radius: 4px;
border: 1px solid #e1e4e8;
/* Light border */
}
/* Contributors Section */
.p-3.border-top {
padding: 1rem;
border-top: 1px solid #e1e4e8;
}
.h6 {
font-size: 16px;
margin-bottom: 10px;
color: #586069;
}
.mt-1.mb-3 {
margin-top: 0.25rem;
margin-bottom: 1rem;
}
.list-style-none.d-flex.flex-wrap.mb-n2 {
list-style: none;
display: flex;
/* Ensure items are aligned horizontally */
flex-wrap: wrap;
/* Allow wrapping to the next line if necessary */
margin-left: -8px;
/* Adjust left margin for better alignment */
margin-bottom: -8px;
/* Adjust bottom margin to reduce extra space */
}
.list-style-none.d-flex.flex-wrap.mb-n2 li {
margin-left: 8px;
/* Space between avatars horizontally */
margin-bottom: 8px;
/* Space between avatars vertically (if they wrap) */
}
#error-dialog {
font-family: sans-serif;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: white;
padding: 15px;
opacity: 0.9;
text-wrap: wrap;
overflow: scroll;
}
.text-red {
color: red;
}
pre {
text-wrap: wrap;
}
pre.nowrap {
text-wrap: nowrap;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<div id="error-dialog" class="hidden">
<h1 id="error-title" class="text-red"></h1>
<h3>
<pre id="error-message"></pre>
</h3>
<p>
<pre id="error-body"></pre>
</p>
<h4 class="-mb-20">This error occurred at:</h4>
<pre id="error-component-stack" class="nowrap"></pre>
<h4 class="mb-0">Call stack:</h4>
<pre id="error-stack" class="nowrap"></pre>
<div id="error-cause">
<h4 class="mb-0">Caused by:</h4>
<pre id="error-cause-message"></pre>
<pre id="error-cause-stack" class="nowrap"></pre>
</div>
<button id="error-close" class="mb-10" onclick="document.getElementById('error-dialog').classList.add('hidden')">
Close
</button>
<h3 id="error-not-dismissible">This error is not dismissible.</h3>
</div>
<div id="root"></div>
<script type="module" src="App.mjs"></script>
<script>new EventSource('/esbuild').addEventListener('change', () => location.reload())</script>
<script>
function __global__reportError({ title, error, dismissable }) {
const errorDialog = document.getElementById("error-dialog");
const errorTitle = document.getElementById("error-title");
const errorMessage = document.getElementById("error-message");
const errorBody = document.getElementById("error-body");
const errorStack = document.getElementById("error-stack");
const errorClose = document.getElementById("error-close");
const errorCause = document.getElementById("error-cause");
const errorCauseMessage = document.getElementById("error-cause-message");
const errorCauseStack = document.getElementById("error-cause-stack");
const errorNotDismissible = document.getElementById("error-not-dismissible");
// Set the title
errorTitle.innerText = title;
// Display error message and body
const [heading, body] = error.message.split(/\n(.*)/s);
errorMessage.innerText = heading;
if (body) {
errorBody.innerText = body;
} else {
errorBody.innerText = '';
}
// Display the call stack
// Since we already displayed the message, strip it, and the first Error: line.
errorStack.innerText = error.stack.replace(error.message, '').split(/\n(.*)/s)[1];
// Display the cause, if available
if (error.cause && error.cause !== undefined) {
errorCauseMessage.innerText = error.cause;
errorCause.classList.remove('hidden');
} else {
errorCause.classList.add('hidden');
}
// Display the close button, if dismissible
if (dismissable) {
errorNotDismissible.classList.add('hidden');
errorClose.classList.remove("hidden");
} else {
errorNotDismissible.classList.remove('hidden');
errorClose.classList.add("hidden");
}
// Show the dialog
errorDialog.classList.remove("hidden");
}
function __global__reportUncaughtError(message, error) {
__global__reportError({ title: "Uncaught Error", error, dismissable: true });
}
window.onerror = function (message, source, lineno, colno, error) {
console.error('Global Error:', message, source, lineno, colno, error);
__global__reportUncaughtError(message, error);
};
window.onunhandledrejection = function (event) {
console.error('Unhandled Promise Rejection:', event.reason);
__global__reportUncaughtError('Unhandled Promise Rejection', event.reason);
};
</script>
</body>
</html>