summaryrefslogtreecommitdiff
path: root/kpov_judge/web/kpov_judge/templates/task_greeting.html
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/web/kpov_judge/templates/task_greeting.html')
-rw-r--r--kpov_judge/web/kpov_judge/templates/task_greeting.html125
1 files changed, 91 insertions, 34 deletions
diff --git a/kpov_judge/web/kpov_judge/templates/task_greeting.html b/kpov_judge/web/kpov_judge/templates/task_greeting.html
index 422f14b..49288e3 100644
--- a/kpov_judge/web/kpov_judge/templates/task_greeting.html
+++ b/kpov_judge/web/kpov_judge/templates/task_greeting.html
@@ -1,65 +1,122 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<body>
-<h1>{{task_id}}</h1>
-<h2>Navodila</h2>
-<pre>
-{{instructions}}
-</pre>
-<p>
-<p>
-<a href='howto/'>Podrobna navodila (HOWTO)</a>
-</p>
+<html lang="{{lang}}">
-<section class="images">
-<h2>Računalniki v vaji</h2>
+<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
+<style>
+body > h1 > span {
+ font-size: small;
+ font-weight: normal;
+}
+img.setup {
+ border: 1px solid black;
+ border-radius: 0.2em;
+ float: right;
+ margin-left: 1.5em;
+ max-width: 20em;
+}
+section.data {
+ clear: both;
+ columns: 2;
+}
+section.data > section {
+ display: inline-block;
+ margin: 0 1em;
+}
+section.disks > section > h1 {
+ margin-bottom: 0;
+}
+section ul {
+ list-style-position: inside;
+ margin: 0;
+ margin-left: 1em;
+ padding-left: 0;
+}
+section > ul {
+ margin-top: 0.5em;
+}
+</style>
+
+<h1>
+<a href="{{ url_for('class_tasks', class_id=class_id) }}" class="back">↩</a> {{task_id}}
+ <span>[
+{% for lang in ('en', 'si') %}
+<a href="{{ url_for('task_greeting', class_id=class_id, task_id=task_id, lang=lang) }}">{{lang}}</a>
+{% endfor %}
+]</span>
+</h1>
<section>
+<a href="setup.png"><img src="setup.png" class="setup"></a>
+
+{% include instructions %}
+
+<p>
+<a href="howto/">{{ _('Podrobna navodila.') }}</a>
+</section>
+
+<section class="data">
+<section class="disks">
+<h1>{{ _('Računalniki') }}</h1>
+<p>
+{{ _('Slike diskov za to nalogo:') }}
+
{% for c in computers %}
- <h3>{{c['name']}}</h3>
+<ul>
+ <li>{{c['name']}}
{% if 'disk_urls' in c %}
<ul>
{% for u in c['disk_urls'] %}
- <li><a href={{disk_base_url+u['file']}}>{{u['name']}}</a></li>
+ <li><a href="{{disk_base_url+u['file']}}">{{u['name']}}</a>
{% endfor %}
</ul>
{% else %}
- Slike navideznih diskov so v izdelavi in bodo kmalu na voljo.
+ <br>{{ _('Slike navideznih diskov so v izdelavi in bodo kmalu na voljo.') }}
{% endif %}
+ </ul>
{% endfor %}
-<p>
-<img src="setup.png">
-</p>
-</section>
-
<section>
{% if backing_images %}
-<h3>Osnovne slike</h3>
+<h1>{{ _('Osnovne slike') }}</h1>
+<p>
+{{ _('Te slike so enake za vse naloge. Prenesite samo tiste, ki jih še nimate.') }}
+
<ul>
{% for b in backing_images %}
- <li><a href={{disk_base_url+b}}>{{b}}</a></li>
+ <li><a href="{{disk_base_url+b}}">{{b}}</a></li>
{% endfor %}
</ul>
{% endif %}
</section>
</section>
+<section>
+<h1>{{ _('Rezultat') }}</h1>
<p>
-Lahko si ogledate surove:
-<ul>
-<li><a href='results.html'>rezultate</a> (<a href='../results.json'>json</a>)</li>
-<li><a href='params.html'>parametre</a> (<a href='../params.json'>json</a>, <a href='../params_meta.json'>opisi parametrov</a>)</li>
-<li><a href='../task.html'>preverjalni program</a> (<a href='../task.py'>source</a>)</li>
-</ul>
-</p>
+{% if result is none %}
+{{ _('Naloga nima še nobenega poskusa.') }}
+{% elif result['result'] == 10 %}
+{{ _('Naloga je uspešno opravljena dne %(time)s.', time=result['time']) }}
+{% else %}
+{{ _('Naloga še ni opravljena, najvišji rezultat je %(score)s.', score=result['result']) }}
+{% endif %}
+
+<p>
+<a href="../task.html">{{ _('Program za preverjanje.') }}</a>
+
+<h1>{{ _('Parametri') }}</h1>
+<dl>
+{% for p in params if p['value'] %}
+ <dt><em>{{ p['name'] }}</em>{% if p['description'] %} … <small>{{ p['description'] }}</small>{% endif %}</dt>
+ <dd><code>{{ p['value'] }}</code></dd>
+{% endfor %}
+</dl>
+</section>
+{#
<p>
{% if openstack %}
Openstack projekt za to vajo je že ustvarjen ali v izdelavi (funkcionalnost še ne deluje).
{% else %}
<a href='?narediStack=true'>Ustvari</a> Openstack projekt za to vajo (funkcionalnost še ne deluje).
{% endif %}
-</body>
-</html>
+#}