diff --git a/db.py b/db.py index 9642686a..581fd30b 100644 --- a/db.py +++ b/db.py @@ -639,6 +639,23 @@ class Overwatch(Base): self.level = j["prestige"] * 100 + j["level"] self.rank = j["comprank"] + def rank_url(self): + if self.rank < 1500: + n = 1 + elif self.rank < 2000: + n = 2 + elif self.rank < 2500: + n = 3 + elif self.rank < 3000: + n = 4 + elif self.rank < 3500: + n = 5 + elif self.rank < 4000: + n = 6 + else: + n = 7 + return f"https://d1u1mce87gyfbn.cloudfront.net/game/rank-icons/season-2/rank-{n}.png" + class Diario(Base): __tablename__ = "diario" diff --git a/static/nryg.less b/static/nryg.less index 1aeee5ba..9dbad4e1 100644 --- a/static/nryg.less +++ b/static/nryg.less @@ -351,6 +351,53 @@ input[type="text"], input[type="password"] { } } +.ow { + padding: 15px; + font-family: "Big Noodle Too", sans-serif; + font-style: italic; + background-color: #ffffff; + border: 2px solid #ff9c00; + grid-row-gap: 5px; + grid-template-columns: 25% 75%; + color: #ff9c00; + + .player { + grid-row: 1; + grid-column-start: 1; + grid-column-end: 3; + + .player-name { + font-size: x-large; + color: #ff9c00; + } + } + + .game-score.level { + font-size: x-large; + } + + .level { + grid-column: 1; + text-align: center; + } + + .rank { + grid-column: 2; + grid-row-start: 2; + grid-row-end: 4; + margin-top: auto; + margin-bottom: auto; + + img { + vertical-align: middle; + } + + img.icon { + height: 60px; + } + } +} + #edit-css { font-size: medium; } \ No newline at end of file diff --git a/templates/minis/ow.html b/templates/minis/ow.html new file mode 100644 index 00000000..6e9da9ee --- /dev/null +++ b/templates/minis/ow.html @@ -0,0 +1,33 @@ + +