Changeset 206
- Timestamp:
- 06/02/07 22:02:29 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/templates/dex/utils/compare-results.tt
r155 r206 1 1 [% PROCESS 'dex/common.tt' %] 2 [% USE Math %] 2 3 3 4 [%# XXX: same goes for trainer %] … … 14 15 [% max_height = 0; FOREACH p IN pokemon; NEXT UNLESS p; SET max_height = p.height IF max_height < p.height; END %] 15 16 [% max_weight = 0; FOREACH p IN pokemon; NEXT UNLESS p; SET max_weight = p.weight IF max_weight < p.weight; END %] 17 [% max_weight_sqrt = Math.sqrt(max_weight) %] 16 18 17 19 [% extra_count = MAX_POKEMON - pokemon.size %] … … 105 107 <th rowspan="2">Weight</th> 106 108 [% MACRO block_row BLOCK %] 107 <td> <img src="/dex-images/crop/[% tmp = p.id; tmp.pad(3) %].png" alt="[% p.name %]" style="height: [% tmp = p.weight / max_weight * 100; round(tmp, 1) %]%"/> </td>109 <td> <img src="/dex-images/crop/[% tmp = p.id; tmp.pad(3) %].png" alt="[% p.name %]" style="height: [% tmp = Math.sqrt(p.weight) / max_weight_sqrt * 100; round(tmp, 1) %]%"/> </td> 108 110 [% END %] 109 111 [% print_row %]
