<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ note.title }}</title>

    <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
    <meta content='width=device-width, initial-scale=1' name='viewport'/>

    <!-- Libraries -->
    <script src='{{ url_for("static", filename="jquery.min.js") }}'></script>
    <link rel='stylesheet' type='text/css' href='{{ url_for("static", filename="katex/katex.min.css") }}'>
    <script defer type='text/javascript' src='{{ url_for("static", filename="katex/katex.min.js") }}'></script>

    <!-- Custom -->
    <script src='{{ url_for("static", filename="anno.js") }}'></script>
    <link rel='stylesheet' href='{{ url_for("static", filename="markdown.css") }}'/>
    <link rel='stylesheet' href='{{ url_for("static", filename=highlight_css) }}'/>
    <link rel='stylesheet' href='{{ url_for("static", filename="anno.css") }}'/>
</head>
<body id='edit-page'>
    <div class='nav-wrapper'>
        <div class='nav content'>
            <a class='btn' href='/{{ note.url }}'>Back</a>
        </div>
    </div>
    {% include 'flashes.html' %}
    <div class='content-wrapper'>
        <div class='content'>
            <div id='uploaded-image-tag' class='hidden mono'></div>
            <div id='image-uploader' class='image-uploader'>
                <button class='btn'>Add image</button>
                <input type='file'
                       id='image-upload-btn'
                       class='btn'
                       style='display: none;'/>
            </div>
            <form action='/{{ note.url }}/delete' method='post'>
                <input type='submit'
                       value='Delete'
                       class='btn'
                       onclick='return confirm("Are you sure you want to delete this item?");'/>
            </form>
            <form action='/{{ note.url }}/archive' method='post'>
                <input type='submit'
                       value='Archive'
                       class='btn'
                       onclick='return confirm("Are you sure you want to archive this item?");'/>
            </form>
            <form action='/{{ note.url }}/edit' method='post'>
                <div id='edit-preview' class='markdown-body'></div>
                <button type='submit'
                        class='btn'
                        id='edit-submit-btn'>Save</button>
                <textarea id='edit-field' type='text' name='note_text' class='form-control'>{{ note.text }}</textarea>
            </form>
            <div class='clear'></div>
        </div>
    </div>
    <script>
        document.addEventListener('DOMContentLoaded', ANNO.renderMath);
    </script>
</body>
</html>
