This repository has been archived on 2026-05-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
cardmaker/resources/cards/card.vm
T
pederbs 43a0e212fc New design on cards
This changes the layout drastically, pooling stats together in a single black bar on the card
This change also adds icons instead of text for certain stats.
There is also some cleanup.
2017-11-19 02:35:27 +01:00

141 lines
4.4 KiB
Plaintext

<!DOCTYPE html>
<link rel="stylesheet" href="card.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdn.materialdesignicons.com/2.0.46/css/materialdesignicons.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
#macro(figure $card)
#if($card.figure_source == "material-icons")
<!--https://material.io/icons/-->
<i class="material-icons figure">$escape_html($card.figure)</i>
#elseif($card.figure_source == "mdi")
<!--https://materialdesignicons.com/-->
<i class="mdi mdi-$escape_html($card.figure)"></i>
#elseif($card.figure_source == "fa")
<!--http://fontawesome.io/icons/-->
<i class="fa fa-$escape_html($card.figure)"></i>
#elseif($card.figure_source == "svg")
<!--/cards/svg-->
<!--<img class="svg_filter" src="/svg/${escape_html($card.figure)}.svg">-->
<img src="/svg/${escape_html($card.figure)}.svg?color=999">
#end
#end
#macro(specialFlags $card)
#if($card.has_flag("mastery"))
<big>
&#x274F; &#x274F; &#x274F; &#x274F; &#x274F;
&#x274F; &#x274F; &#x274F; &#x274F; &#x274F;
</big>
#end
#if($card.has_flag("pokehum"))
<big>
Name: ______________
</big>
#end
#end
#macro(statIcons $text)
#foreach($word in $text.split())
#if($word == "BODY")
<i class="mdi mdi-human"></i>
#elseif($word == "TEC")
<i class="fa fa-wrench"></i>
#elseif($word == "MAG")
<i class="fa fa-magic"></i>
#elseif($word == "ATT")
<small>ATT</small>
#else
$word
#end
#end
#end
#macro(handleCostUnit $cost $match)
<div class="costunit">
$escape_html($strip_unit($cost, $match))<br/>
<small>$escape_html($match)</small>
</div>
#end
<title>Cards</title>
#foreach($card in $cards)
<article #if($card.effects) class="effects"#end onclick="location.href='creator?filename=$escape_html($card.filename)'">
<h1>$escape_html($card.title)</h1>
<figure>
#figure($card)
</figure>
#if($card.effects)
<ul>
#foreach($effect in $card.effects)
#if($effect)
<li>$escape_html($effect)</li>
#end
#end
</ul>
#end
<section>
#if($card.cp)
<div class="cp">$escape_html($card.cp)</div>
#elseif($card.gp)
<div class="gp">$escape_html($card.gp)</div>
#end
#foreach($cost in $card.cost.split(","))
#if($cost.upper().endswith(" ACT"))
#handleCostUnit($cost, "ACT")
#elseif($cost.upper().endswith(" OVERDRIVE"))
#handleCostUnit($cost, "OVERDRIVE")
#elseif($cost.upper().endswith(" COMBO"))
#handleCostUnit($cost, "COMBO")
#elseif($cost.upper().endswith(" DIFFICULTY"))
#handleCostUnit($cost, "DIFFICULTY")
#else
#if($cost.strip())
<div class="cost">$escape_html($cost.split())</div>
#end
#end
#end
#if($card.power)
<div class="power">#statIcons($escape_html($card.power))</div>
#end
</section>
<main>
$escape_html($card.description)
#if($card.steps)
<ol>
#foreach($item in $card.steps)
#if($item)
<li>$escape_html($item)</li>
#end
#end
</ol>
#end
#if($card.flags)
<div class="bottom">
<small>
-
#foreach($flag in $card.flags)
#if(!$flag && $foreach.hasNext)
- <br> -
#else
$escape_html($flag.capitalize())#if($foreach.hasNext), #end
#end
#end
-
</small>
<br>
#specialFlags($card)
</div>
#end
</main>
</article>
#end
#if($was_saved)
<center class="message">The card has been saved</center>
#end
#if($was_deleted)
<center class="message">The card has been removed from storage</center>
#end