Changeset 357

Show
Ignore:
Timestamp:
10/25/07 23:24:26 (2 years ago)
Author:
eevee
Message:

Added buttons to collapse the Pokemon page move table to just one version's column. (#159)

Location:
veekun/trunk
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/templates/dex/common.tt

    r313 r357  
    66[% move_header = BLOCK %] 
    77    <th class="name"> Move </th> <th class="type"> Type </th> <th class="type"> Dmg </th> <th class="pp"> PP </th> 
    8     <th class="power"> Power </th> <th class="acc"> Acc. </th> <th class="priority"> Pri. </th> <th class="blurb"> Description </th> 
     8    <th class="power"> Power </th> <th class="acc" title="RBY accuracy is about 0.4% lower"> Acc.* </th> <th class="priority"> Pri. </th> <th class="blurb"> Description </th> 
    99[% END %] 
    1010 
  • veekun/trunk/templates/dex/page/pokemon.tt

    r351 r357  
     1[% extra_js = 'dexutils.js' %] 
    12[% PROCESS 'dex/common.tt' %] 
    23 
     
    424425<p> <a href="[% c.uri_for('moves/search', { pokemon => this.name }) %]"><img src="/images/see-also.png" alt="See also:"/> This list in the move search</a> </p> 
    425426<p> <a href="[% c.uri_for('moves/search', { pokemon => this.name, view => 'contest' }) %]"><img src="/images/see-also.png" alt="See also:"/> Contest list</a> </p> 
    426 <p> The TM table may be difficult to read depending on how you want to use it.  If you want to see just the TMs for one version, you may want to try the <a href="[% dex_uri('moves', 'search', { pokemon => this.name, method => 'machine' }) %]">move search</a>. </p> 
    427 <p> Note: accuracies are for G/S/C and RuSa.  Keep in mind that R/B/Y accuracies are about 0.4% (1 in 255) lower than those shown. </p> 
    428427[% IF preferred_damage %] 
    429428<p> [% this.name %]'s [% preferred_damage == 'special' ? 'Special ' : '' %]Attack is higher, so it will inflict more damage with [% preferred_damage %] (<img src="/dex-images/gameui/[% preferred_damage %].png" alt=""/>) moves. </p> 
     
    433432 and [% type_name(this.type2) %] 
    434433[% END %] moves. </p> 
    435 <table class="dex-table" cellspacing="0"> 
     434 
     435[% UNLESS header_icons.size == 1 %] 
     436<hr/> 
     437<p> NOT DONE: (todo only show this for js clients; don't use javascript:) </p> 
     438<p> 
     439    Only show moves from: 
     440[%     ver_idx = 0 %] 
     441[%     FOREACH ver IN header_icons %] 
     442[%         ver_idx = ver_idx + 1 %] 
     443    <a href="javascript:reduce_move_table([% ver_idx + 1 %], [% header_icons.size + 1 %]);">[% Icons.$ver %]</a> 
     444[%     END %] 
     445    <a href="javascript:reset_move_table();fix_move_table_highlighting();">all</a> 
     446</p> 
     447[% END %] 
     448 
     449<table class="dex-table" cellspacing="0" id="js-movetable"> 
    436450<!-- XXX: this is total crap and could stand to get one hell of a refactor.  again.  maybe for 5th gen. --> 
    437451<tr class="heading"> 
     
    486500<tr class="color[% color %]"> 
    487501 <td></td> 
    488 [%         IF generation == 0 %] <td> </td>[% IF move_columns_inv.y %] <td> </td>[% END %][% END %] 
     502[%         IF generation == 0 %] <td class="level"> </td>[% IF move_columns_inv.y %] <td class="level"> </td>[% END %][% END %] 
    489503[%         IF generation <= 1 %] 
    490 [%             IF move_columns_inv.c %] <td> </td>[% END %] 
    491  <td> [% Icons.c IF move.versions.c %] </td> 
     504[%             IF move_columns_inv.c %] <td class="level"> </td>[% END %] 
     505 <td class="level"> [% Icons.c IF move.versions.c %] </td> 
    492506[%         END %] 
    493507[%         IF generation <= 2 %] 
    494508[%             IF move_columns_inv.frlg %] 
    495  <td> [% Icons.e IF move.versions.e %] </td> <td> [% Icons.frlg IF move.versions.frlg %] </td> 
     509 <td class="level"> [% Icons.e IF move.versions.e %] </td> <td class="level"> [% Icons.frlg IF move.versions.frlg %] </td> 
    496510[%             ELSE %] 
    497  <td> [% Icons.e IF move.versions.e; Icons.frlg IF move.versions.frlg %] </td> 
     511 <td class="level"> [% Icons.e IF move.versions.e; Icons.frlg IF move.versions.frlg %] </td> 
    498512[%             END %] 
    499513[%         END %] 
    500514[%         IF generation <= 3 %] 
    501  <td> [% Icons.dp IF move.versions.dp %] </td> 
     515 <td class="level"> [% Icons.dp IF move.versions.dp %] </td> 
    502516[%         END %] 
    503517[%         move_cells(moveid) %] 
     
    512526[%     FOREACH move IN moves.other %] 
    513527[%         moveid = move.moveid %] 
    514 <tr class="color[% color %]"> 
     528<tr class="color[% color %] js-versionless"> 
    515529 <td></td> 
    516530 <td colspan="[% move_columns.size %]" class="level"> [% move.method %] </td> 
  • veekun/trunk/templates/style/dex.tt

    r315 r357  
    163163    ul.item-list li a { display: block; } 
    164164  ul.item-list:after { content: 'v'; visibility: hidden; height: 1px; display: block; clear: left; margin-top: -1px; } 
     165 
     166.js-move-table-reduced { display: none; } 
  • veekun/trunk/templates/wrapper.tt

    r342 r357  
    77[% DEFAULT extra_headers = [] %] 
    88[% DEFAULT extra_css = [] %] 
     9[% DEFAULT extra_js = [] %] 
    910[% extra_css.push(template.extra_css) IF template.extra_css %] 
    1011<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
     
    1415<link rel="shortcut icon" type="image/png" href="/images/favicon.png"/> 
    1516<link rel="stylesheet" type="text/css" href="/style/global"/> 
    16 [% IF extra_css %] 
    17 [%     FOREACH css IN extra_css %] 
     17[% FOREACH css IN extra_css %] 
    1818<link rel="stylesheet" type="text/css" href="/style/[% css %]"/> 
    19 [%     END %] 
    2019[% END %] 
    2120[% extra_headers.join("\n") %] 
     
    3130<script type="text/javascript" src="/script/jquery.js"></script> 
    3231<script type="text/javascript" src="/script/dexsuggest.js"></script> 
     32[% FOREACH js IN extra_js %] 
     33<script type="text/javascript" src="/script/[% js %]"></script> 
     34[% END %] 
    3335</head> 
    3436<body>