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

let tmpf = tmp.fileSync({ postfix: ".pdf" }); let tmpf = tmp.fileSync({ postfix: ".pdf" });


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


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



+ 1
- 3
web/index.html View File

<canvas id="preview"></canvas> <canvas id="preview"></canvas>
</div> </div>
</div> </div>
<div id="pandoc-output">
Test
</div>
<div id="pandoc-output"></div>
</div> </div>


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

+ 8
- 1
web/style.css View File

grid-template-rows: auto 100px; grid-template-rows: auto 100px;
grid-template-areas: grid-template-areas:
'left-pane right-pane' 'left-pane right-pane'
'footer footer';
'footer right-pane';
} }


#editor-container { #editor-container {
overflow: auto; overflow: auto;
} }


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

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

Loading…
Cancel
Save