in progress

This commit is contained in:
tanabe 2011-05-17 01:26:21 +09:00
commit fd25e620fe
5 changed files with 1604 additions and 0 deletions

87
css/style.css Normal file
View File

@ -0,0 +1,87 @@
body {
margin: 0;
padding: 0;
background-color: white;
font: helvetica, arial, freesans, clean, sans-serif;
font-size: 1em;
line-height: 2em;
}
h1, h2, h3, h4, h5, h6, p {
font-size: 1em;
margin: 0;
padding: 0;
font-weight: normal;
}
p {
margin: 1em;
}
#container {
width: 1000px;
margin: 0 auto;
}
#container .section {
margin-bottom: 20px;
}
#markdown {
width: 800px;
height: 200px;
font-size: 1em;
}
#output {
background-color: #f8f8f8;
border: 1px solid #ccc;
min-height: 100px;
padding: 10px;
}
#output p {
line-height: 1.3em;
}
#output h1,
#output h2,
#output h3,
#output h4,
#output h5,
#output h6 {
font-weight: bold;
}
#output h1 {
font-size: 1.7em;
}
#output h2 {
font-size: 1.5em;
}
#output h3 {
font-size: 1em;
}
#output ol,
#output ul {
margin: 0;
}
#output blockquote,
#output pre {
margin: 0;
padding: 5px;
color: #444;
background-color: #eee;
border: 1px solid #ddd;
line-height: 1.5em;
}
#output code {
margin: 0;
padding: 0;
line-height: 1em;
}

42
index.html Normal file
View File

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="content-language" content="ja">
<title>Markdown Live Previewer</title>
<meta http-equiv="content-script-type" content="text/javascript">
<meta http-equiv="content-style-type" content="text/css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/markdown.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body>
<div id="container">
<h1>Markdown Live Previewer</h1>
<div class="section">
<h2>markdown</h2>
<textarea id="markdown"></textarea>
</div>
<div class="section">
<h2>output</h2>
<div id="output"></div>
</div>
<div class="section">
<h2>html</h2>
<div id="html">todo</div>
</div>
<div class="section">
<h2>reference</h2>
<div id="reference">todo</div>
</div>
</div>
</body>
</html>

18
js/jquery-1.6.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

5
js/main.js Normal file
View File

@ -0,0 +1,5 @@
$(function() {
$("#markdown").bind("keyup", function() {
$("#output").html(markdown.toHTML($("#markdown").val()));
});
});

1452
js/markdown.js Normal file

File diff suppressed because it is too large Load Diff