Changeset 368

Show
Ignore:
Timestamp:
11/03/07 21:08:29 (2 years ago)
Author:
eevee
Message:

Clarified the fuzzy behavior of the comparer by adding the Pokemon's name below its sprite and question marks after the suggestions. Also fixed that empty results were being added to bump the list to 4 and make the suggestion row really tall. (#27)

Location:
veekun/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/Controller/Dex/Utils.pm

    r339 r368  
    8585            if (@fuzzies) { 
    8686                $pokemon_ids[$p] = ( shift @fuzzies )->{id}; 
    87                 $pokemon_notes[$p] = [ @fuzzies[0 .. 3] ] if @fuzzies; 
     87                @fuzzies = @fuzzies[0 .. 3] if @fuzzies > 4; 
     88                $pokemon_notes[$p] = \@fuzzies; 
    8889            } else { 
    8990                $pokemon_notes[$p] = "No match found.";  
  • veekun/trunk/templates/dex/utils/compare-results.tt

    r345 r368  
    4444<table class="dex-table dex-comparison" cellspacing="0"> 
    4545<thead> 
    46 [% IF pokemon_notes %] 
    47 <tr> 
     46[% IF pokemon_notes.size %] 
     47<tr class="suggestions"> 
    4848    <th rowspan="2"> [% Icons.$version %] </th> 
    4949[%     tmp = MAX_POKEMON - 1 %] 
    5050[%     FOREACH i IN [ 0 .. tmp ] %] 
    51     <td class="bottom"> 
     51    <td> 
    5252[%         IF pokemon_notes.$i.length %] 
    5353[%             pokemon_notes.$i %] 
    5454[%         ELSE %] 
    5555[%             FOREACH poke IN pokemon_notes.$i %] 
    56      <a href="?ver=[% version %][% FOREACH j IN [ 0 .. pokemon.max ]; NEXT IF !pokemon.$j; ';poke='; i == j ? PokemonNames.${poke.id} : pokemon_raw.$j; END %]">[% PokemonNames.${poke.id} %]</a> 
     56     <a href="?ver=[% version %][% FOREACH j IN [ 0 .. pokemon.max ]; NEXT IF !pokemon.$j; ';poke='; i == j ? PokemonNames.${poke.id} : pokemon_raw.$j; END %]">[% PokemonNames.${poke.id} %]?</a> 
    5757[%                 '<br/>' UNLESS loop.last %] 
    5858[%             END %] 
     
    6464 
    6565<tr> 
    66 [% UNLESS pokemon_notes %] 
     66[% UNLESS pokemon_notes.size %] 
    6767    <th> [% Icons.$version %] </th> 
    6868[% END %] 
     
    7272        <a href="?ver=[% version %][% FOREACH j IN [ 0 .. pokemon.max ]; NEXT IF !pokemon.$j OR p == pokemon.$j; ';poke='; pokemon_raw.$j; END %]"><small>(remove)</small></a><br/> 
    7373[%     END %] 
    74         <a href="[% dex_uri('pokemon', p.name) %]" class="blocklink" style="display: block; width: 80px; margin: 0 auto; /* hack */"><img src="/dex-images/dp/[% p.id.pad(3) %].png" alt=""/></a> 
     74        <a href="[% dex_uri('pokemon', p.name) %]" class="blocklink" style="display: block; width: 80px; margin: 0 auto; /* full bg hack */"><img src="/dex-images/dp/[% p.id.pad(3) %].png" alt=""/><br/><strong>[% p.name %]</strong></a> 
    7575    </th> 
    7676[% END %] 
  • veekun/trunk/templates/style/dex.tt

    r361 r368  
    135135table.dex-comparison tbody th { font-weight: normal; font-style: italic; width: 4%; } 
    136136table.dex-comparison tr.sprites td { height: 96px; vertical-align: bottom; } 
     137table.dex-comparison tr.suggestions td { vertical-align: bottom; border-bottom: 1px dashed [% header_border %]; } 
    137138table.dex-comparison tr.moves td { width: 11.5%; } 
    138139table.dex-comparison tr.moves th { width: 8%; }