Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zm50 committed Jan 7, 2024
1 parent 08c3d7d commit 5c86208
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 18 deletions.
14 changes: 12 additions & 2 deletions tool/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,25 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/assets/img/favicon.ico">
<link rel="stylesheet" type="text/css" href="./style.css">
<link rel="stylesheet" type="text/css" href="../../assets/style/style.css">
<title>醉墨编程</title>
<link rel="stylesheet" type="text/css" href="./style.css">
<script src="./switch.js"></script>
</head>
<header>
<nav>
<a href="/">网站首页</a>
<a href="/code/">编程空间</a>
<a href="/game/">在线游戏</a>
<a href="/tool/">在线工具</a>
<a href="/tips/">充电打赏</a>
</nav>
</header>

<body>
<div id="head">
<button id="preview">预览效果</button>
<button id="html2mark">HTML转换MarkDown</button>
<button id="html2md">HTML转换MarkDown</button>
</div>
<div id="editor">
<textarea id="input"></textarea>
Expand Down
2 changes: 1 addition & 1 deletion tool/html/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ preview.onclick = () => {
output.innerHTML = input.value
}

html2mark.onclick = () => {
html2md.onclick = () => {
opt = 1
output.innerText = turn.turndown(input.value)
}
11 changes: 5 additions & 6 deletions tool/html/style.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
body {
margin: 0;
}

#head {
position: fixed;
z-index: 1;
}

#editor {
position: fixed;
display: flex;
height: 100vh;
}

button {
background-color: #3d9;
width: 150px;
}

#input,
#output {
flex: 1;
height: 100%;
width: 50vw;
box-sizing: border-box;
padding: 30px;
background-color: #fff;
}

#input {
Expand Down
13 changes: 11 additions & 2 deletions tool/md/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,25 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/assets/img/favicon.ico">
<link rel="stylesheet" type="text/css" href="/assets/style/style.css">
<link rel="stylesheet" type="text/css" href="../../assets/style/style.css">
<title>醉墨编程</title>
<link rel="stylesheet" type="text/css" href="./style.css">
<script src="./switch.js"></script>
</head>
<header>
<nav>
<a href="/">网站首页</a>
<a href="/code/">编程空间</a>
<a href="/game/">在线游戏</a>
<a href="/tool/">在线工具</a>
<a href="/tips/">充电打赏</a>
</nav>
</header>

<body>
<div id="head">
<button id="preview">预览效果</button>
<button id="mark2html">MarkDown转换HTML</button>
<button id="md2html">MarkDown转换HTML</button>
</div>
<div id="editor">
<textarea id="input"></textarea>
Expand Down
2 changes: 1 addition & 1 deletion tool/md/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ preview.onclick = () => {
output.innerHTML = marked.parse(input.value)
}

mark2html.onclick = () => {
md2html.onclick = () => {
opt = 1
output.innerText = marked.parse(input.value)
}
11 changes: 5 additions & 6 deletions tool/md/style.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
body {
margin: 0;
}

#head {
position: fixed;
z-index: 1;
}

#editor {
position: fixed;
display: flex;
height: 100vh;
}

button {
background-color: #3d9;
width: 150px;
}

#input,
#output {
flex: 1;
height: 100%;
width: 50vw;
box-sizing: border-box;
padding: 30px;
background-color: #fff;
}

#input {
Expand Down

0 comments on commit 5c86208

Please sign in to comment.