-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (60 loc) · 1.82 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>README Viewer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/4.0.18/marked.min.js"></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
background-color: #f4f4f4;
color: #333;
}
#content {
max-width: 800px;
margin: auto;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1, h2, h3 {
color: #444;
}
pre {
background: #272822;
color: #f8f8f2;
padding: 10px;
border-radius: 5px;
overflow-x: auto;
}
code {
font-family: monospace;
background: #eee;
padding: 2px 4px;
border-radius: 4px;
}
</style>
</head>
<body>
<div id="content">Loading README...</div>
<script>
function loadReadme() {
const timestamp = new Date().getTime(); // Unique cache-busting value
fetch(`README.md?nocache=${timestamp}`)
.then(response => response.text())
.then(markdown => {
document.getElementById("content").innerHTML = marked.parse(markdown);
})
.catch(error => {
document.getElementById("content").innerText = "Failed to load README.";
console.error("Error fetching README:", error);
});
}
loadReadme();
setInterval(loadReadme, 5000); // Auto-refresh every 5 seconds
</script>
</body>
</html>