forked from johnny603/lux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpuzzle_detail.html
More file actions
51 lines (48 loc) · 2.4 KB
/
Copy pathpuzzle_detail.html
File metadata and controls
51 lines (48 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{% extends "base.html" %}
{% block content %}
<section class="panel">
<div style="display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap;">
<div>
<h2>{{ puzzle.title }}</h2>
<p class="muted">{{ puzzle.description }}</p>
<div class="muted-list">
<span class="chip">{{ puzzle.category }}</span>
<span class="chip">{{ puzzle.difficulty|title }}</span>
<span class="chip">{{ puzzle.validator }}</span>
{% for tag in puzzle.tags %}
<span class="chip">{{ tag }}</span>
{% endfor %}
</div>
</div>
{% if solved %}
<span class="badge success">Solved</span>
{% else %}
<span class="badge warning">Unsolved</span>
{% endif %}
</div>
</section>
<section class="grid two" style="margin-top:20px;">
<div class="panel alt">
<h3>Submission</h3>
<p class="muted">Use the same validation path as the CLI. Script puzzles accept uploaded source files.</p>
<form method="post" action="/puzzles/{{ puzzle.id }}/submit" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<label class="muted" for="puzzle-answer">Answer</label>
<input id="puzzle-answer" type="text" name="answer" placeholder="Enter an answer or command" />
<label class="muted" for="puzzle-files" style="display:block;margin-top:12px;">Source files</label>
<input id="puzzle-files" type="file" name="files" multiple />
<button type="submit" style="margin-top:12px;">Submit</button>
</form>
<p class="muted" style="margin-top:12px;">Hint preview: {{ puzzle.hint }}</p>
</div>
<div class="panel alt">
<h3>Attempt history</h3>
<div class="stats" style="margin-top:12px;">
<div class="stat"><span class="muted">Attempts</span><span class="value">{{ stats.attempts or 0 }}</span></div>
<div class="stat"><span class="muted">Incorrect</span><span class="value">{{ stats.incorrect or 0 }}</span></div>
<div class="stat"><span class="muted">Last</span><span class="value">{{ stats.last_outcome or "—" }}</span></div>
</div>
<p class="muted" style="margin-top:12px;">Progress snapshot: {{ progress.solved_count }} solved, streak {{ progress.current_streak }}, best {{ progress.longest_streak }}.</p>
</div>
</section>
{% endblock %}