networkException
586546ee57
This patch removes the Next.js React project that was contained by this repository previously. The replacement is a vanilla HTML page with TypeScript that parses it's own HTML source and highlights it using on load. The concept will be iterated on in following commits, planned are on hover tooltips showing metadata about HTML tokens as well as tokenizing (perhaps parsing) of JavaScript and CSS to be able to highlight those sections as well. To properly determent the range of script and style sections it might be required to also implement HTML tree building, however on read execution of JavaScript or on the fly parsing as well as fragment parsing is not required for the site. This commit merely represents a start and is made to better track the progress of changes.
25 lines
826 B
HTML
25 lines
826 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>nwex.de</title>
|
|
</head>
|
|
<body style="background: #292D3E;">
|
|
<h1>networkException</h1>
|
|
<p></p>
|
|
<script type="module">
|
|
import { tokenize, normalizeNewlines, highlight } from './html.js';
|
|
import { render } from './view.js';
|
|
|
|
const response = await fetch(window.location.href);
|
|
const text = await response.text();
|
|
|
|
const tokens = tokenize(normalizeNewlines(text));
|
|
const nodes = highlight(tokens);
|
|
|
|
document.body.replaceChildren(render(nodes));
|
|
</script>
|
|
</body>
|
|
</html>
|