1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
This commit is contained in:
Steffo 2018-02-02 11:46:27 +01:00
parent f7e98d2847
commit f1081cb8b7
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: C27544372FBB445D
3 changed files with 34 additions and 3 deletions

24
templates/challenge1.html Normal file
View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Challenge 1 - RYG</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"
integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<link rel="stylesheet" href="{{ url_for('static', filename='royal.css') }}">
</head>
<body>
<div class="container">
<h1>
La Sfida di questa settimana
</h1>
<h2>
Raggiungiamo i {{ target }}pp di gruppo su osu!
</h2>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: {{ (result-starting) / (target-starting) * 100 }}%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</body>
</html>

View file

@ -38,12 +38,12 @@
<td>{{ record.wins }}</td>
<td sorttable_customkey="{{ record.rank_tier }}">
<div class="dota-rank-medal">
{% if record.rank_tier is not None %}
{% if record.rank_tier is not none %}
<img class="thirtytwo dota-rank-medal-icon" src="{{ record.get_rank_icon_url() }}">{% if record.get_rank_stars_url() %}<img class="thirtytwo dota-rank-medal-stars" src="{{ record.get_rank_stars_url() }}">{% endif %}
{% endif %}
{% if record.rank_tier is not None and record.rank_tier < 10 %}
{% if record.rank_tier is not none and record.rank_tier < 10 %}
<span class="rl-unranked">Unranked</span>
{% else %}
{% elif record.rank_tier >= 10 %}
{{ record.get_rank_name() }} {{ record.get_rank_number() }}
{% endif %}
</div>

View file

@ -28,6 +28,13 @@ def page_leaderboards():
session.close()
return render_template("leaderboards.html", dota_data=dota_data, rl_data=rl_data, ow_data=ow_data, osu_data=osu_data, lol_data=lol_data)
@app.route("/challenge/1")
def page_challenge_one():
session = Session()
result = session.execute(r"SELECT sum(osu.std_pp) + sum(osu.taiko_pp) + sum(osu.catch_pp) + sum(osu.mania_pp) total_pp FROM osu;")
session.close()
return render_template("challenge1.html", starting=4959.518703999999, result=result, target=5200)
if __name__ == "__main__":
try: