Misc. fixes to trypandoc html.
This commit is contained in:
parent
1ebfa6bb84
commit
706589b594
1 changed files with 8 additions and 8 deletions
|
@ -29,11 +29,6 @@ function newpage() {
|
||||||
window.location.href = href.replace(/([?].*)?$/,"?" + $.param({text: input, from: from, to: to}));
|
window.location.href = href.replace(/([?].*)?$/,"?" + $.param({text: input, from: from, to: to}));
|
||||||
};
|
};
|
||||||
|
|
||||||
function process(res) {
|
|
||||||
$("#results").text(res.result);
|
|
||||||
$("#version").text(res.version);
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var text = $.QueryString["text"];
|
var text = $.QueryString["text"];
|
||||||
$("#text").val(text);
|
$("#text").val(text);
|
||||||
|
@ -42,8 +37,12 @@ $(document).ready(function() {
|
||||||
var to = $.QueryString["to"] || "html";
|
var to = $.QueryString["to"] || "html";
|
||||||
$("#to").val(to);
|
$("#to").val(to);
|
||||||
if (text && text != "") {
|
if (text && text != "") {
|
||||||
$.getJSON("http://johnmacfarlane.net/cgi-bin/trypandoc", { from: from, to: to, text: text }, process);
|
$.getJSON("/cgi-bin/trypandoc", { from: from, to: to, text: text },
|
||||||
$("#command").text("pandoc --from " + from + " --to " + to);
|
function(res) {
|
||||||
|
$("#results").text(res.result);
|
||||||
|
$("#version").text(res.version);
|
||||||
|
$("#command").text("pandoc --from " + from + " --to " + to);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
$("#convert").click(newpage);
|
$("#convert").click(newpage);
|
||||||
});
|
});
|
||||||
|
@ -58,13 +57,14 @@ $(document).ready(function() {
|
||||||
footer { color: #555; text-align: center; margin: 1em; }
|
footer { color: #555; text-align: center; margin: 1em; }
|
||||||
p.version { color: #555; }
|
p.version { color: #555; }
|
||||||
button#convert { vertical-align: bottom; }
|
button#convert { vertical-align: bottom; }
|
||||||
|
pre#command { margin-top: 1em; background-color: transparent; border: none; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h1>Try <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>!</h1>
|
<h1>Try <a href="http://pandoc.org">pandoc</a>!</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<pre id="command"></pre>
|
<pre id="command"></pre>
|
||||||
|
|
Loading…
Add table
Reference in a new issue