Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
60 lines (57 loc) · 1.55 KB
/
Copy pathindex.html
File metadata and controls
60 lines (57 loc) · 1.55 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://euclidos.org/favicon.ico" type="image/x-icon" sizes="256x256"/>
<title>Euclid Docs</title>
<style>
body {
font-family: "Inter", "Segoe UI", sans-serif;
background: #fff;
color: #24292e;
padding: 2rem;
line-height: 1.7;
max-width: 900px;
margin: auto;
}
pre {
background: #f6f8fa;
padding: 10px;
border-radius: 6px;
overflow-x: auto;
}
code {
background: #f6f8fa;
padding: 2px 5px;
border-radius: 4px;
font-family: monospace;
}
</style>
<script src="https://hardikpro.netlify.app/markdown.js"></script>
</head>
<body>
<h2 id="loading">Loading…</h2>
<div id="content"></div>
<script>
const params = new URLSearchParams(window.location.search);
const url = params.get("url");
const contentDiv = document.getElementById("content");
const loading = document.getElementById("loading");
if (!url) {
loading.textContent = "This website provides flashing guides for all officially supported devices";
} else {
fetch(url)
.then(r => r.text())
.then(md => {
const mdParser = window.markdownit({html: false, linkify: true, typographer: true});
contentDiv.innerHTML = mdParser.render(md);
loading.remove();
})
.catch(err => {
loading.textContent = "Failed to load Markdown: " + err;
});
}
</script>
</body>
</html>