Skip to content

Commit 110c725

Browse files
committed
1
1 parent f049cc8 commit 110c725

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed

web/md_file/page.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@charset "utf-8";
2+
3+

web/md_file/page.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
5+
<meta charset="utf-8" />
6+
<title>git</title>
7+
<link rel="stylesheet" type="text/css" href="../core.css" />
8+
<link rel="stylesheet" type="text/css" href="../menu.css" />
9+
<link rel="stylesheet" type="text/css" href="./page.css" />
10+
<script type="text/javascript" src="../core.js"></script>
11+
<script type="text/javascript" src="../menu.js"></script>
12+
<script type="text/javascript" src="../mainmenu.js"></script>
13+
<script type="text/javascript" src="./page.js"></script>
14+
15+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
16+
17+
</head>
18+
<body>
19+
<div id="contents">
20+
21+
<div id="markdown_view">
22+
</div>
23+
24+
<div id="markdown_view2">
25+
</div>
26+
27+
<script>
28+
29+
function renderMarkdwon(markdown_url, markdown_view_id) {
30+
var xmlhttp = new XMLHttpRequest();
31+
xmlhttp.onreadystatechange =
32+
function () {
33+
if (this.readyState == 4 && this.status == 200) {
34+
const html = marked.parse(markdown);
35+
document.getElementById(markdown_view_id).innerHTML = html;
36+
}
37+
};
38+
39+
xmlhttp.open("GET", markdown_url, true);
40+
xmlhttp.send();
41+
}
42+
43+
renderMarkdwon("./page.md", "markdown_view");
44+
renderMarkdwon("https://code1009.github.io/web/md_file/page.md", "markdown_view2");
45+
46+
</script>
47+
</div>
48+
</body>
49+
</html>

web/md_file/page.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/////////////////////////////////////////////////////////////////////////////
2+
//===========================================================================
3+
"use strict";
4+
5+
6+
7+
8+
9+
/////////////////////////////////////////////////////////////////////////////
10+
//===========================================================================
11+
class Page {
12+
13+
#Context = null;
14+
15+
constructor() {
16+
this.#Context = null;
17+
}
18+
}
19+
20+
21+
22+
23+
24+
/////////////////////////////////////////////////////////////////////////////
25+
//===========================================================================
26+
var _Page = null;
27+
28+
29+
30+
31+
32+
/////////////////////////////////////////////////////////////////////////////
33+
//===========================================================================
34+
function pageInitialize() {
35+
_Page = new Page();
36+
}
37+
38+
39+
40+
41+
42+
/////////////////////////////////////////////////////////////////////////////
43+
//===========================================================================
44+
window.onload = function () {
45+
coreInitialize();
46+
mainMenuInitialize();
47+
pageInitialize();
48+
}
49+
50+

web/md_file/page.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# code1009
2+

0 commit comments

Comments
 (0)