prithivMLmods commited on
Commit
4143239
·
verified ·
1 Parent(s): 8173bff

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +51 -18
index.html CHANGED
@@ -1,19 +1,52 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>README.md Viewer</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ margin: 20px;
11
+ }
12
+ pre {
13
+ background-color: #f4f4f4;
14
+ padding: 10px;
15
+ border-radius: 5px;
16
+ overflow-x: auto;
17
+ }
18
+ </style>
19
+ </head>
20
+ <body>
21
+ <h1>README.md Viewer</h1>
22
+ <div id="readme-content"></div>
23
+
24
+ <script>
25
+ // Function to fetch README.md content
26
+ async function fetchReadme() {
27
+ const response = await fetch('README.md');
28
+ const content = await response.text();
29
+ return content;
30
+ }
31
+
32
+ // Function to convert Markdown to HTML
33
+ function markdownToHtml(markdown) {
34
+ const converter = new showdown.Converter();
35
+ return converter.makeHtml(markdown);
36
+ }
37
+
38
+ // Main function to display README content
39
+ async function displayReadme() {
40
+ const readmeContent = await fetchReadme();
41
+ const readmeHtml = markdownToHtml(readmeContent);
42
+ document.getElementById('readme-content').innerHTML = readmeHtml;
43
+ }
44
+
45
+ // Call the main function
46
+ displayReadme();
47
+ </script>
48
+
49
+ <!-- Include Showdown.js library for Markdown to HTML conversion -->
50
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
51
+ </body>
52
  </html>