mtg-web/templates/decks/detail.html

74 lines
2.5 KiB
HTML
Raw Permalink Normal View History

2010-09-21 05:49:22 +00:00
{% extends "main.html" %}
2010-09-22 18:22:21 +00:00
{% load get_range %}
{% load math %}
2010-09-21 05:49:22 +00:00
{% 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">
2010-09-23 03:48:05 +00:00
<h3>Cards [{{ deck.card_count }}]</h3>
2010-09-23 02:20:57 +00:00
{% 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>
2010-09-21 05:49:22 +00:00
{% endblock %}