diff --git a/static/nryg.less b/static/nryg.less
index 57ea7029..5b87b4a0 100644
--- a/static/nryg.less
+++ b/static/nryg.less
@@ -590,9 +590,39 @@ nav {
}
.telegram {
+ font-family: "Lucida Sans Unicode", sans-serif;
background-color: #32afed;
- color: white !important;
+ border: 6px solid white;
+ padding: 12px;
+ color: black;
+
+ a, a:hover, a:active, a:visited {
+ color: black;
+ }
+
+ .player {
+ font-weight: bold;
+ }
+
+ .useless-stuff {
+ grid-column: 1;
+ }
+}
+
+.discord {
+ background-color: #7289da;
padding: 18px;
+ color: white;
+ font-family: "Whitney", sans-serif;
+ opacity: 0.8;
+
+ a, a:hover, a:active, a:visited {
+ color: white;
+ }
+
+ .player-image {
+ border-radius: 16px;
+ }
.useless-stuff {
grid-column: 1;
diff --git a/static/whitney.woff b/static/whitney.woff
new file mode 100644
index 00000000..98aa2395
Binary files /dev/null and b/static/whitney.woff differ
diff --git a/templates/minis/discord.html b/templates/minis/discord.html
new file mode 100644
index 00000000..e03643b9
--- /dev/null
+++ b/templates/minis/discord.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
{{ record }}
+
+
รจ su Discord!
+
+
diff --git a/templates/minis/telegram.html b/templates/minis/tg.html
similarity index 100%
rename from templates/minis/telegram.html
rename to templates/minis/tg.html
diff --git a/templates/profile.html b/templates/profile.html
index f7711a6e..eff13888 100644
--- a/templates/profile.html
+++ b/templates/profile.html
@@ -26,21 +26,31 @@
{% with record = ryg %}
{% include "minis/ryg.html" %}
{% endwith %}
+ {% if tg %}
+ {% with record = tg %}
+ {% include "minis/tg.html" %}
+ {% endwith %}
+ {% endif %}
+ {% if discord %}
+ {% with record = discord %}
+ {% include "minis/discord.html" %}
+ {% endwith %}
+ {% endif %}
{% if steam %}
{% with record = steam %}
{% include "minis/steam.html" %}
{% endwith %}
{% endif %}
- {% if rl %}
- {% with record = rl %}
- {% include "minis/rl.html" %}
- {% endwith %}
- {% endif %}
{% if dota %}
{% with record = dota %}
{% include "minis/dota.html" %}
{% endwith %}
{% endif %}
+ {% if rl %}
+ {% with record = rl %}
+ {% include "minis/rl.html" %}
+ {% endwith %}
+ {% endif %}
{% if osu %}
{% with record = osu %}
{% include "minis/osu.html" %}
@@ -56,10 +66,5 @@
{% include "minis/ow.html" %}
{% endwith %}
{% endif %}
- {% if tg %}
- {% with record = tg %}
- {% include "minis/telegram.html" %}
- {% endwith %}
- {% endif %}
{% endblock %}
\ No newline at end of file
diff --git a/webserver.py b/webserver.py
index cfd43752..2b798734 100644
--- a/webserver.py
+++ b/webserver.py
@@ -80,9 +80,10 @@ def page_profile(name: str):
lol = db_session.query(db.LeagueOfLegends).filter_by(royal=user).one_or_none()
ow = db_session.query(db.Overwatch).filter_by(royal=user).one_or_none()
tg = db_session.query(db.Telegram).filter_by(royal=user).one_or_none()
+ discord = db_session.query(db.Discord).filter_by(royal=user).one_or_none()
db_session.close()
return render_template("profile.html", ryg=user, css=css, osu=osu, rl=rl, dota=dota, lol=lol, steam=steam, ow=ow,
- tg=tg, config=config)
+ tg=tg, discord=discord, config=config)
@app.route("/login")
@@ -194,6 +195,16 @@ def page_game(name: str):
elif name == "ryg":
game_name = "Royalnet"
query = db_session.query(db.Royal).all()
+ elif name == "tg":
+ game_name = "Telegram"
+ query = db_session.query(db.Telegram).all()
+ elif name == "discord":
+ game_name = "Discord"
+ # noinspection PyComparisonWithNone
+ query = db_session.query(db.Discord).filter(db.Discord.royal_id != None).all()
+ else:
+ abort(404)
+ return
db_session.close()
return render_template("game.html", minis=query, game_name=game_name, game_short_name=name, config=config)