73 lines
2.5 KiB
HTML
Executable file
73 lines
2.5 KiB
HTML
Executable file
{% extends "main.html" %}
|
|
{% load get_range %}
|
|
{% load math %}
|
|
|
|
{% block title %}Deck: {{ deck.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<h2>{{deck}}</h2>
|
|
<section class="mana">
|
|
<h3>Mana</h3>
|
|
<section class="lands">
|
|
<h4>Lands</h4>
|
|
<img src="{{ land_chart.get_url }}" />
|
|
</section>
|
|
<section class="symbols">
|
|
<h4>Symbols</h4>
|
|
<img src="{{ symbol_chart.get_url }}" />
|
|
</section>
|
|
<section class="curve">
|
|
<h4>Curve</h4>
|
|
<table class="mana-curve">
|
|
{% for cost, count in curve.items %}
|
|
<tr>
|
|
<td class="cost">{{ cost }}</td>
|
|
<td><div class="bar" style="text-align: right; width: {% widthratio count curve.values|getmax 100 %}%">{{ count }}</div></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</section>
|
|
<section class="ramp">
|
|
<h4>Ramp</h4>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<img src="{{ ramp_chart.get_url }}" />
|
|
</td>
|
|
<td>
|
|
<table>
|
|
{% for turn in deck.ramp %}
|
|
<tr>
|
|
<td>Turn {{ turn.turn }}</td>
|
|
<td>{{ turn.probability }}%</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</tr>
|
|
</table>
|
|
</section>
|
|
</section>
|
|
<section class="cards">
|
|
<h3>Cards</h3>
|
|
{% regroup deck.get_cards by card.type as cards %}
|
|
<ul>
|
|
{% for group in cards %}
|
|
<li class="card-type">{{ group.grouper|title }}
|
|
<ul>
|
|
{% for included in group.list %}
|
|
<li>
|
|
<div class="card {% if included.card.colors|length > 1 %}gold{% else %}{{ included.card.colors|join:' ' }}{% endif %}">
|
|
<div class="title">
|
|
<span class="name">{{ included.count }}x</span>
|
|
<a class="name" href="{% url mtgweb.cards.views.display name=included.card.name %}">{{ included.card.name }}</a>
|
|
<span class="cost">{% with included.card.get_cost as cost %}{% if cost.converted > 0 %}{% include 'cards/manacost.html' %}{% endif %}{% endwith %}</span>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
{% endfor %}
|
|
</li>
|
|
</section>
|
|
{% endblock %}
|