From 5690a374b4200f5f80fb0919eff77687f34b2b29 Mon Sep 17 00:00:00 2001 From: CrispyMalex <50028598+malex5335@users.noreply.github.com> Date: Thu, 12 May 2022 13:37:24 +0200 Subject: [PATCH 1/3] customizing colorization i.e. for dark themes --- progress.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/progress.py b/progress.py index 3f88c2c..5810ab7 100644 --- a/progress.py +++ b/progress.py @@ -42,6 +42,8 @@ def get_template_fields(progress): "progress": progress, "progress_width": progress_width, "progress_color": get_progress_color(progress, scale), + "progress_background": request.args.get("progress_background", "555"), + "progress_number_color": request.args.get("progress_number_color", "fff"), "suffix": request.args.get("suffix", "%"), } From 6bc85051569cb183a039d35d02e689326b7c46d0 Mon Sep 17 00:00:00 2001 From: CrispyMalex <50028598+malex5335@users.noreply.github.com> Date: Thu, 12 May 2022 13:40:20 +0200 Subject: [PATCH 2/3] variables passed through --- templates/progress.svg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/progress.svg b/templates/progress.svg index 16f38ce..c58198a 100644 --- a/templates/progress.svg +++ b/templates/progress.svg @@ -6,7 +6,7 @@ - + {% if title %} @@ -24,7 +24,7 @@ {% endif %} - + {{progress}}{{suffix}} @@ -32,4 +32,4 @@ {{progress}}{{suffix}} - \ No newline at end of file + From ae867b85594dedb91c91b23802577ec30d7deb1b Mon Sep 17 00:00:00 2001 From: CrispyMalex <50028598+malex5335@users.noreply.github.com> Date: Thu, 12 May 2022 13:53:30 +0200 Subject: [PATCH 3/3] adding example so documentation is done properly --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 9a1fc02..658b56f 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,7 @@ https://progress-bar.dev/7/?scale=10&title=mark&suffix=X ![Progress](https://progress-bar.dev/420/?scale=500&title=funds&width=200&color=babaca&suffix=$) https://progress-bar.dev/420/?scale=500&title=funds&width=120&color=babaca&suffix=$ +![Colorful](https://progress-bar.dev/58/?title=colorful&progress_background=ffc0cb&progress_number_color=000) +https://progress-bar.dev/58/?title=colorful&progress_background=ffc0cb&progress_number_color=000 + Heavily inspired by the works of https://github.com/fehmicansaglam/progressed.io