Browse Source

some changes

master
mortie 4 years ago
parent
commit
79103bb094
3 changed files with 11 additions and 6 deletions
  1. 2
    2
      server.js
  2. 1
    3
      web/index.html
  3. 8
    1
      web/style.css

+ 2
- 2
server.js View File

@@ -8,11 +8,11 @@ function processPandoc(req, res) {
let tmpf = tmp.fileSync({ postfix: ".pdf" });

let child = spawn("pandoc",
[ "--standalone", "--pdf-engine=pdflatex", "--output", tmpf.name ]);
[ "--standalone", "--output", tmpf.name ]);

child.on("error", err => {
res.writeHead(500);
res.end(err);
res.end(JSON.stringify({ output: err.toString() }));
tmpf.removeCallback();
});


+ 1
- 3
web/index.html View File

@@ -21,9 +21,7 @@
<canvas id="preview"></canvas>
</div>
</div>
<div id="pandoc-output">
Test
</div>
<div id="pandoc-output"></div>
</div>

<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>

+ 8
- 1
web/style.css View File

@@ -12,7 +12,7 @@ html, body, #container {
grid-template-rows: auto 100px;
grid-template-areas:
'left-pane right-pane'
'footer footer';
'footer right-pane';
}

#editor-container {
@@ -34,6 +34,13 @@ html, body, #container {
overflow: auto;
}

#preview-controls {
line-height: 50px;
}

#pandoc-output {
grid-area: footer;
min-height: 0px;
white-space: pre;
overflow: auto;
}

Loading…
Cancel
Save