2016-05-03 17:27:30 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Live Markdown</title>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<script src="https://cdn.jsdelivr.net/jquery/2.2.3/jquery.min.js"></script>
|
2016-05-03 18:01:40 +02:00
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/font-hack/2.018/css/hack.min.css">
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css" media="screen">
|
|
|
|
<link rel="stylesheet" href="https://ludikovsky.name/blog/blog.css" type="text/css" media="screen">
|
2016-05-03 17:27:30 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2016-05-03 18:01:40 +02:00
|
|
|
<div class="col-md-2"></div>
|
|
|
|
<div id="input" class="col-md-4">
|
|
|
|
<textarea id="markdown" name="markdown" rows="25" cols="80" style="max-width: 100%"></textarea>
|
2016-05-03 17:27:30 +02:00
|
|
|
</div>
|
2016-05-03 18:01:40 +02:00
|
|
|
<div class="container col-md-4">
|
|
|
|
<article>
|
|
|
|
<div id="output">
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2"></div>
|
2016-05-03 17:27:30 +02:00
|
|
|
<script>
|
2016-05-03 18:01:40 +02:00
|
|
|
$('#input').on('input',
|
2016-05-03 17:27:30 +02:00
|
|
|
function(){
|
|
|
|
$.ajax({
|
|
|
|
url: "http://localhost:5000/parse",
|
|
|
|
success: function(result) {
|
|
|
|
$('#output').html(result);
|
|
|
|
},
|
|
|
|
data: { markdown: $('#markdown').val() },
|
|
|
|
type: 'POST'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|