templates/webfront.html

Sat, 08 Jun 2019 01:32:25 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 08 Jun 2019 01:32:25 +0300
changeset 62
f0a6bf48b05e
parent 61
15c95d3fcfd8
child 63
8949af6a4279
permissions
-rw-r--r--

Problem reporting revamp, program is now aware of its problem types

<!DOCTYPE html>
<html>
<head>
    <link rel="icon" href="static/favicon.ico" />
    <link rel="stylesheet" href="static/style.css" />
    <title>LDraw part verification tool</title>
</head>
<body>
<div class="top-form">
    <h1>Check your part here</h1>
    <form method="post" enctype="multipart/form-data">
        <input type="file" name="file"/>
        <input type="submit" />
    </form>
</div>
<div class="report-container">

{% if report %}
    <h1>{{name}}</h1>
    {% if report['problems'] %}
        <ul class="problems-list">
        {% for problem in report['problems'] %}
            <li class="problem-{{problem['severity']}}">
                <img
                    src="static/{{problem['severity']}}.svg"
                    width="32" height="32"
                    class="problem-icon"
                />
                Line {{problem.line_number}}: {{problem.message_str}}
                <br />
                <span class="ldraw-code">{{problem.ldraw_code}}</span>
            </li>
        {% endfor %}
        </ul>
    {% else %}
    No problems whatsoever.
    {% endif %}
{% endif %}
</div>
</body>
</html>

mercurial