Skip to content

Commit 875b79e

Browse files
committed
Update code in dexlib to call the new url and icon helpers
Updates #117
1 parent f7df522 commit 875b79e

File tree

1 file changed

+21
-21
lines changed
  • splinext/pokedex/templates/pokedex

1 file changed

+21
-21
lines changed

splinext/pokedex/templates/pokedex/lib.mako

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@
237237
<div id="dex-header">
238238
<a href="${url.current(name=c.prev_species.name.lower(), form=None)}" id="dex-header-prev" class="dex-box-link">
239239
<img src="${h.static_uri('spline', 'icons/control-180.png')}" alt="«">
240-
${h.pokedex.pokemon_icon(c.prev_species.default_pokemon, alt="")}
240+
${pokemon_icon(c.prev_species.default_pokemon, alt="")}
241241
${c.prev_species.id}: ${c.prev_species.name}
242242
</a>
243243
<a href="${url.current(name=c.next_species.name.lower(), form=None)}" id="dex-header-next" class="dex-box-link">
244244
${c.next_species.id}: ${c.next_species.name}
245-
${h.pokedex.pokemon_icon(c.next_species.default_pokemon, alt="")}
245+
${pokemon_icon(c.next_species.default_pokemon, alt="")}
246246
<img src="${h.static_uri('spline', 'icons/control.png')}" alt="»">
247247
</a>
248-
${h.pokedex.pokemon_form_image(icon_form or c.pokemon.default_form, prefix='icons')}
248+
${pokemon_form_image(icon_form or c.pokemon.default_form, prefix='icons')}
249249
<br>${c.pokemon.species.id}: ${c.pokemon.species.name}
250250
% if subpages:
251251
<ul class="inline-menu">
@@ -295,7 +295,7 @@
295295
% if len(column) == len(column[0].generation.version_groups):
296296
## If the entire gen has been collapsed into a single column, just show
297297
## the gen icon instead of the messy stack of version icons
298-
${h.pokedex.generation_icon(column[0].generation)}
298+
${generation_icon(column[0].generation)}
299299
% else:
300300
<%
301301
if move_method:
@@ -312,7 +312,7 @@
312312
% if i != 0:
313313
<br>
314314
% endif
315-
${h.pokedex.version_group_icon(version_group)}
315+
${version_group_icon(version_group)}
316316
% endfor
317317
% endif
318318
</th>
@@ -330,9 +330,9 @@
330330
## rather than ignoring all but the first
331331
% for version_group in column:
332332
% if version_group in version_group_data:
333-
${h.pokedex.version_group_icon(version_group)}
333+
${version_group_icon(version_group)}
334334
% elif version_group in c.move_tutor_version_groups:
335-
<span class="no-tutor">${h.pokedex.version_group_icon(version_group)}</span>
335+
<span class="no-tutor">${version_group_icon(version_group)}</span>
336336
% endif
337337
% endfor
338338
</td>
@@ -365,7 +365,7 @@
365365
% endif
366366
</td>
367367
% elif method.identifier == u'egg':
368-
<td class="dex-moves-egg">${h.pokedex.chrome_img('egg-cropped.png',
368+
<td class="dex-moves-egg">${chrome_img('egg-cropped.png',
369369
alt=h.literal(u"&bull;"))}</td>
370370
% else:
371371
<td>&bull;</td>
@@ -418,11 +418,11 @@
418418
</%def>
419419

420420
<%def name="pokemon_table_row(pokemon)">
421-
<td class="icon">${h.pokedex.pokemon_icon(pokemon)}</td>
422-
<td>${h.pokedex.pokemon_link(pokemon)}</td>
421+
<td class="icon">${pokemon_icon(pokemon)}</td>
422+
<td>${pokemon_link(pokemon)}</td>
423423
<td class="type2">
424424
% for type in pokemon.types:
425-
${h.pokedex.type_link(type)}
425+
${type_link(type)}
426426
% endfor
427427
</td>
428428
<td class="ability">
@@ -437,7 +437,7 @@
437437
<em>${_pokemon_ability_link(pokemon.hidden_ability)}</em>
438438
% endif
439439
</td>
440-
<td>${h.pokedex.chrome_img('gender-rates/%d.png' % pokemon.species.gender_rate, alt=h.pokedex.gender_rate_label[pokemon.species.gender_rate])}</td>
440+
<td>${chrome_img('gender-rates/%d.png' % pokemon.species.gender_rate, alt=h.pokedex.gender_rate_label[pokemon.species.gender_rate])}</td>
441441
<td class="egg-group">
442442
% for i, egg_group in enumerate(pokemon.species.egg_groups):
443443
% if i > 0:
@@ -487,11 +487,11 @@
487487
<td><a href="${url(controller='dex', action='moves', name=move.name.lower())}">${move.name}</a></td>
488488
% if gen_instead_of_type:
489489
## Done on type pages; we already know the type, so show the generation instead
490-
<td class="type">${h.pokedex.generation_icon(move.generation)}</td>
490+
<td class="type">${generation_icon(move.generation)}</td>
491491
% else:
492-
<td class="type">${h.pokedex.type_link(move.type)}</td>
492+
<td class="type">${type_link(move.type)}</td>
493493
% endif
494-
<td class="class">${h.pokedex.damage_class_icon(move.damage_class)}</td>
494+
<td class="class">${damage_class_icon(move.damage_class)}</td>
495495
<td>
496496
% if pp_override and pp_override != move.pp:
497497
<s>${move.pp}</s> <br> ${pp_override}
@@ -541,11 +541,11 @@ collapse_key = h.pokedex.collapse_flavor_text_key(literal=obdurate)
541541
%>
542542
<dl class="dex-flavor-text${' ' if classes else ''}${classes}">
543543
% for generation, group in h.pokedex.group_by_generation(flavor_text):
544-
<dt class="dex-flavor-generation">${h.pokedex.generation_icon(generation)}</dt>
544+
<dt class="dex-flavor-generation">${generation_icon(generation)}</dt>
545545
<dd>
546546
<dl>
547547
% for versions, text in h.pokedex.collapse_versions(group, key=collapse_key):
548-
<dt>${h.pokedex.version_icons(*versions)}</dt>
548+
<dt>${version_icons(*versions)}</dt>
549549
<dd><p${' class="dex-obdurate"' if obdurate else '' |n}>${text}</p></dd>
550550
% endfor
551551
</dl>
@@ -613,7 +613,7 @@ cry_url = url(controller='dex', action='media',
613613
elif evolution.trigger.identifier == u'use-item':
614614
chunks.append(h.literal(_(u"Use {article} {item}")).format(
615615
article=h.pokedex.article(evolution.trigger_item.name, _=_),
616-
item=h.pokedex.item_link(evolution.trigger_item, include_icon=False)))
616+
item=item_link(evolution.trigger_item, include_icon=False)))
617617
elif evolution.trigger.identifier == u'shed':
618618
chunks.append(
619619
_(u"Evolve {from_pokemon} ({to_pokemon} will consume "
@@ -639,7 +639,7 @@ cry_url = url(controller='dex', action='media',
639639
if evolution.held_item_id:
640640
chunks.append(h.literal(_(u"while holding {article} {item}")).format(
641641
article=h.pokedex.article(evolution.held_item.name),
642-
item=h.pokedex.item_link(evolution.held_item, include_icon=False)))
642+
item=item_link(evolution.held_item, include_icon=False)))
643643
if evolution.known_move_id:
644644
chunks.append(h.literal(_(u"knowing {0}")).format(
645645
h.HTML.a(evolution.known_move.name,
@@ -669,15 +669,15 @@ cry_url = url(controller='dex', action='media',
669669
chunks.append(_(u"when Attack {0} Defense").format(op))
670670
if evolution.party_species_id:
671671
chunks.append(h.literal(_(u"with {0} in the party")).format(
672-
h.pokedex.pokemon_link(evolution.party_species.default_pokemon, include_icon=False)))
672+
pokemon_link(evolution.party_species.default_pokemon, include_icon=False)))
673673
if evolution.party_type_id:
674674
chunks.append(h.literal(_(u"with a {0}-type Pokémon in the party")).format(
675675
h.HTML.a(evolution.party_type.name,
676676
href=url(controller='dex', action='types',
677677
name=evolution.party_type.name.lower()))))
678678
if evolution.trade_species_id:
679679
chunks.append(h.literal(_(u"in exchange for {0}")).format(
680-
h.pokedex.pokemon_link(evolution.trade_species.default_pokemon, include_icon=False)))
680+
pokemon_link(evolution.trade_species.default_pokemon, include_icon=False)))
681681
if evolution.needs_overworld_rain:
682682
chunks.append(_(u'while it is raining outside of battle'))
683683
if evolution.turn_upside_down:

0 commit comments

Comments
 (0)