-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
47 lines (47 loc) · 1.41 KB
/
index.html
File metadata and controls
47 lines (47 loc) · 1.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dotfiles — macOS & Linux Development Environment</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.5.1/github-markdown-dark.min.css">
<style>
body {
background: #0d1117;
color: #e6edf3;
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.markdown-body {
max-width: 960px;
margin: 0 auto;
padding: 2rem 1.5rem;
}
.loading {
text-align: center;
padding: 4rem;
color: #8b949e;
}
</style>
</head>
<body>
<article class="markdown-body" id="content">
<p class="loading">Loading...</p>
</article>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.1/marked.min.js"></script>
<script>
const repo = "cassmtnr/dotfiles";
const branch = "main";
fetch(`https://raw.githubusercontent.com/${repo}/${branch}/README.md`)
.then(r => r.text())
.then(md => {
document.getElementById("content").innerHTML = marked.parse(md);
})
.catch(() => {
document.getElementById("content").innerHTML =
`<p>Failed to load README. <a href="https://github.com/${repo}">View on GitHub</a></p>`;
});
</script>
</body>
</html>