-
Notifications
You must be signed in to change notification settings - Fork 0
/
achievements.html
52 lines (52 loc) · 2.02 KB
/
achievements.html
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
52
{% extends 'triv_tracker_app/base.html' %}
{% load staticfiles %}
{% block head %}
<link rel="stylesheet" href="{% static 'triv_tracker_app/achievements.css' %}">
{% endblock %}
{% block body %}
<title>Achievements</title>
<div class="container p-5">
<h1 class="display-2 text-center my-5">Achievements</h1>
{% for category, obj_list in categories.items %}
<div class="container">
<div class="language-group">
<h1 class="mt-5 mb-4 display-4">{{category}}</h1>
<div class="achievement-container">
{% for obj in obj_list %}
<div class="achievement">
<h3>{{obj.name}}</h3>
<p>{{obj.short_description}}</p>
<p>Points: {{obj.reward}}</p>
<a href="#detail-popup{{obj.id}}" class="btn btn-primary details-btn">Details</a>
</div>
{% endfor %}
</div>
</div>
</div>
{% for obj in obj_list %}
<div class="detail-popup" id="detail-popup{{obj.id}}">
<div class="popup-content">
<a href="#" class="x">×</a>
<h2 class="display-4">{{obj.name}}</h2>
<p class="lead">{{obj.long_description}}</p>
<a href="#enter-code{{obj.id}}" class="btn btn-primary details-btn">I Finished!</a>
</div>
</div>
<div class="enter-code" id="enter-code{{obj.id}}">
<div class="popup-content">
<a href="#" class="x">×</a>
<h2 class="display-4">I Finished!</h2>
<p class="lead">Please ask a mentor around you to check your work and you may be rewarded with the points.</p>
<form enctype="multipart/form-data" method="post">
{% csrf_token %}
<input class="code-input" type="password" name="code" placeholder="Enter Code">
<input type="hidden" name="reward" value={{obj.reward}}>
<input type="hidden" name="last_achievement_id" value={{obj.id}}>
<input class="submit-button" type="submit" value="Submit">
</form>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
{% endblock%}