Exemple #1
0
 def get_logo_html(self, scale=1.0):
     if logos.has_logo(self.logo):
         width = int(round(32.0 * scale))
         height = int(round(32.0 * scale))
         html = ('<img src="{}"  width="{}" height="{}">')
         return Markup(html.format(logos.get_logo_img(self.logo), width, height))
     else:
         return ''
Exemple #2
0
 def get_logo_html(self, scale=1.0):
     if logos.has_logo(self.logo):
         width = int(round(32.0 * scale))
         height = int(round(32.0 * scale))
         html = ('<img src="{}"  width="{}" height="{}">')
         return Markup(
             html.format(logos.get_logo_img(self.logo), width, height))
     else:
         #app.logger.info("Looked for {} but found nothing.".format(self.logo))
         return ''
Exemple #3
0
 def get_logo_or_flag_html(self, scale=1.0, other_team=None):
     if logos.has_logo(self.logo):
         return self.get_logo_html(scale)
     else:
         return self.get_flag_html(scale)
Exemple #4
0
 def get_logo_or_flag_html(self, scale=1.0, other_team=None):
     if logos.has_logo(self.logo) and (other_team is None or logos.has_logo(other_team.logo)):
         return self.get_logo_html(scale)
     else:
         return self.get_flag_html(scale)
Exemple #5
0
 def get_logo_or_flag_html(self, scale=0.75, other_team=None):
     if logos.has_logo(self.logo) and (other_team is None
                                       or logos.has_logo(other_team.logo)):
         return self.get_logo_html(scale)
     else:
         return self.get_flag_html(scale)