Update index.hmtl to render markdown
Browse files- index.html +118 -18
index.html
CHANGED
@@ -1,19 +1,119 @@
|
|
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>Render Markdown</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
font-family: 'Arial', sans-serif;
|
10 |
+
line-height: 1.6;
|
11 |
+
margin: 0;
|
12 |
+
padding: 20px;
|
13 |
+
background-color: #f7f7f7;
|
14 |
+
color: #333;
|
15 |
+
}
|
16 |
+
|
17 |
+
h1, h2, h3, h4, h5, h6 {
|
18 |
+
font-weight: 600;
|
19 |
+
color: #222;
|
20 |
+
}
|
21 |
+
|
22 |
+
p {
|
23 |
+
font-size: 1rem;
|
24 |
+
margin-bottom: 1.25em;
|
25 |
+
}
|
26 |
+
|
27 |
+
a {
|
28 |
+
color: #0366d6;
|
29 |
+
text-decoration: none;
|
30 |
+
}
|
31 |
+
|
32 |
+
a:hover {
|
33 |
+
text-decoration: underline;
|
34 |
+
}
|
35 |
+
|
36 |
+
pre, code {
|
37 |
+
font-family: 'Courier New', monospace;
|
38 |
+
background-color: #f4f4f4;
|
39 |
+
padding: 4px 6px;
|
40 |
+
border-radius: 4px;
|
41 |
+
font-size: 1rem;
|
42 |
+
}
|
43 |
+
|
44 |
+
blockquote {
|
45 |
+
border-left: 4px solid #ccc;
|
46 |
+
padding-left: 16px;
|
47 |
+
margin: 16px 0;
|
48 |
+
color: #666;
|
49 |
+
font-style: italic;
|
50 |
+
}
|
51 |
+
|
52 |
+
ul, ol {
|
53 |
+
margin-left: 20px;
|
54 |
+
}
|
55 |
+
|
56 |
+
li {
|
57 |
+
margin-bottom: 8px;
|
58 |
+
}
|
59 |
+
|
60 |
+
/* Smooth font rendering */
|
61 |
+
* {
|
62 |
+
-webkit-font-smoothing: antialiased;
|
63 |
+
-moz-osx-font-smoothing: grayscale;
|
64 |
+
}
|
65 |
+
|
66 |
+
/* Remove the box around the content */
|
67 |
+
#markdown-content {
|
68 |
+
max-width: 800px;
|
69 |
+
margin: 0 auto;
|
70 |
+
}
|
71 |
+
|
72 |
+
/* GitHub Badge styling */
|
73 |
+
#github-badge {
|
74 |
+
display: block;
|
75 |
+
width: 200px;
|
76 |
+
margin: 20px auto;
|
77 |
+
text-align: center;
|
78 |
+
}
|
79 |
+
|
80 |
+
#github-badge img {
|
81 |
+
width: 100%;
|
82 |
+
}
|
83 |
+
</style>
|
84 |
+
<!-- Include marked.js via CDN -->
|
85 |
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
86 |
+
</head>
|
87 |
+
<body>
|
88 |
+
<!-- GitHub Badge linking to the repository -->
|
89 |
+
<a id="github-badge" href="https://github.com/kesimeg/awesome-turkish-language-models" target="_blank">
|
90 |
+
<img src="https://img.shields.io/badge/GitHub-View%20Repository-blue?logo=github" alt="GitHub Badge">
|
91 |
+
</a>
|
92 |
+
|
93 |
+
<div class="content">
|
94 |
+
<div id="markdown-content"></div>
|
95 |
+
</div>
|
96 |
+
|
97 |
+
<script>
|
98 |
+
// Function to fetch and render the Markdown file from a remote URL
|
99 |
+
async function loadMarkdown() {
|
100 |
+
try {
|
101 |
+
// Fetch the README.md file from a hosted URL
|
102 |
+
const response = await fetch("https://raw.githubusercontent.com/kesimeg/awesome-turkish-language-models/refs/heads/main/README.md");
|
103 |
+
const markdownText = await response.text();
|
104 |
+
|
105 |
+
// Convert markdown to HTML using 'marked'
|
106 |
+
const htmlContent = marked.parse(markdownText);
|
107 |
+
|
108 |
+
// Inject the HTML into the page
|
109 |
+
document.getElementById('markdown-content').innerHTML = htmlContent;
|
110 |
+
} catch (error) {
|
111 |
+
console.error("Error loading the markdown file:", error);
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
// Load the markdown content automatically
|
116 |
+
loadMarkdown();
|
117 |
+
</script>
|
118 |
+
</body>
|
119 |
</html>
|