use template extensions
[mlpccg-meta.git] / meta / templates / index.html
1 {% extends "base.html" %}
2
3 {% block jumbotron %}
4 <div class="jumbotron">
5 <div class="container">
6 <h1>How good is your deck?</h1>
7 <p>Curious how decks like yours have performed in tournaments?<br/>
8 Paste your <a href="http://ponyhead.com/deckbuilder">ponyhead.com</a> URL here and find out!</p>
9 <p>
10 <form action="/meta/rate" method="post" class="form-inline" role="form">
11 {% csrf_token %}
12 <div class="form-group">
13 <label class="sr-only" for="ponyheadURL">ponyhead decklist url</label>
14 <input type="url" name="url" class="form-control input-lg" id="ponyheadURL" placeholder="Deck URL, e.g.: http://ponyhead.com/deckbuilder?v1code=..."/>
15 <button type="submit" class="btn btn-lg btn-default btn-primary">Tell me!</button>
16 </div>
17 </form>
18 </p>
19 </div>
20 </div>
21 {% endblock %}
22
23 {% block content %}
24 <div class="row">
25 <div class="col-xs-12">
26 <h2>Deck archetypes</h2>
27 <p>Very fuzzy data, based on past tournaments. The more the deck was played in tournaments, the more accurate this is.</p>
28 <table class="table">
29 <tr>
30 <th>Archetype ID</th>
31 <th>Average placement</th>
32 <th>Example decks</th>
33 </tr>
34 {% load humanize %}
35 {% for avg, label, decks in ranking %}
36 <tr>
37 <td>{{ label }}</td>
38 <td>{{ avg|ordinal }}</td>
39 <td>
40 <ul class="list-inline">
41 {% for d in decks %}
42 <li><a href="{{ d.ponyhead_link }}">{{ d.description }}</a></li>
43 {% endfor %}
44 </ul>
45 </td>
46 {% endfor %}
47 </table>
48 </div>
49 </div>
50
51 <div class="row">
52 <div class="col-xs-12">
53 <h2>Tournaments</h2>
54 <table class="table">
55 <tr>
56 <th>Date</th>
57 <th>Name</th>
58 <th>Top Decks</th>
59 </tr>
60 {% if tournaments %}
61 {% for t in tournaments %}
62 <tr>
63 <td>{{ t.tournament.date }}</td>
64 <td>{{ t.tournament.name }}</td>
65 <td>
66 {% for d in t.decklists|slice:":8" %}
67 <a href="{{ d.ponyhead_link }}">{{ d.name }} ({{ d.description }})</a><br/>
68 {% endfor %}
69 </td>
70 </tr>
71 {% endfor %}
72 {% endif %}
73 </table>
74 </div>
75 </div>
76 {% endblock %}