Tap symbol! (Poorly)

This commit is contained in:
Correl Roush 2010-09-22 00:52:00 -04:00
parent f358941909
commit 80516e21d5
2 changed files with 20 additions and 15 deletions

View file

@ -13,6 +13,8 @@ def prettify_mana(text):
if not match: if not match:
break break
text = text[:match.start()] + render_to_string('cards/manacost.html', {'cost': ManaCost(str(match.group(0)))}) + text[match.end():] text = text[:match.start()] + render_to_string('cards/manacost.html', {'cost': ManaCost(str(match.group(0)))}) + text[match.end():]
text = text.replace('{T}', render_to_string('cards/manacost.html', {'cost': 'T'}))
return text return text

View file

@ -1,5 +1,7 @@
{% load get_range %} {% load get_range %}
{% if cost == 'T' %}
<span class="mana symbol">&#x21b7;</span>
{% else %}
{% if cost.x %}<span class="mana symbol">X</span>{% endif %} {% if cost.x %}<span class="mana symbol">X</span>{% endif %}
{% if cost.y %}<span class="mana symbol">Y</span>{% endif %} {% if cost.y %}<span class="mana symbol">Y</span>{% endif %}
{% if cost.z %}<span class="mana symbol">Z</span>{% endif %} {% if cost.z %}<span class="mana symbol">Z</span>{% endif %}
@ -15,3 +17,4 @@
<span class="mana symbol {{ type }}"></span> <span class="mana symbol {{ type }}"></span>
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
{% endif %}