templates/webfront.html

Tue, 25 Aug 2020 22:20:15 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 25 Aug 2020 22:20:15 +0300
changeset 100
62759e5c4554
parent 72
62d0b5b9d797
permissions
-rw-r--r--

add some basic versioning

<!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>{{appname}} {{version}} - 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 is_debug %}
<p>Note: this is an unreleased version, everything may not work as intended.</p>
{% endif %}

{% if report %}
    <h1>{{name}}</h1>
    {% if report['problems'] %}
        <ul class="problems-list">
        {% for problem in report['problems'] %}
            <li class="problem-{{problem['severity']}}">
                <div class='problem-content'>
                <div class='problem-description'>
                Line {{problem.line_number}}:
                {{problem.message_str}} &mdash; {{problem.severity.upper()}}
                <br />
                <span class="ldraw-code">{{problem.ldraw_code}}</span>
                </div>
                </div>
            </li>
        {% endfor %}
        </ul>
    {% else %}
    No problems whatsoever.
    {% endif %}
    <hr />
{% endif %}
<h1>List of reported issue types</h1>
<table>
<thead>
<tr>
<th>Name of issue</th>
<th>Severity</th>
<th>Example message</th>
</tr>
</thead>
<tbody>

{% for problem_type in problem_types %}
    <tr>
    <td>{{ problem_type.name }}</td>
    <td>{{ problem_type.severity }}</td>
    <td>{{ problem_type.placeholder_message() }}</td>
    </tr>
{% endfor %}
</tbody>
</table>
</div>
</body>
</html>

mercurial