Spaces:
Running
on
Zero
Running
on
Zero
Update index.html
Browse files- index.html +51 -18
index.html
CHANGED
@@ -1,19 +1,52 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>README.md Viewer</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
font-family: Arial, sans-serif;
|
10 |
+
margin: 20px;
|
11 |
+
}
|
12 |
+
pre {
|
13 |
+
background-color: #f4f4f4;
|
14 |
+
padding: 10px;
|
15 |
+
border-radius: 5px;
|
16 |
+
overflow-x: auto;
|
17 |
+
}
|
18 |
+
</style>
|
19 |
+
</head>
|
20 |
+
<body>
|
21 |
+
<h1>README.md Viewer</h1>
|
22 |
+
<div id="readme-content"></div>
|
23 |
+
|
24 |
+
<script>
|
25 |
+
// Function to fetch README.md content
|
26 |
+
async function fetchReadme() {
|
27 |
+
const response = await fetch('README.md');
|
28 |
+
const content = await response.text();
|
29 |
+
return content;
|
30 |
+
}
|
31 |
+
|
32 |
+
// Function to convert Markdown to HTML
|
33 |
+
function markdownToHtml(markdown) {
|
34 |
+
const converter = new showdown.Converter();
|
35 |
+
return converter.makeHtml(markdown);
|
36 |
+
}
|
37 |
+
|
38 |
+
// Main function to display README content
|
39 |
+
async function displayReadme() {
|
40 |
+
const readmeContent = await fetchReadme();
|
41 |
+
const readmeHtml = markdownToHtml(readmeContent);
|
42 |
+
document.getElementById('readme-content').innerHTML = readmeHtml;
|
43 |
+
}
|
44 |
+
|
45 |
+
// Call the main function
|
46 |
+
displayReadme();
|
47 |
+
</script>
|
48 |
+
|
49 |
+
<!-- Include Showdown.js library for Markdown to HTML conversion -->
|
50 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
|
51 |
+
</body>
|
52 |
</html>
|