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