Changeset 106

Show
Ignore:
Timestamp:
04/22/07 02:42:05 (3 years ago)
Author:
eevee
Message:

Styled pretty much everything else. Mostly. Good enough.
Fixed a bug with Vee::Form; it wasn't doing such a good job with multi-value fields being provided only one value.

Location:
veekun/branches/layout
Files:
1 added
17 modified

Legend:

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

    r48 r106  
    8383            if (@fuzzies) { 
    8484                $pokemon_ids[$p] = ( shift @fuzzies )->{id}; 
    85                 $pokemon_notes[$p] = [ @fuzzies[0 .. 3] ]; 
     85                $pokemon_notes[$p] = [ @fuzzies[0 .. 3] ] if @fuzzies; 
    8686            } else { 
    8787                $pokemon_notes[$p] = "No match found.";  
  • veekun/branches/layout/lib/Vee/Form.pm

    r1 r106  
    216216        if (not $c->{$field}{options} or not defined $p->{$field}) { 
    217217            $p->{$field} = $c->{$field}{default} unless defined $p->{$field}; 
     218            if (not ref $p->{$field} and $c->{$field}{count}) { 
     219                $p->{$field} = [ $p->{$field} ]; 
     220            } 
    218221            next; 
    219222        } 
  • veekun/branches/layout/static/about.tt

    r51 r106  
    1111<p>Jabber/Google Talk: lexyeevee@gmail.com</p> 
    1212<p>email: <a href="mailto:[% 'veekun@veekun.com' | email %]">[% 'veekun@veekun.com' | email %]</a></p> 
    13 <p><a href="http://www.livejournal.com/"><img src="images/icons/lj.png" alt="LiveJournal" title="LiveJournal"/></a> <a href="http://www.livejournal.com/users/lexyeevee">http://www.livejournal.com/users/lexyeevee</a></p> 
     13<p><a href="http://www.livejournal.com/"><img src="images/icons/contact/lj.png" alt="LiveJournal" title="LiveJournal"/></a> <a href="http://www.livejournal.com/users/lexyeevee">http://www.livejournal.com/users/lexyeevee</a></p> 
    1414<p><a href="http://www.irchelp.org/">IRC</a>: irc.veekun.com:6667, channel #dev (<a href="http://www.silverex.info/">my choice of client</a>)</p> 
  • veekun/branches/layout/static/dex/resources.tt

    r1 r106  
    88  <li><a href="/files/sprites/dp2.tar.gz">Tarball of D/P secondary frames</a></li> 
    99  <li><a href="/files/sprites/berries.tar.gz">Tarball of large berry sprites</a></li> 
    10   <li><a href="/files/sprites/alldp.png">Collage of every D/P sprite</a>, using males by default and filling in females where necessary <br/> <small><em>that's called a montage~  MONTAAGE~</em></small></li> 
     10  <li><a href="/files/sprites/alldp.png">Collage of every D/P sprite</a>, using males by default and filling in females where necessary</li> 
    1111  <li><a href="/files/sprites/alldp2.png">Collage of every secondary D/P sprite frame</a>, filled as above</li> 
    1212  <li><a href="/files/sprites/alldp-m.png">Collage of every male D/P sprite</a></li> 
     
    1515 
    1616<h1>Pok&eacute;dex Data</h1> 
    17 <ul> 
    18   <li>mysqldump --compatible=mysql323 pokedex abilities berries contestmoves evchains flavortext items locations machines moves pokemon pokemoves types &gt; pokedex.sql</li> 
    19   vee: put your name in here with `cat`, pipe this to gzip, etc etc 
    20 </ul> 
     17<p>Eventually I will have a page listing all tables/columns and what they are for, as well as a gzipped dump of my database.</p> 
     18<p>Until then, though, you can always get the latest copy from my code repository at 
     19    <a href="http://veekun.com/viewvc/veekun/trunk/script/pokedex.sql?view=co">http://veekun.com/viewvc/veekun/trunk/script/pokedex.sql?view=co</a>.</p> 
     20 
  • veekun/branches/layout/static/link.tt

    r51 r106  
    66 
    77[% generic_dex_form = BLOCK -%] 
    8 <form action="[% c.uri_for('dex/lookup') %]" method="get" style="margin: 0;"><p style="margin: 0;"> 
    9     <input type="text" name="entry" style="width: 15em; background-image: url([% c.req.base %]images/pokedex-fade.png) no-repeat right center; font-family: monospace;"/> 
     8<form action="[% c.uri_for('dex') %]" method="get" style="margin: 0;"><p style="margin: 0;"> 
     9    <input type="text" name="entry" style="width: 15em; background: url([% c.req.base %]images/pokedex-fade.png) white no-repeat right center; font-family: monospace;"/> 
    1010    <input type="submit" style="display: none;"/> <input type="reset" style="display: none;"/> 
    1111</p></form> 
  • veekun/branches/layout/templates/dex/list/abilities.tt

    r64 r106  
    22 
    33<h1>Ability List</h1> 
    4 <table class="dex" cellspacing="0"> 
    5 <tr><th> [% Icons.rsefl %] </th><th> Name </th><th> Effect </th><th colspan="2"> Pok&eacute;mon </th></tr> 
     4<table class="dex-table" cellspacing="0"> 
     5<tr class="heading"><th> [% Icons.rsefl %] </th><th> Name </th><th> Effect </th><th colspan="2"> Pok&eacute;mon </th></tr> 
    66[% color = 1 %] 
    77[% WHILE (abil = abilities_rs.next) %] 
     
    1919</tr> 
    2020[%     IF abil.id == 76 %] 
    21 <tr><th> [% Icons.dp %] </th><th> Name </th><th> Effect </th><th colspan="2"> Pok&eacute;mon </th></tr> 
     21<tr class="heading"><th> [% Icons.dp %] </th><th> Name </th><th> Effect </th><th colspan="2"> Pok&eacute;mon </th></tr> 
    2222[%     END %] 
    2323[%     color = 3 - color %] 
  • veekun/branches/layout/templates/dex/search/pokemon.tt

    r1 r106  
    77[% simple_params = form.simplified_params; SET simple_params.skip = skip IF skip %] 
    88[% pagelist(c.req.params.skip, PAGESIZE, total, c.uri('Dex::Search', 'pokemon_search'), simple_params) %] 
    9 <p class="center">Permanent-ish link to this page: <code>[% c.uri('Dex::Search', 'pokemon_search', simple_params) %]</code></p> 
     9<p class="permalink">[% c.uri('Dex::Search', 'pokemon_search', simple_params) %]</p> 
    1010[%     IF results %] 
    1111[%         SWITCH c.req.params.view %] 
  • veekun/branches/layout/templates/dex/utils/compare-results.tt

    r48 r106  
     1[% PROCESS 'dex/common.tt' %] 
     2 
    13[%# XXX: same goes for trainer %] 
    24[%# XXX: goddamn this code is ugly %] 
     
    1416 
    1517[% extra_count = MAX_POKEMON - pokemon.size %] 
    16 [% tmp = " <td> </td>\n"; extra_cells = tmp.repeat(extra_count) %] 
    17 [% tmp = MAX_POKEMON + 1; divider_bar = "\n <tr><td colspan=\"$tmp\" class=\"hbar\"></td></tr>\n" %] 
     18[% tmp = "    <td> </td>\n"; extra_cells = tmp.repeat(extra_count) %] 
     19[% tmp = MAX_POKEMON + 1; divider_bar = "\n     <tr><td colspan=\"$tmp\" class=\"hbar\"></td></tr>\n" %] 
    1820 
    1921[% MACRO print_row BLOCK %] 
     
    3234[% END %] 
    3335 
    34 [% thead = BLOCK %] 
    35 <thead> 
    36 <tr> 
    37  <th> [% Icons.$version %] </th> 
    38 [%     MACRO block_row BLOCK %] 
    39  <th> <a href="[% dex_uri('pokemon', p.name) %]"><img src="/dex-images/icons/[% p.id.pad(3) %].png" alt=""/><br/>[% p.name %]</a> </th> 
    40 [%     END %] 
    41 [%     print_row(extras=" <th> -- </th>\n") %] 
    42  </tr> 
    43 [% divider_bar %] 
    44 </thead> 
    45 [% END %] 
    46  
    47 <!--#########################################################################--> 
    48  
    49 <h1>Basic Stuff</h1> 
     36[% color = 1 %] 
     37 
     38<!-- ####################################################################### --> 
     39 
     40<h1>General</h1> 
    5041<form action="" method="get"> 
    51 <!-- 
    52 <fieldset class="linkfyi"> 
    53  <legend>Link to this page</legend> 
    54  [% c.req.base %][% c.req.path %]?ver=[% version %][% FOREACH j IN [ 0 .. pokemon.max ]; NEXT IF !pokemon.$j; ';poke='; pokemon.$j.name; END %] 
    55 </fieldset> 
    56 --> 
    57 <table class="dex-comp" cellspacing="0"> 
     42<p class="permalink">[% c.req.base %][% c.req.path %]?ver=[% version %][% FOREACH j IN [ 0 .. pokemon.max ]; NEXT IF !pokemon.$j; ';poke='; pokemon.$j.name; END %]</p> 
     43<table class="dex-table dex-comparison" cellspacing="0"> 
    5844<thead> 
    5945[% IF pokemon_notes %] 
    6046<tr> 
    61  <th rowspan="2"> [% Icons.$version %] </th> 
     47    <th rowspan="2"> [% Icons.$version %] </th> 
    6248[%     tmp = MAX_POKEMON - 1 %] 
    6349[%     FOREACH i IN [ 0 .. tmp ] %] 
    64  <td class="bottom"> 
     50    <td class="bottom"> 
    6551[%         IF pokemon_notes.$i.length %] 
    6652[%             pokemon_notes.$i %] 
    6753[%         ELSE %] 
    6854[%             FOREACH poke IN pokemon_notes.$i %] 
    69   <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> 
     55     <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> 
    7056[%                 '<br/>' UNLESS loop.last %] 
    7157[%             END %] 
     
    7864<tr> 
    7965[% UNLESS pokemon_notes %] 
    80  <th> [% Icons.$version %] </th> 
    81 [% END %] 
    82 [% MACRO block_row BLOCK %] 
    83  <th> 
     66    <th> [% Icons.$version %] </th> 
     67[% END %] 
     68[% MACRO block_row BLOCK %] 
     69    <th> 
    8470[%     IF pokemon.size > 1 %] 
    85   <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/> 
    86 [%     END %] 
    87   <a href="[% dex_uri('pokemon', p.name) %]"><img src="/dex-images/dp/[% p.id.pad(3) %].png" alt=""/></a> 
    88  </th> 
    89 [% END %] 
    90 [% print_row(extras=' <th></th>') %] 
    91 </tr> 
    92  
    93 <tr> 
    94  <th> <input type="submit" value="Recompare"/> </th> 
     71        <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/> 
     72[%     END %] 
     73        <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    </th> 
     75[% END %] 
     76[% print_row(extras='    <th></th>') %] 
     77</tr> 
     78 
     79<tr class="heading"> 
     80    <th> <input type="submit" value="Again!"/> </th> 
    9581[% tmp = MAX_POKEMON - 1 %] 
    9682[% FOREACH i IN [ 0 .. tmp ] %] 
    97  <th> <input type="text" name="poke" maxlength="12" size="12" value="[% pokemon_raw.$i %]"/> </th> 
    98 [% END %] 
     83    <th> <input type="text" name="poke" maxlength="12" size="8" value="[% pokemon_raw.$i %]"/> </th> 
     84[% END %] 
     85</tr> 
     86</thead> 
     87 
     88<tbody> 
     89<tr class="sprites"> 
     90    <th rowspan="2">Height</th> 
     91[% MACRO block_row BLOCK %] 
     92    <td> <img src="/dex-images/crop/[% tmp = p.id; tmp.pad(3) %].png" alt="[% p.name %]" style="height: [% tmp = p.height / max_height * 100; round(tmp, 1) %]%"/> </td> 
     93[% END %] 
     94[% print_row %] 
     95</tr> 
     96<tr> 
     97[% MACRO block_row BLOCK %] 
     98    <td> [% height_imperial(p.height) %]<br/>[% height_metric(p.height) %] </td> 
     99[% END %] 
     100[% print_row %] 
    99101</tr> 
    100102[% divider_bar %] 
    101 </thead> 
    102  
    103 <tbody> 
    104 <tr class="dex-comp-images"> 
    105  <th rowspan="2">Height</th> 
    106 [% 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.height / max_height * 100; round(tmp, 1) %]%"/> </td> 
    108 [% END %] 
    109 [% print_row %] 
    110 </tr> 
    111 <tr> 
    112 [% MACRO block_row BLOCK %] 
    113 <td> [% height_imperial(p.height) %]<br/>[% height_metric(p.height) %] </td> 
     103 
     104<tr class="sprites"> 
     105    <th rowspan="2">Weight</th> 
     106[% 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> 
     108[% END %] 
     109[% print_row %] 
     110</tr> 
     111<tr> 
     112[% MACRO block_row BLOCK %] 
     113    <td> [% weight_imperial(p.weight) %]<br/>[% weight_metric(p.weight) %] </td> 
    114114[% END %] 
    115115[% print_row %] 
     
    117117[% divider_bar %] 
    118118 
    119 <tr class="dex-comp-images"> 
    120  <th rowspan="2">Weight</th> 
    121 [% MACRO block_row BLOCK %] 
    122  <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> 
    123 [% END %] 
    124 [% print_row %] 
    125 </tr> 
    126 <tr> 
    127 [% MACRO block_row BLOCK %] 
    128  <td> [% weight_imperial(p.weight) %]<br/>[% weight_metric(p.weight) %] </td> 
     119<tr class="color[% color; color = 3 - color %]"> 
     120    <th>Type</th> 
     121[% MACRO block_row BLOCK %] 
     122    <td> 
     123        [% type_name(p.type1) %] 
     124[%     IF p.type2 %] 
     125        <br/> [% type_name(p.type2) %] 
     126[%     END %] 
     127    </td> 
     128[% END %] 
     129[% print_row %] 
     130</tr> 
     131 
     132<tr class="color[% color; color = 3 - color %]"> 
     133    <th>Egg Groups</th> 
     134[% MACRO block_row BLOCK %] 
     135    <td class="left"> 
     136[%     FOREACH b IN p.breeds %] 
     137        <a href="[% c.uri('Dex::Search', 'pokemon_search', { breed => b.breed }) %]">[% BreedingGroups.${b.breed} %]</a> 
     138[%         '<br/>' UNLESS loop.last %] 
     139[%     END %] 
     140    </td> 
     141[% END %] 
     142[% print_row %] 
     143</tr> 
     144 
     145<tr class="color[% color; color = 3 - color %]"> 
     146    <th>Gender</th> 
     147[% MACRO block_row BLOCK %] 
     148    <td class="left"> [% gender_text(p.gender) %] </td> 
     149[% END %] 
     150[% print_row %] 
     151</tr> 
     152 
     153<tr class="color[% color; color = 3 - color %]"> 
     154    <th>Abilities</th> 
     155[% MACRO block_row BLOCK %] 
     156    <td class="left"> 
     157[%     FOREACH a IN p.pokemon_abilities %] 
     158        <a href="[% c.uri('Dex::Search', 'pokemon_search', { ability => a.ability.id }) %]">[% a.ability.name %]</a> 
     159[%         '<br/>' UNLESS loop.last %] 
     160[%     END %] 
     161    </td> 
    129162[% END %] 
    130163[% print_row %] 
     
    132165[% divider_bar %] 
    133166 
    134 <tr> 
    135  <th>Type</th> 
    136 [% MACRO block_row BLOCK %] 
    137  <td class="left middle xtype-[% p.type1 %]"> 
    138   <a href="[% dex_uri('types', p.type1) %]"><img src="/dex-images/typeicons/[% p.type1 %].png" alt=""/> [% p.type1 %]</a> 
    139 [%     IF p.type2 %] 
    140   <br/> <a href="[% dex_uri('types', p.type2) %]"><img src="/dex-images/typeicons/[% p.type2 %].png" alt=""/> [% p.type2 %]</a>  
    141 [%     END %] 
    142  </td> 
    143 [% END %] 
    144 [% print_row %] 
    145 </tr> 
    146  
    147 <tr> 
    148  <th>Breed Groups</th> 
    149 [% MACRO block_row BLOCK %] 
    150  <td class="left"> 
    151 [%     FOREACH b IN p.breeds %] 
    152   <a href="[% c.uri('Dex::Search', 'pokemon_search', { breed => b.breed }) %]">[% BreedingGroups.${b.breed} %]</a> 
    153 [%         '<br/>' UNLESS loop.last %] 
    154 [%     END %] 
    155  </td> 
    156 [% END %] 
    157 [% print_row %] 
    158 </tr> 
    159  
    160 <tr> 
    161  <th>Gender</th> 
    162 [% MACRO block_row BLOCK %] 
    163  <td class="left"> [% gender_text(p.gender) %] </td> 
    164 [% END %] 
    165 [% print_row %] 
    166 </tr> 
    167  
    168 <tr> 
    169  <th>Abilities</th> 
    170 [% MACRO block_row BLOCK %] 
    171  <td class="left"> 
    172 [%     FOREACH a IN p.pokemon_abilities %] 
    173   <a href="[% c.uri('Dex::Search', 'pokemon_search', { ability => a.ability.id }) %]">[% a.ability.name %]</a> 
    174 [%         '<br/>' UNLESS loop.last %] 
    175 [%     END %] 
    176 </td> 
    177 [% END %] 
    178 [% print_row %] 
    179 </tr> 
    180 [% divider_bar %] 
    181  
    182167[% FOREACH i IN [ 0 .. StatColumns.max ] %] 
    183 <tr> 
    184  <th>[% StatNames.$i %]</th> 
     168<tr class="color[% color; color = 3 - color %]"> 
     169    <th>[% StatNames.$i.replace(' ', '<br/>') %]</th> 
    185170[%     stat = StatColumns.$i %] 
    186171[%     stat_max = 0; stat_min = 255; FOREACH p IN pokemon; NEXT UNLESS p; SET stat_max = p.$stat IF stat_max < p.$stat; SET stat_min = p.$stat IF stat_min > p.$stat; END %] 
    187172[%     MACRO block_row BLOCK %] 
    188  <td><span style="color: black; height: 100%; padding: 2px 4px; background: #[% tmp = p.$stat / 255 * 360; stat_color(round(tmp)) %]; font-size: [% ' ' %] 
     173    <td><span style="color: black; height: 100%; padding: 2px 4px; background: #[% tmp = p.$stat / 255 * 360; stat_color(round(tmp)) %]; font-size: [% ' ' %] 
    189174[%         IF stat_max == stat_min %] 
    190175[%             FONT_MAX %] 
     
    201186</form> 
    202187 
    203 <!--#########################################################################--> 
     188<!-- ####################################################################### --> 
    204189 
    205190[% levels = {} %] 
     
    220205[% END %] 
    221206 
     207[% thead = BLOCK %] 
     208<thead> 
     209<tr class="heading"> 
     210    <th> [% Icons.$version %] </th> 
     211[%     MACRO block_row BLOCK %] 
     212    <th> <a href="[% dex_uri('pokemon', p.name) %]"><img src="/dex-images/icons/[% p.id.pad(3) %].png" alt=""/><br/>[% p.name %]</a> </th> 
     213[%     END %] 
     214[%     print_row(extras="    <th> -- </th>\n") %] 
     215    </tr> 
     216</thead> 
     217[% END %] 
     218 
     219[% color = 1 %] 
     220 
    222221<h1>Moves</h1> 
    223 <table class="dex-comp" cellspacing="0"> 
     222<table class="dex-table dex-comparison" cellspacing="0"> 
    224223[% thead %] 
    225224<tbody> 
    226225[% FOREACH level IN levels.keys.nsort %] 
    227 <tr class="dex-comp-level"><th>[% level == 1 ? '--' : level + 0 %]</th> 
    228 [%     MACRO block_row BLOCK %] 
    229  <td>[% FOREACH moveid IN levels.$level.$p %]<a href="[% dex_uri('moves', MoveData.$moveid.name) %]">[% MoveData.$moveid.name %]</a>[% '<br/>' UNLESS loop.last %][% END %]</td> 
     226<tr class="moves color[% color %]"> 
     227    <th>[% level == 1 ? '--' : level + 0 %]</th> 
     228[%     MACRO block_row BLOCK %] 
     229    <td>[% FOREACH moveid IN levels.$level.$p %]<a href="[% dex_uri('moves', MoveData.$moveid.name) %]">[% MoveData.$moveid.name %]</a>[% '<br/>' UNLESS loop.last %][% END %]</td> 
    230230[%     END %] 
    231231[%     print_row %] 
    232232</tr> 
     233[%     color = 3 - color %] 
    233234[% END %] 
    234235</tbody> 
     
    236237 
    237238<h1>Cross-Referenced Moves</h1> 
    238 <table class="dex-comp" cellspacing="0"> 
     239<table class="dex-table dex-comparison" cellspacing="0"> 
    239240[% thead %] 
    240241<tbody> 
    241242[% FOREACH moveid IN sort_by_move(moves.keys) %] 
    242 <tr class="dex-comp-move"> 
    243  <th><a href="[% dex_uri('moves', MoveData.$moveid.name) %]">[% MoveData.$moveid.name %]</a></th> 
    244 [%     MACRO block_row BLOCK %] 
    245  <td>[% moves.$moveid.$p %]</td> 
     243<tr class="moves color[% color %]"> 
     244    <th><a href="[% dex_uri('moves', MoveData.$moveid.name) %]">[% MoveData.$moveid.name %]</a></th> 
     245[%     MACRO block_row BLOCK %] 
     246    <td>[% moves.$moveid.$p %]</td> 
    246247[%     END %] 
    247248[%     print_row %] 
    248249</tr> 
    249 [% END %] 
    250 </tbody> 
    251 </table> 
    252  
    253 <!--#########################################################################--> 
     250[%     color = 3 - color %] 
     251[% END %] 
     252</tbody> 
     253</table> 
     254 
     255<!-- ####################################################################### --> 
    254256 
    255257[% move_types = ['egg','tutor','machine'] %] 
     
    267269[%     NEXT UNLESS moves.keys.size %] 
    268270 
     271[%     color = 1 %] 
     272 
    269273<h1>[% move_names.$i %]</h1> 
    270  
    271 <table class="dex-comp" cellspacing="0"> 
     274<table class="dex-table dex-comparison" cellspacing="0"> 
    272275[%     thead %] 
    273276<tbody> 
    274277[%     FOREACH moveid IN sort_by_move(moves.keys) %] 
    275 <tr class="dex-comp-move"> 
    276  <th><a href="[% dex_uri('moves', MoveData.$moveid.name) %]">[% MoveData.$moveid.name %]</a></th> 
     278<tr class="moves color[% color %]"> 
     279    <th><a href="[% dex_uri('moves', MoveData.$moveid.name) %]">[% MoveData.$moveid.name %]</a></th> 
    277280[%         FOREACH p IN pokemon %] 
    278  <td>[% '&bull;' IF moves.$moveid.${p.id} %]</td> 
     281    <td>[% '&bull;' IF moves.$moveid.${p.id} %]</td> 
    279282[%         END %] 
    280283[%         extra_cells %] 
    281284</tr> 
    282 [%     END %] 
    283 </tbody> 
    284 </table> 
    285 [% END %] 
     285[%         color = 3 - color %] 
     286[%     END %] 
     287</tbody> 
     288</table> 
     289[% END %] 
  • veekun/branches/layout/templates/dex/utils/compare.tt

    r31 r106  
    22 
    33<form action="" method="get"> 
    4   <fieldset> 
     4    <fieldset> 
    55    <legend>Pok&eacute;mon</legend> 
    66[% FOREACH i IN [ 1 .. MAX_POKEMON ] %] 
    7     <p> <input type="text" name="poke" maxlength="20"/> </p> 
     7        <p> <input type="text" name="poke" maxlength="20"/> </p> 
    88[% END %] 
    9   </fieldset> 
    10   <fieldset> 
     9    </fieldset> 
     10    <fieldset> 
    1111    <legend>Version to use for move comparison</legend> 
    1212[% FOREACH ver IN versions %] 
    13     <p> <input type="radio" name="version" value="[% ver %]" maxlength="20"[% ' checked="checked"' IF ver == version %]/> [%+ Icons.$ver %] </p> 
     13        <p> <input type="radio" name="version" value="[% ver %]" maxlength="20"[% ' checked="checked"' IF ver == version %]/> [%+ Icons.$ver %] </p> 
    1414[% END %] 
    15   </fieldset> 
    16   <hr/> 
    17   <input type="submit" value="Pretend the text on this button is witty"/> 
    18   <input type="reset" value="I just woke up and hated *everything*"/> 
     15    </fieldset> 
     16    <hr/> 
     17    <input type="submit" value="Compare!"/> 
     18    <input type="reset" value="Clear"/> 
    1919</form> 
  • veekun/branches/layout/templates/forum/common.tt

    r102 r106  
    104104    <div class="topbar"> 
    105105        <a[% IF post.id %] href="/forum/post/[% post.id %]"[% END %] name="p[% post.id %]">[% post.time | date %]</a> 
     106[%     IF timediff %] 
     107        <span class="timediff">-- [% timediff | timespan %] since previous post</span> 
     108[%     END %] 
    106109    </div> 
    107110    <div class="content"> 
  • veekun/branches/layout/templates/forum/thread/view.tt

    r102 r106  
    1414[% WHILE (p = posts_rs.next) %] 
    1515[%     IF done_posts > 0 %] 
    16 <div class="forum-post-diff">[% p.time - last_post_time | timespan %]</div> 
     16[%         timediff = p.time - last_post_time %] 
     17[%     ELSE %] 
     18[%         timediff = 0 %] 
    1719[%     END %] 
    18 [%     INCLUDE posts_each post=p thread=thread forum=thread.forum show_deleted=0 %] 
    1920[%     done_posts = done_posts + 1 %] 
     21[%     pos = skip + done_posts %] 
     22[%     INCLUDE posts_each post=p thread=thread forum=thread.forum show_deleted=0 timediff=timediff pos=pos %] 
    2023[%     last_post_time = p.time %] 
    2124[%     IF done_posts >= c.site_opts.page_sizes.posts; LAST; END %] 
  • veekun/branches/layout/templates/index.tt

    r91 r106  
    2828[% WHILE (t = recent_news.next) %] 
    2929        <div class="front-newspost"> 
    30             <a href="/user/[% t.firstpost.userid %]" class="icon">[% IF t.firstpost.user.newspic %]<img src="/images/news/[% t.firstpost.user.newspic %]" alt="[% t.firstpost.user.name %]" title="[% t.firstpost.user.name %]"/>[% ELSE; t.firstpost.user.name; END %]</a> 
     30            <a href="/users/[% t.firstpost.userid %]" class="icon">[% IF t.firstpost.user.newspic %]<img src="/images/news/[% t.firstpost.user.newspic %]" alt="[% t.firstpost.user.name %]" title="[% t.firstpost.user.name %]"/>[% ELSE; t.firstpost.user.name; END %]</a> 
    3131            <div class="date">[% format_date(t.firstpost.time) %]</div> 
    3232            <div class="title">[% t.subject %]</div> 
     
    4444[% color = 1 %] 
    4545[% WHILE (t = recent_posts.next) %] 
    46             <tr class="color[% color %]"><td><a href="/forum/post/[% t.lastpost.id %]">[% t.subject %]</a></td><td><a href="/user/[% t.lastpost.user.id %]">[% t.lastpost.user.name %]</a></td><td>[% t.lastpost.time | date %]</td></tr> 
     46            <tr class="color[% color %]"><td><a href="/forum/post/[% t.lastpost.id %]">[% t.subject %]</a></td><td><a href="/users/[% t.lastpost.user.id %]">[% t.lastpost.user.name %]</a></td><td>[% t.lastpost.time | date %]</td></tr> 
    4747[%     color = 3 - color%] 
    4848[% END %] 
  • veekun/branches/layout/templates/style/dex.tt

    r105 r106  
    2525.minibar { border: 1px solid #806640; } 
    2626  .minibar .fill { background-color: #c0a680; height: 4px; } 
     27 
     28td.hbar { height: 1px; padding: 0 !important; background-color: #C0A680; } 
     29 
     30.permalink { font-family: monospace; text-align: center; } 
     31  .permalink:before { content: 'Shortened permalink: '; font-family: Helvetica, Verdana, Arial, sans-serif; color: #c0a680; } 
    2732 
    2833/* main layout chunks */ 
     
    99104  .dex-table td.breeds, 
    100105  .dex-table td.abilities { font-size: 85%; } 
    101   .dex-table tr.heading th { background: #e6d3b8; color: #806640; border: 1px solid #c0a680; border-left: none; border-right: none; } 
    102106  .dex-table tr.rowgroup td { border-top: 2px solid #c0a680; } 
    103107 
     
    115119.dex-locations-map .partition img { position: absolute; } 
    116120 
     121/* Pokemon comparifier */ 
     122table.dex-comparison {} 
     123table.dex-comparison tr td { width: 12%; text-align: center; } 
     124table.dex-comparison thead th { vertical-align: bottom; } 
     125table.dex-comparison thead input[type="text"] { width: 90%; } 
     126table.dex-comparison tbody th { font-weight: normal; font-style: italic; width: 4%; } 
     127table.dex-comparison tr.sprites td { height: 96px; vertical-align: bottom; } 
     128table.dex-comparison tr.moves td { width: 11.5%; } 
     129table.dex-comparison tr.moves th { width: 8%; } 
    117130 
    118131 
    119  
    120  
    121  
    122  
  • veekun/branches/layout/templates/style/forum.tt

    r102 r106  
    2424    .forum-post .sidebar .title { font-size: 85%; color: #806640; } 
    2525    .forum-post .sidebar .title.custom { color: black; } 
    26     .forum-post .sidebar .avatar { width: 98px; height: 98px; margin: 0.25em auto; border: 1px dotted #c0a680; text-align: center; xline-height: 98px; } 
     26    .forum-post .sidebar .avatar { width: 98px; height: 98px; margin: 0.5em auto; border: 1px dotted #c0a680; text-align: center; xline-height: 98px; } 
    2727      .forum-post .sidebar .avatar img { margin: -1px; } 
    2828  .forum-post .sidebar, 
    2929  .forum-post .topbar { background: url(/images/bg-fade.png) #e6d3b8 fixed left bottom no-repeat; border: 1px solid #c0a680; } 
    3030  .forum-post .topbar { border-left: none; padding: 0.25em 0.5em; margin-left: 15em; position: relative; left: -1px; margin-right: -1px; } 
     31    .forum-post .topbar .timediff { font-size: 85%; height: 100%; } 
    3132  .forum-post .content { margin-left: 15em; } 
    3233    .forum-post .content .edits { border-bottom: 1px dotted #c0a680; font-size: 85%; font-style: italic; padding: 0.25em 0.5em; } 
     
    4041  .forum-post-infobox .flags, 
    4142  .forum-post-infobox .postcount, 
    42   .forum-post-infobox .pagelist { margin: 0.5em; } 
     43  .forum-post-infobox .pagelist { margin: 0.25em; } 
    4344  .forum-post-infobox .blurb { font-style: italic; } 
    4445  .forum-post-infobox .blurb, 
    45   .forum-post-infobox .flags { float: left; } 
     46  .forum-post-infobox .flags { float: left; clear: left; } 
    4647  .forum-post-infobox .postcount, 
    47   .forum-post-infobox .pagelist { float: right; } 
     48  .forum-post-infobox .pagelist { float: right; clear: right; } 
    4849.forum-post-diff { background: url(/images/bg-fade.png) #c0a680 fixed left bottom no-repeat; color: #fff5e6; padding: 0.25em; font-size: 85%; text-align: center; } 
    4950  .forum-post-diff + .forum-post { margin-top: 0; } 
    5051 
    51 .postbar { margin: 0.25em 0; } 
     52.postbar { } 
    5253  .postbar .postrank { float: right; } 
    5354  .postbar .postbar-container { height: 1em; background: url(/images/bg-fade.png) #c0a680 fixed left bottom no-repeat; } 
  • veekun/branches/layout/templates/style/global.tt

    r102 r106  
    2323.color1.dimmed { background-color: #f6f6f6; } 
    2424.color2.dimmed { background-color: #eaeaea; } 
     25table tr.heading th { background: #e6d3b8; color: #806640; border: 1px solid #c0a680; border-left: none; border-right: none; } 
    2526 
    2627/* lazy alignment */ 
     
    4344#content h3 { background-image: url(/images/h3-ground.png); } 
    4445#content h1 img, #content h2 img, #content h3 img { vertical-align: 0; } 
    45 #content > h1:first-child, #content > h2:first-child, #content > h3:first-child { margin-top: -8px; border-top: none; } 
     46#content > h1:first-child, #content > h2:first-child, #content > h3:first-child { margin-top: -0.5em; border-top: none; } 
    4647#content hr { border: none; border-bottom: 1px dotted #806640; background: url(/images/hr.png) no-repeat bottom left; height: 14px; clear: both; margin: 2px 0; } 
    4748 
     
    7778#content, 
    7879#debug, 
    79 #footer { background: url(/images/bg-fade.png) #fff5e6 fixed left bottom no-repeat; padding: 8px; border: 1px solid #806640; overflow: hidden; } 
     80#footer { background: url(/images/bg-fade.png) #fff5e6 fixed left bottom no-repeat; padding: 0.5em; border: 1px solid #806640; overflow: hidden; } 
    8081#debug, 
    8182#footer { background-color: #e6d3b8; } 
     
    8485#footer { -moz-border-radius-bottomright: 64px; } 
    8586 
    86 #breadcrumbs a { padding: 0.25em; margin: 0 -0.25em; border: 1px solid transparent; } 
    87 #breadcrumbs a:hover { background: url(/images/bg-fade.png) [% hover_medium %] fixed left bottom no-repeat; border-color: [% hover_dark %]; } 
     87#breadcrumbs { border-bottom: 1px dotted #c0a680; margin: -0.5em; margin-bottom: 0.5em; padding: 0.5em; } 
     88  #breadcrumbs a { padding: 0.25em; margin: 0 -0.25em; border: 1px solid transparent; } 
     89    #breadcrumbs a:hover { background: url(/images/bg-fade.png) [% hover_medium %] fixed left bottom no-repeat; border-color: [% hover_dark %]; } 
     90 
     91/* errors, messages, whatevers */ 
     92#error, #info, #success { margin: 1em; } 
     93  #error p, #info p, #success p { clear: left; padding: 0.5em; margin: 0; } 
     94  #error   p { border: 1px solid #c08080; background: url(/images/bg-fade.png) #ffe6e6 fixed left bottom no-repeat; } 
     95  #info    p { border: 1px solid #8080c0; background: url(/images/bg-fade.png) #e6e6ff fixed left bottom no-repeat; } 
     96  #success p { border: 1px solid #80c080; background: url(/images/bg-fade.png) #e6ffe6 fixed left bottom no-repeat; } 
     97  #error   .heading, 
     98  #info    .heading, 
     99  #success .heading { float: left; font-weight: bold; padding: 0.25em 1em; margin-right: 0.5em; } 
     100  #error   .heading { background: #c08080; } 
     101  #info    .heading { background: #8080c0; } 
     102  #success .heading { background: #80c080; } 
     103 
     104.warning { margin: 0.5em auto; text-align: center; font-size: larger; border: 1px dotted #c08080; background-color: #ffe6e6; width: 75%; } 
    88105 
    89106/* sql dump table */ 
     
    97114input { font-family: sans-serif; } 
    98115input[type='text']:focus { background-color: #fffde6; } 
    99 input[type='text'], input[type='password'], textarea { padding: 3px; border: 1px solid #806640; -moz-border-radius: 4px; } 
     116input[type='text'], input[type='password'], textarea { padding: 3px; border: 1px solid #806640; -moz-border-radius: 4px; background-color: white; } 
    100117input[type='text']:focus, input[type='password']:focus, textarea:focus { background-color: #fffde6; outline: 2px solid #d89090; border-color: #802020; -moz-outline-radius: 4px; -moz-border-radius: 0; } 
    101118input[type="submit"], input[type="reset"], input[type="button"], button { border: 1px solid #806640; background: url(/images/pawprint.png) #bf9960 2px center no-repeat; padding: 2px 2px 2px 18px; color: black; -moz-border-radius: 8px; } 
     
    125142  li.dimmed { color: gray; text-decoration: line-through; } 
    126143 
     144/* pagelist */ 
     145.pagelist { } 
     146  .pagelist span, .pagelist a { padding: 0 0.2em; } 
  • veekun/branches/layout/templates/users/list.tt

    r69 r106  
    99 </div> 
    1010 <p class="total center">Sorting by [% IF !params.order %]id[% ELSE %][% params.order %][% END %], in [% IF params.sort == 'desc' %] descending[% ELSE %] ascending[% END %] order.</p> 
    11  <tr> 
     11 <tr class="heading"> 
    1212  <th class="userlist-id"> 
    1313   <a href="/users?order=id;sort=desc[% IF filter; ";filter="; filter; END %]"><img src="/images/icons/desc.png" /></a>ID<a href="/users?order=id;sort=asc[% IF filter; ";filter="; filter; END %]"><img src="/images/icons/asc.png" /></a> 
     
    2828  </th> 
    2929 </tr> 
     30[% color = 1 %] 
    3031[% WHILE (user = users_rs.next) %] 
    31  <tr> 
     32 <tr class="color[% color %]"> 
    3233  <td class="userlist-id">[% user.id %]</td> 
    3334  <td class="userlist-avatar"><a href="/users/[% user.id %]">[%# vee add user group icons again maybe? -%]<img width="60" height="60" src="/images/avatars/[% IF user.avatar %][% user.avatar %][% ELSE %]noavatar.png[% END %]" /></a></td> 
     
    4041  <td class="userlist-postct"><div style="float: right; width: 128px;"><div style="float: right; width: 128px;">[% INCLUDE postbar posts=user.postct %]</div>[%+ user.postct %]</td> 
    4142 </tr> 
    42 [% this.user = 0; %] 
     43[%     this.user = 0; %] 
     44[%     color = 3 - color %] 
    4345[% END %] 
    4446</table> 
  • veekun/branches/layout/templates/wrapper.tt

    r103 r106  
    112112 
    113113<div id="content"> 
    114 [% IF error %]<div class="error"><div class="error-header">Internal <code>[% error.type %]</code> error</div><div class="error-content">[% error.info %]</div></div>[% END %] 
    115 [% IF error_msg %]<div class="error"><div class="error-header">Error</div><div class="error-content">[% error_msg.join('<br/>') %]</div></div>[% END %] 
    116 [% IF info_msg %]<div class="info"><div class="info-header">Information</div><div class="info-content">[% info_msg.join('<br/>') %]</div></div>[% END %] 
    117 [% IF success_msg %]<div class="success"><div class="success-header">Success!</div><div class="success-content">[% success_msg.join('<br/>') %]</div></div>[% END %] 
     114[% IF error %]<div id="error"><div class="heading">Internal <code>[% error.type %]</code> error</div><p>[% error.info %]</p></div>[%# ... %] 
     115[% ELSIF error_msg %]<div id="error"><div class="heading">Error</div><p>[% error_msg.join('<br/>') %]</p></div>[% END %] 
     116[% IF info_msg %]<div id="info"><div class="heading">Information</div><p>[% info_msg.join('<br/>') %]</p></div>[% END %] 
     117[% IF success_msg %]<div id="success"><div class="heading">Success!</div><p>[% success_msg.join('<br/>') %]</p></div>[% END %] 
    118118[% IF crumbs %]<div id="breadcrumbs">You are here: [% crumbs.join(' :: ') %]</div>[% END %] 
    119119[% END # skip_wrapper %]