markdown-peek 0.1.0

Markdown preview in browser and terminal
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=yes">
    <title>Markdown Peek</title>
    <link rel="stylesheet" href="/static/css/github.css">
    <link rel="shortcut icon" href="/static/icons/favicon.svg">
    <style>
        .markdown-body {
            box-sizing: border-box;
            min-width: 200px;
            max-width: 920px;
            margin: 0 auto;
            padding: 45px:
        }
    </style>
    <script type="text/javascript">
        const socket = new WebSocket("http://127.0.0.1:3000/ws");
        console.log("Create webscoket");
        socket.onopen = function (event) {
            console.log(`Open: ${event}`);
        };
        socket.onmessage = function (event) {
            console.log(`Received: ${event}`);
            if (event.data === "reload") {
                socket.close();
                window.location.reload();
            }
        };
        socket.onerror = function (event) {
            console.log(`Error: ${event}`);
        };
        socket.onclose = function (event) {
            console.log(`Close: ${event}`);
        };
        // window.onbeforeunload = function () {
        //     socket.close();
        // }
    </script>
</head>

<body>
    <article class="markdown-body">
        {{ content }}
    </article>
</body>

</html>