From cbdb1675abf2bc36a08b8fa642b65aa6cb6e9675 Mon Sep 17 00:00:00 2001 From: lulunac27a <100660343+lulunac27a@users.noreply.github.com> Date: Fri, 11 Oct 2024 23:27:20 -0500 Subject: [PATCH] Fix code and add text display for progress bars --- app.py | 6 ++++++ templates/index.html | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index e4dbecb..2ff7128 100644 --- a/app.py +++ b/app.py @@ -42,6 +42,12 @@ def get_xp_required(self): """ return self.xp_required + def get_level_progress(self): + """ + Get the level progress as a percentage. + """ + return (self.xp / self.xp_required) * 100 + @app.route("/") def index(): diff --git a/templates/index.html b/templates/index.html index 674931b..ec76f58 100644 --- a/templates/index.html +++ b/templates/index.html @@ -9,12 +9,18 @@