def version_icons(*versions, **kwargs): """Returns some version icons, given a list of version names. Keyword arguments: _: translator for i18n """ # python's argument_list syntax is kind of limited here _ = kwargs.get('_', globals()['_']) version_icons = u'' comma = chain([u''], repeat(u', ')) for version in versions: # Convert version to string if necessary if isinstance(version, basestring): identifier = filename_from_name(version) name = version else: identifier = version.identifier name = version.name version_icons += h.HTML.img( src=h.static_uri('pokedex', 'images/versions/%s.png' % identifier), alt=comma.next() + name, title=name) return version_icons
def version_icons(*versions, **kwargs): """Returns some version icons, given a list of version names. Keyword arguments: _: translator for i18n """ # python's argument_list syntax is kind of limited here _ = kwargs.get('_', globals()['_']) version_icons = u'' comma = chain([u''], repeat(u', ')) for version in versions: # Convert version to string if necessary if isinstance(version, basestring): identifier = filename_from_name(version) name = version else: identifier = version.identifier name = version.name version_icons += h.HTML.img(src=h.static_uri( 'pokedex', 'images/versions/%s.png' % identifier), alt=comma.next() + name, title=name) return version_icons
def version_group_icon(version_group): return version_icons(*version_group.versions) # XXX this is for the combined pixely version group icons i made names = ', '.join(version.name for version in version_group.versions) return h.HTML.img(src=h.static_uri( 'pokedex', 'images/versions/%s.png' % ('-'.join(version.identifier for version in version_group.versions))), alt=names, title=names)
def version_group_icon(version_group): return version_icons(*version_group.versions) # XXX this is for the combined pixely version group icons i made names = ', '.join(version.name for version in version_group.versions) return h.HTML.img( src=h.static_uri('pokedex', 'images/versions/%s.png' % ( '-'.join(version.identifier for version in version_group.versions))), alt=names, title=names)
def chrome_img(src, **attr): return h.HTML.img(src=h.static_uri('pokedex', 'images/' + src), **attr)
def chrome_img(src, **attr): return h.HTML.img(src=h.static_uri("pokedex", "images/" + src), **attr)