Changeset 39
- Timestamp:
- 03/07/07 22:52:55 (3 years ago)
- Location:
- veekun/trunk
- Files:
-
- 5 modified
-
lib/Vee/Controller/Dex.pm (modified) (1 diff)
-
lib/Vee/Controller/Dex/Utils.pm (modified) (1 diff)
-
root/style/dex.css (modified) (1 diff)
-
root/style/dex.types.css (modified) (1 diff)
-
templates/dex/page/type.tt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/lib/Vee/Controller/Dex.pm
r22 r39 696 696 697 697 $s->{this} = $row; 698 $s->{moves} = $c->model('DBIC::Moves')->search({ type => $row->name }, { order_by => 'name ASC', columns => ['id'] }); 699 $s->{pokemon_rs} = $c->model('DBIC::Pokemon')->search( 700 [ type1 => $row->name, type2 => $row->name ], 701 { order_by => 'name ASC', columns => [qw/id name type1 type2/] } 702 ); 698 $s->{moves_rs} = $c->model('DBIC::Moves')->search({ type => $row->name }, { order_by => 'name ASC', columns => ['id'] }); 699 $s->{pokemon_rs} = $c->model('DBIC::Pokemon')->search( { 700 id => { '<=', $Generations[-1]{maxid} }, 701 -or => [ type1 => $row->name, type2 => $row->name ], 702 }, { 703 order_by => 'name ASC', 704 columns => [qw/ id name type1 type2 /], 705 } ); 703 706 704 707 $s->{template} = 'dex/page/type.tt'; -
veekun/trunk/lib/Vee/Controller/Dex/Utils.pm
r37 r39 175 175 }, { 176 176 prefetch => 'pokemon', 177 order_by => 'pokeid ASC', 178 group_by => 'pokemon.evid', 177 179 }); 178 180 -
veekun/trunk/root/style/dex.css
r1 r39 54 54 table.dex-stats tr td.dex-stats-data { width: 56px; text-align: center; } 55 55 56 a.dex-pokelist img { margin: 0.2em 0; } 56 57 a.dex-pokelist:hover img { background-color: #385a7c !important; background-image: none !important; -moz-border-radius: 4px; } 57 58 -
veekun/trunk/root/style/dex.types.css
r1 r39 37 37 .type-steel, .type-fire, .type-water, .type-grass, .type-electric, .type-psychic, .type-ice, .type-dragon, .type-dark, 38 38 .type-cool, .type-beauty, .type-cute, .type-smart, .type-tough 39 { font-size: 10px; xtext-transform: uppercase; border-style: outset; border-width: 1px; letter-spacing: 0.5px; color: black !important; vertical-align: middle; padding: 2px; }39 { font-size: 10px; letter-spacing: 0.5px; color: black !important; vertical-align: middle; } 40 40 .type-none a, .type-normal a, .type-fighting a, .type-flying a, .type-poison a, .type-ground a, .type-rock a, .type-bug a, .type-ghost a, 41 41 .type-steel a, .type-fire a, .type-water a, .type-grass a, .type-electric a, .type-psychic a, .type-ice a, .type-dragon a, .type-dark a, -
veekun/trunk/templates/dex/page/type.tt
r22 r39 58 58 <h1>Pokémon</h1> 59 59 <p><a href="[% c.uri('Dex::Search', 'pokemon_search', { view => 'icons', type_mode => 'any', type => this.name }) %]">This type in the Pokémon search</a></p> 60 [% pokemon_ct = 0 %] 60 61 [% WHILE (poke = pokemon_rs.next) %] 61 <a href="[% dex_uri('pokemon', poke.name) %]" class="[% IF poke.type2; 'type-'; IF poke.type1 == this.name; poke.type2; ELSE; poke.type1; END; ' '; END %]dex-pokelist"><img src="/dex-images/icons/[% poke.id.pad(3) %].png" alt="[% poke.name %]" title="[% poke.name %]: [% poke.type1 %][% '/' _ poke.type2 IF poke.type2 %]"/></a> 62 <a href="[% dex_uri('pokemon', poke.name) %]" class="dex-pokelist"><img src="/dex-images/icons/[% poke.id.pad(3) %].png" alt="[% poke.name %]" title="[% poke.name %]: [% poke.type1 %][% '/' _ poke.type2 IF poke.type2 %]" class="[% IF poke.type2; 'type-'; IF poke.type1 == this.name; poke.type2; ELSE; poke.type1; END; END %]"/></a> 63 [% pokemon_ct = pokemon_ct + 1 %] 62 64 [% END %] 63 <div class="total">[% pokemon .size%] Pokémon total</div>65 <div class="total">[% pokemon_ct %] Pokémon total</div> 64 66 65 67 <!-- ####################################################################### --> 66 68 67 69 <h1>Moves</h1> 68 [% UNLESS moves %]<p>No moves of this type.. wtf?!</p>[% RETURN %][% END %]70 [% IF moves_rs.is_empty %]<p>No moves of this type.. wtf?!</p>[% END %] 69 71 70 72 [% color = 1 %] … … 74 76 </tr> 75 77 76 [% FOREACH move IN moves %] 78 [% moves_ct = 0 %] 79 [% WHILE (move = moves_rs.next) %] 77 80 <tr class="color[% color %]"> 78 81 [% move_cells(move.id) %] 79 82 </tr> 83 [% moves_ct = moves_ct + 1 %] 80 84 [% color = 3 - color %] 81 85 [% END %] 82 86 </table> 83 <div class="total">[% moves .size%] moves total</div>87 <div class="total">[% moves_ct %] moves total</div> 84 88 85 89 <!-- ####################################################################### -->
