From 4f60ff0f8147fca7f710d6c3a87914bcd6f050e5 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 2 Jan 2019 18:16:53 +0100 Subject: [PATCH] Add osu icons --- db.py | 2 +- loldata.py | 2 +- static/nryg.less | 4 ++++ templates/minis/osu.html | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/db.py b/db.py index 4d7daf31..5ec5b6d2 100644 --- a/db.py +++ b/db.py @@ -433,7 +433,7 @@ class LeagueOfLegends(Base): return champ["name"] def highest_mastery_champ_image(self): - champ = loldata.get_champ_by_key(self.highest_mastery_champ).replace("'", "") + champ = loldata.get_champ_by_key(self.highest_mastery_champ) return loldata.get_champ_icon(champ["name"]) diff --git a/loldata.py b/loldata.py index ea8a0281..1d5faf0d 100644 --- a/loldata.py +++ b/loldata.py @@ -1443,5 +1443,5 @@ def get_champ_by_key(key): def get_champ_icon(name: str): - name = name.replace(" ", "") + name = name.replace(" ", "").replace("'", "") return f"http://ddragon.leagueoflegends.com/cdn/8.19.1/img/champion/{name}.png" diff --git a/static/nryg.less b/static/nryg.less index 48e0219a..0dbc32cc 100644 --- a/static/nryg.less +++ b/static/nryg.less @@ -347,6 +347,10 @@ table { .game-title { font-style: normal; + + img { + vertical-align: sub; + } } .standard { diff --git a/templates/minis/osu.html b/templates/minis/osu.html index 01a5783b..d9724a89 100644 --- a/templates/minis/osu.html +++ b/templates/minis/osu.html @@ -9,25 +9,25 @@
- osu! + osu!
{{ record.std_pp | int }}pp
- osu!taiko + taiko
{{ record.taiko_pp | int }}pp
- osu!catch + catch
{{ record.catch_pp | int }}pp
- osu!mania + mania
{{ record.mania_pp | int }}pp