wop commited on
Commit
97c7847
·
verified ·
1 Parent(s): 0acba39

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +34 -5
index.html CHANGED
@@ -3,17 +3,15 @@
3
  <head>
4
  <meta charset="UTF-8">
5
 
6
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.5.1/github-markdown-light.min.css">
 
7
 
8
  <style>
9
  body{
10
  background:#0d1117;
11
- margin:0;
12
  }
13
 
14
  .markdown-body{
15
- box-sizing:border-box;
16
- min-width:200px;
17
  max-width:980px;
18
  margin:40px auto;
19
  padding:45px;
@@ -28,13 +26,44 @@ body{
28
 
29
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
30
 
 
 
31
  <script>
 
 
32
  fetch("https://raw.githubusercontent.com/koo1140/AI-Reseach-papers-by-me/main/AGI%20papers/deep-research-report.md")
33
  .then(r => r.text())
34
  .then(md => {
35
- document.getElementById("content").innerHTML = marked.parse(md);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  });
37
  </script>
38
 
 
 
 
 
 
 
 
 
 
39
  </body>
40
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
 
6
+ <link rel="stylesheet"
7
+ href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.5.1/github-markdown-dark.min.css">
8
 
9
  <style>
10
  body{
11
  background:#0d1117;
 
12
  }
13
 
14
  .markdown-body{
 
 
15
  max-width:980px;
16
  margin:40px auto;
17
  padding:45px;
 
26
 
27
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
28
 
29
+ <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
30
+
31
  <script>
32
+ mermaid.initialize({ startOnLoad:false });
33
+
34
  fetch("https://raw.githubusercontent.com/koo1140/AI-Reseach-papers-by-me/main/AGI%20papers/deep-research-report.md")
35
  .then(r => r.text())
36
  .then(md => {
37
+
38
+ const html = marked.parse(md);
39
+
40
+ document.getElementById("content").innerHTML = html;
41
+
42
+ // render mermaid graphs
43
+ document.querySelectorAll("code.language-mermaid").forEach(el=>{
44
+ const pre = el.parentElement;
45
+ const div = document.createElement("div");
46
+ div.className="mermaid";
47
+ div.textContent = el.textContent;
48
+ pre.replaceWith(div);
49
+ });
50
+
51
+ mermaid.init();
52
+
53
+ // render math
54
+ MathJax.typeset();
55
+
56
  });
57
  </script>
58
 
59
+ <!-- MathJax -->
60
+ <script>
61
+ window.MathJax = {
62
+ tex: { inlineMath: [['$', '$'], ['\\(', '\\)']] }
63
+ };
64
+ </script>
65
+
66
+ <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
67
+
68
  </body>
69
  </html>