Skip to content

Commit c68bf89

Browse files
committed
updates to markdown html
1 parent 8f581c3 commit c68bf89

File tree

4 files changed

+95
-4
lines changed

4 files changed

+95
-4
lines changed

discord-rules.html

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
7+
<!-- HTML Meta Tags -->
8+
<title>Discord Server Rules | is-a.dev</title>
9+
<meta name="description" content="By using our service, you agree to the following Terms of Service." />
10+
11+
<!-- Google / Search Engine Tags -->
12+
<meta itemprop="name" content="Terms of Service | is-a.dev" />
13+
<meta itemprop="description" content="By using our service, you agree to the following Terms of Service." />
14+
15+
<!-- Facebook Meta Tags -->
16+
<meta property="og:url" content="https://is-a.dev/terms" />
17+
<meta property="og:type" content="website" />
18+
<meta property="og:title" content="Terms of Service | is-a.dev" />
19+
<meta property="og:description" content="By using our service, you agree to the following Terms of Service." />
20+
21+
<!-- Twitter Meta Tags -->
22+
<meta name="twitter:card" content="summary_large_image" />
23+
<meta name="twitter:title" content="Terms of Service | is-a.dev" />
24+
<meta name="twitter:description" content="By using our service, you agree to the following Terms of Service." />
25+
26+
<!-- Files -->
27+
<link rel="preload" href="https://raw.githubusercontent.com/is-a-dev/register/refs/heads/main/DISCORD_RULES.md" as="fetch" crossorigin="anonymous">
28+
29+
<!-- Stylesheets -->
30+
<link rel="stylesheet" href="styles/github-markdown.min.css" rel="prefetch">
31+
32+
<!-- Scripts -->
33+
<script src="scripts/marked.min.js" rel="prefetch"></script>
34+
</head>
35+
36+
<style>
37+
body {
38+
box-sizing: border-box;
39+
min-width: 200px;
40+
max-width: 980px;
41+
margin: 0 auto;
42+
padding: 45px;
43+
}
44+
45+
@media (prefers-color-scheme: dark) {
46+
body {
47+
background-color: #0d1117;
48+
}
49+
}
50+
</style>
51+
52+
<body>
53+
<div class="markdown-body" id="terms-of-service"><p>Loading...</p></div>
54+
55+
<script>
56+
const markdownUrl = "https://raw.githubusercontent.com/is-a-dev/register/refs/heads/main/DISCORD_RULES.md";
57+
58+
const container = document.getElementById("terms-of-service");
59+
60+
// Fetch the Markdown file
61+
fetch(markdownUrl)
62+
.then(response => {
63+
if (!response.ok) {
64+
throw new Error(`Error fetching the file: ${response.statusText}`);
65+
}
66+
return response.text();
67+
})
68+
.then(markdown => {
69+
// Convert Markdown to HTML using Marked.js
70+
const htmlContent = marked.parse(markdown);
71+
72+
// Insert the HTML into the container
73+
container.innerHTML = htmlContent;
74+
})
75+
.catch(err => {
76+
console.error(err);
77+
container.innerHTML = `<h3>An error occurred</h3><pre><code>${err}</code></pre>`;
78+
});
79+
</script>
80+
</body>
81+
</html>

scripts/marked.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)