Skip to content

Commit 4d709dc

Browse files
authored
create tos
1 parent c650bc0 commit 4d709dc

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

tos.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
<title>Terms of Service | is-a.dev</title>
8+
9+
<!-- Stylesheets -->
10+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.8.1/github-markdown.min.css">
11+
12+
<!-- Scripts -->
13+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
14+
</head>
15+
16+
<body>
17+
<div class="markdown-body" id="terms-of-service"></div>
18+
19+
<script>
20+
const markdownUrl = 'https://raw.githubusercontent.com/is-a-dev/register/refs/heads/main/TERMS_OF_SERVICE.md';
21+
22+
const container = document.getElementById('terms-of-service');
23+
24+
// Fetch the Markdown file
25+
fetch(markdownUrl)
26+
.then(response => {
27+
if (!response.ok) {
28+
throw new Error(`Error fetching the file: ${response.statusText}`);
29+
}
30+
return response.text();
31+
})
32+
.then(markdown => {
33+
// Convert Markdown to HTML using Marked.js
34+
const htmlContent = marked.parse(markdown);
35+
36+
// Insert the HTML into the container
37+
container.innerHTML = htmlContent;
38+
})
39+
.catch(error => {
40+
console.error('Error:', error);
41+
container.innerHTML = '<p>Failed to load Terms of Service.</p>';
42+
});
43+
</script>
44+
</body>
45+
</html>

0 commit comments

Comments
 (0)